main.cpp 861 B

123456789101112131415161718192021222324
  1. // burnlib.cpp : Defines the entry point for the DLL application.
  2. //
  3. #include "main.h"
  4. extern api_service *serviceManager;
  5. api_language *WASABI_API_LNG_BURN = 0;
  6. HINSTANCE dllInstance = NULL;
  7. HMODULE hResource = NULL;
  8. HWND winampWnd = NULL;
  9. // must be first call before you start using library
  10. void InitializeBurningLibrary(api_service *wasabiServiceManager, HINSTANCE _dllInstance, HWND _winampWnd)
  11. {
  12. dllInstance = _dllInstance;
  13. serviceManager = wasabiServiceManager;
  14. winampWnd = _winampWnd;
  15. waServiceFactory *sf = serviceManager->service_getServiceByGuid(languageApiGUID);
  16. if (sf) WASABI_API_LNG_BURN = reinterpret_cast<api_language*>(sf->getInterface());
  17. // need to have this initialised before we try to do anything with localisation features
  18. hResource = WASABI_API_LNG_BURN->StartLanguageSupport(LoadLibraryW(L"burnlib.dll"),burnlibLangGUID);
  19. }