plugin.cpp 508 B

12345678910111213141516171819202122232425262728293031
  1. #include "main.h"
  2. #include "./plugin.h"
  3. #include "./component.h"
  4. static HINSTANCE pluginInstance = NULL;
  5. static DevicesComponent component;
  6. HINSTANCE
  7. Plugin_GetInstance()
  8. {
  9. return pluginInstance;
  10. }
  11. extern "C" __declspec(dllexport) ifc_wa5component *
  12. GetWinamp5SystemComponent()
  13. {
  14. return &component;
  15. }
  16. BOOL APIENTRY
  17. DllMain(HANDLE hModule, DWORD uReason, void *reserved)
  18. {
  19. switch(uReason)
  20. {
  21. case DLL_PROCESS_ATTACH:
  22. pluginInstance = (HINSTANCE)hModule;
  23. break;
  24. }
  25. return TRUE;
  26. }