Changeset 4658 for trunk/src/user32/HOOK.CPP
- Timestamp:
- Nov 21, 2000, 12:36:09 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/HOOK.CPP
r4430 r4658 1 /* $Id: HOOK.CPP,v 1.1 5 2000-10-05 13:47:06sandervl Exp $ */1 /* $Id: HOOK.CPP,v 1.16 2000-11-21 11:36:07 sandervl Exp $ */ 2 2 3 3 /* … … 240 240 MESSAGEQUEUE *queue; 241 241 HANDLE hook = 0; 242 T HDB *thdb;243 244 t hdb = GetTHDBFromThreadId(threadId);245 if(t hdb) {246 hook = t hdb->hooks[id - WH_MINHOOK];242 TEB *teb; 243 244 teb = GetTEBFromThreadId(threadId); 245 if(teb) { 246 hook = teb->o.odin.hooks[id - WH_MINHOOK]; 247 247 } 248 248 if (!hook) hook = HOOK_systemHooks[id - WH_MINHOOK]; … … 261 261 { 262 262 HOOKDATA *data; 263 T HDB *thdb;263 TEB *teb; 264 264 265 265 if ((id < WH_MINHOOK) || (id > WH_MAXHOOK) || !proc ) … … 301 301 if(dwThreadId) 302 302 { 303 t hdb = GetTHDBFromThreadId(dwThreadId);304 if(!t hdb) {303 teb = GetTEBFromThreadId(dwThreadId); 304 if(!teb) { 305 305 dprintf(("HOOK_SetHook: can't find thread database for thread %x", dwThreadId)); 306 306 return 0; 307 307 } 308 308 threadHookMutex.enter(); 309 data->next = t hdb->hooks[id - WH_MINHOOK];310 t hdb->hooks[id - WH_MINHOOK] = (DWORD)data;309 data->next = teb->o.odin.hooks[id - WH_MINHOOK]; 310 teb->o.odin.hooks[id - WH_MINHOOK] = (DWORD)data; 311 311 threadHookMutex.leave(); 312 312 } … … 331 331 { 332 332 HOOKDATA **prevHook; 333 T HDB *thdb;333 TEB *teb; 334 334 335 335 dprintf(("Removing hook %08x\n", data)); … … 351 351 if (data->ownerThread) 352 352 { 353 t hdb = GetTHDBFromThreadId(data->ownerThread);354 if(!t hdb) {353 teb = GetTEBFromThreadId(data->ownerThread); 354 if(!teb) { 355 355 dprintf(("HOOK_RemoveHook: can't find thread database for thread %x", data->ownerThread)); 356 356 return FALSE; 357 357 } 358 358 threadHookMutex.enter(); 359 prevHook = (HOOKDATA **)&t hdb->hooks[data->id - WH_MINHOOK];359 prevHook = (HOOKDATA **)&teb->o.odin.hooks[data->id - WH_MINHOOK]; 360 360 } 361 361 else {
Note:
See TracChangeset
for help on using the changeset viewer.