2019-06-20 17:50:30 +02:00
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
static HINSTANCE instance;
|
|
|
|
|
|
|
|
BOOL WINAPI DllMain(HINSTANCE instance_new, DWORD reason, LPVOID reserved)
|
|
|
|
{
|
|
|
|
switch (reason)
|
|
|
|
{
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
instance = instance_new;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2019-12-02 14:53:59 +01:00
|
|
|
void WINAPI get_path(char *buffer, int buffer_size)
|
2019-06-20 17:50:30 +02:00
|
|
|
{
|
|
|
|
GetModuleFileNameA(instance, buffer, buffer_size);
|
|
|
|
}
|