Define DllMain for VSTGUI

This commit is contained in:
Jean Pierre Cimalando 2020-08-31 11:38:23 +02:00
parent 66826ef879
commit 58fe6fb115

View file

@ -15,6 +15,9 @@
#include <dlfcn.h>
#include <poll.h>
#endif
#if WINDOWS
#include <windows.h>
#endif
#if LINUX
void Lv2IdleRunLoop::execIdle()
@ -168,3 +171,16 @@ void VSTGUI::initializeSoHandle()
VSTGUI::soHandleInitialized = true;
}
#endif
///
#if WINDOWS
void* hInstance = nullptr;
__declspec(dllexport)
BOOL WINAPI DllMain(HINSTANCE dllInstance, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
hInstance = dllInstance;
return TRUE;
}
#endif