93 |
tray_proc_id = GetCurrentProcessId (); |
tray_proc_id = GetCurrentProcessId (); |
94 |
cbt_hook = SetWindowsHookEx (WH_CBT, PTD_CBT_proc, glob_hinst, 0); |
cbt_hook = SetWindowsHookEx (WH_CBT, PTD_CBT_proc, glob_hinst, 0); |
95 |
if (cbt_hook == NULL) |
if (cbt_hook == NULL) |
96 |
|
{ |
97 |
|
char buf[500]; |
98 |
|
|
99 |
|
FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError (), |
100 |
|
MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), |
101 |
|
buf, sizeof buf -1, NULL); |
102 |
|
MessageBox (NULL, buf, "Error", MB_OK|MB_ICONSTOP); |
103 |
return FALSE; |
return FALSE; |
104 |
|
} |
105 |
|
|
106 |
|
|
107 |
/* Okay, what are we doing here: |
/* Okay, what are we doing here: |
108 |
* In the past I used the Spy++ application to find out why the old current |
* In the past I used the Spy++ application to find out why the old current |
109 |
* window doesn't work on so much systems. Now we try to use the computer |
* window doesn't work on so much systems. Now we try to use the computer |
280 |
{ |
{ |
281 |
switch (reason) { |
switch (reason) { |
282 |
case DLL_PROCESS_ATTACH: |
case DLL_PROCESS_ATTACH: |
283 |
glob_hinst = hinst; |
glob_hinst = hinst; |
284 |
break; |
break; |
285 |
case DLL_THREAD_ATTACH: |
case DLL_THREAD_ATTACH: |
286 |
break; |
break; |