1
0

main.cpp 1020 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #include "api__xml.h"
  2. #include "wa5_xml.h"
  3. #include "factory_xml.h"
  4. #include <bfc/platform/export.h>
  5. #ifndef _DEBUG
  6. BOOL WINAPI _DllMainCRTStartup(HINSTANCE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
  7. {
  8. DisableThreadLibraryCalls(hInst);
  9. return TRUE;
  10. }
  11. #endif
  12. WA5_XML wa5_xml;
  13. XMLFactory *xmlFactory=0;
  14. api_service *WASABI_API_SVC = 0;
  15. void WA5_XML::RegisterServices(api_service *service)
  16. {
  17. xmlFactory = new XMLFactory;
  18. WASABI_API_SVC = service;
  19. WASABI_API_SVC->service_register(xmlFactory);
  20. }
  21. int WA5_XML::RegisterServicesSafeModeOk()
  22. {
  23. return 1;
  24. }
  25. void WA5_XML::DeregisterServices(api_service *service)
  26. {
  27. service->service_deregister(xmlFactory);
  28. delete xmlFactory;
  29. xmlFactory=0;
  30. }
  31. extern "C" DLLEXPORT ifc_wa5component *GetWinamp5SystemComponent()
  32. {
  33. return &wa5_xml;
  34. }
  35. #define CBCLASS WA5_XML
  36. START_DISPATCH;
  37. VCB(API_WA5COMPONENT_REGISTERSERVICES, RegisterServices)
  38. CB(15, RegisterServicesSafeModeOk)
  39. VCB(API_WA5COMPONENT_DEREEGISTERSERVICES, DeregisterServices)
  40. END_DISPATCH;
  41. #undef CBCLASS