annotate src/win32/IdleTracker/idletrack.c @ 6561:33ceba0dfd9b

[gaim-migrate @ 7083] Fix for bug #792641 - Windows hooks tie up committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Thu, 21 Aug 2003 18:29:48 +0000
parents 5480a73b2696
children 59ffe137176d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4533
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
1 /*
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
2 * idletrack.c
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
3 *
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
4 * Authors: mrgentry @ http://www.experts-exchange.com
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
5 * Herman Bloggs <hermanator12002@yahoo.com>
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
6 * Date: February, 2003
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
7 * Description: Track user inactivity.
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
8 */
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
9 #include <windows.h>
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
10
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
11 #define EXPORT __declspec(dllexport)
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
12
4548
ae85f27e4948 [gaim-migrate @ 4827]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4533
diff changeset
13 /* from msdn docs */
ae85f27e4948 [gaim-migrate @ 4827]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4533
diff changeset
14 typedef struct tagMOUSEHOOKSTRUCT {
ae85f27e4948 [gaim-migrate @ 4827]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4533
diff changeset
15 POINT pt;
ae85f27e4948 [gaim-migrate @ 4827]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4533
diff changeset
16 HWND hwnd;
ae85f27e4948 [gaim-migrate @ 4827]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4533
diff changeset
17 UINT wHitTestCode;
ae85f27e4948 [gaim-migrate @ 4827]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4533
diff changeset
18 DWORD dwExtraInfo;
ae85f27e4948 [gaim-migrate @ 4827]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4533
diff changeset
19 } MOUSEHOOKSTRUCT;
ae85f27e4948 [gaim-migrate @ 4827]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4533
diff changeset
20
4533
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
21 static HANDLE hMapObject = NULL;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
22 static DWORD *lastTime = NULL;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
23 static HHOOK keyHook = NULL;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
24 static HHOOK mouseHook = NULL;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
25 static HINSTANCE g_hInstance = NULL;
4548
ae85f27e4948 [gaim-migrate @ 4827]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4533
diff changeset
26 static POINT g_point;
4533
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
27
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
28 static DWORD* setup_shared_mem() {
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
29 BOOL fInit;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
30
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
31 // Set up the shared memory.
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
32 hMapObject = CreateFileMapping((HANDLE) 0xFFFFFFFF, // use paging file
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
33 NULL, // no security attributes
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
34 PAGE_READWRITE, // read/write access
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
35 0, // size: high 32-bits
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
36 sizeof(DWORD), // size: low 32-bits
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
37 "timermem"); // name of map object
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
38
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
39 if (hMapObject == NULL)
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
40 return NULL;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
41
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
42 // The first process to attach initializes memory.
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
43 fInit = (GetLastError() != ERROR_ALREADY_EXISTS);
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
44
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
45 // Get a pointer to the file-mapped shared memory.
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
46 lastTime = (DWORD*) MapViewOfFile(hMapObject, // object to map view of
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
47 FILE_MAP_WRITE, // read/write access
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
48 0, // high offset: map from
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
49 0, // low offset: beginning
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
50 0); // default: map entire file
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
51
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
52 if (lastTime == NULL)
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
53 return NULL;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
54
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
55 *lastTime = GetTickCount();
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
56
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
57 return lastTime;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
58 }
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
59
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
60
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
61 LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, LPARAM lParam) {
6561
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
62 if (!(code < 0)) {
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
63 if (lastTime == NULL)
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
64 lastTime = setup_shared_mem();
4533
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
65
6561
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
66 if (lastTime)
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
67 *lastTime = GetTickCount();
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
68 }
5336
5480a73b2696 [gaim-migrate @ 5712]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4548
diff changeset
69 return CallNextHookEx(keyHook, code, wParam, lParam);
4533
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
70 }
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
71
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
72
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
73 LRESULT CALLBACK MouseProc(int code, WPARAM wParam, LPARAM lParam) {
4548
ae85f27e4948 [gaim-migrate @ 4827]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4533
diff changeset
74 /* We need to verify that the Mouse pointer has actually moved. */
6561
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
75 if(!(code < 0) &&
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
76 !((g_point.x == ((MOUSEHOOKSTRUCT*)lParam)->pt.x) &&
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
77 (g_point.y == ((MOUSEHOOKSTRUCT*)lParam)->pt.y))) {
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
78 g_point.x = ((MOUSEHOOKSTRUCT*)lParam)->pt.x;
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
79 g_point.y = ((MOUSEHOOKSTRUCT*)lParam)->pt.y;
4533
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
80
6561
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
81 if (lastTime == NULL)
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
82 lastTime = setup_shared_mem();
4533
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
83
6561
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
84 if (lastTime)
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
85 *lastTime = GetTickCount();
33ceba0dfd9b [gaim-migrate @ 7083]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5336
diff changeset
86 }
5336
5480a73b2696 [gaim-migrate @ 5712]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4548
diff changeset
87 return CallNextHookEx(mouseHook, code, wParam, lParam);
4533
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
88 }
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
89
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
90
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
91 EXPORT DWORD wgaim_get_lastactive() {
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
92 if (lastTime == NULL)
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
93 lastTime = setup_shared_mem();
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
94
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
95 if (lastTime)
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
96 return *lastTime;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
97
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
98 return 0;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
99 }
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
100
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
101
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
102 EXPORT BOOL wgaim_set_idlehooks() {
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
103 // Set up the shared memory.
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
104 lastTime = setup_shared_mem();
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
105 if (lastTime == NULL)
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
106 return FALSE;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
107 *lastTime = GetTickCount();
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
108
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
109 // Set up the keyboard hook.
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
110 keyHook = SetWindowsHookEx(WH_KEYBOARD, KeyboardProc, g_hInstance, 0);
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
111 if (keyHook == NULL) {
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
112 UnmapViewOfFile(lastTime);
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
113 CloseHandle(hMapObject);
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
114 return FALSE;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
115 }
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
116
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
117 // Set up the mouse hook.
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
118 mouseHook = SetWindowsHookEx(WH_MOUSE, MouseProc, g_hInstance, 0);
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
119 if (mouseHook == NULL) {
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
120 UnhookWindowsHookEx(keyHook);
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
121 UnmapViewOfFile(lastTime);
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
122 CloseHandle(hMapObject);
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
123 return FALSE;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
124 }
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
125
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
126 return TRUE;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
127 }
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
128
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
129
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
130 EXPORT void wgaim_remove_idlehooks() {
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
131 if (keyHook)
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
132 UnhookWindowsHookEx(keyHook);
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
133 if (mouseHook)
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
134 UnhookWindowsHookEx(mouseHook);
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
135 if (lastTime)
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
136 UnmapViewOfFile(lastTime);
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
137 if (hMapObject)
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
138 CloseHandle(hMapObject);
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
139 }
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
140
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
141 int WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
142 switch(dwReason) {
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
143 case DLL_PROCESS_ATTACH:
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
144 g_hInstance = hInstance;
4548
ae85f27e4948 [gaim-migrate @ 4827]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4533
diff changeset
145 g_point.x = 0;
ae85f27e4948 [gaim-migrate @ 4827]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4533
diff changeset
146 g_point.y = 0;
4533
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
147 break;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
148 case DLL_PROCESS_DETACH:
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
149 break;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
150 }
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
151 return TRUE;
516061abad03 [gaim-migrate @ 4812]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
152 }