equal
deleted
inserted
replaced
|
1 #include <cstdlib> |
|
2 #include <cstdio> |
|
3 #include <iostream> |
|
4 #include <Windows.h> |
|
5 |
|
6 using namespace std; |
|
7 |
|
8 int main(int argc, char ** argv) |
|
9 { |
|
10 /* get handle to dll */ |
|
11 HINSTANCE hGetProcIDDLL = LoadLibrary((LPCWSTR)"npTuioClient.dll"); |
|
12 |
|
13 /* get pointer to the function in the dll*/ |
|
14 FARPROC lpfnGetProcessID = GetProcAddress(HMODULE (hGetProcIDDLL),"tuio_start"); |
|
15 FARPROC lpfnGetProcessID2 = GetProcAddress(HMODULE (hGetProcIDDLL),"tuio_stop"); |
|
16 |
|
17 /* |
|
18 Define the Function in the DLL for reuse. This is just prototyping the dll's function. |
|
19 A mock of it. Use "stdcall" for maximum compatibility. |
|
20 */ |
|
21 typedef int (__stdcall * pICFUNC)(void); |
|
22 |
|
23 pICFUNC t; |
|
24 t = pICFUNC(lpfnGetProcessID); |
|
25 |
|
26 /* The actual call to the function contained in the dll */ |
|
27 t(); |
|
28 |
|
29 /* Release the Dll */ |
|
30 FreeLibrary(hGetProcIDDLL); |
|
31 |
|
32 system("PAUSE"); |
|
33 return 0; |
|
34 } |