aboutsummaryrefslogtreecommitdiff
path: root/Src/burnlib/main.cpp
diff options
context:
space:
mode:
authorJean-Francois Mauguit <jfmauguit@mac.com>2024-09-24 09:03:25 -0400
committerGitHub <noreply@github.com>2024-09-24 09:03:25 -0400
commitbab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/burnlib/main.cpp
parent4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff)
parent20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff)
downloadwinamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/burnlib/main.cpp')
-rw-r--r--Src/burnlib/main.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/Src/burnlib/main.cpp b/Src/burnlib/main.cpp
new file mode 100644
index 00000000..ad12f280
--- /dev/null
+++ b/Src/burnlib/main.cpp
@@ -0,0 +1,24 @@
+// burnlib.cpp : Defines the entry point for the DLL application.
+//
+
+#include "main.h"
+
+extern api_service *serviceManager;
+api_language *WASABI_API_LNG_BURN = 0;
+HINSTANCE dllInstance = NULL;
+HMODULE hResource = NULL;
+HWND winampWnd = NULL;
+
+// must be first call before you start using library
+void InitializeBurningLibrary(api_service *wasabiServiceManager, HINSTANCE _dllInstance, HWND _winampWnd)
+{
+ dllInstance = _dllInstance;
+ serviceManager = wasabiServiceManager;
+ winampWnd = _winampWnd;
+
+ waServiceFactory *sf = serviceManager->service_getServiceByGuid(languageApiGUID);
+ if (sf) WASABI_API_LNG_BURN = reinterpret_cast<api_language*>(sf->getInterface());
+
+ // need to have this initialised before we try to do anything with localisation features
+ hResource = WASABI_API_LNG_BURN->StartLanguageSupport(LoadLibraryW(L"burnlib.dll"),burnlibLangGUID);
+} \ No newline at end of file