-
Notifications
You must be signed in to change notification settings - Fork 1
/
dllmain.cpp
38 lines (35 loc) · 1.3 KB
/
dllmain.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*------------------------------------------------------------------------------
WintabEmulator - dllmain.cpp
Copyright (c) 2013 Carl G. Ritson <[email protected]>
This file may be freely used, copied, or distributed without compensation
or licensing restrictions, but is done so without any warranty or implication
of merchantability or fitness for any particular purpose.
------------------------------------------------------------------------------*/
#include "stdafx.h"
#include "wintab.h"
#include "TuioToWinTab.h"
#include "logging.h"
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
emuSetModule(hModule);
Init(); //now the Init thing is going to be called at load time
// We can read the INI file here, but would the variables be available to other parts of the program?
// this part should fire when the dll is loaded and the settings variable should be available everywhere
break;
case DLL_THREAD_ATTACH:
emuEnableThread(GetCurrentThreadId());
break;
case DLL_THREAD_DETACH:
emuDisableThread(GetCurrentThreadId());
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}