Ignore:
Timestamp:
Nov 21, 2000, 12:36:09 PM (25 years ago)
Author:
sandervl
Message:

Updates for TEB changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/HOOK.CPP

    r4430 r4658  
    1 /* $Id: HOOK.CPP,v 1.15 2000-10-05 13:47:06 sandervl Exp $ */
     1/* $Id: HOOK.CPP,v 1.16 2000-11-21 11:36:07 sandervl Exp $ */
    22
    33/*
     
    240240  MESSAGEQUEUE *queue;
    241241  HANDLE hook = 0;
    242   THDB *thdb;
    243 
    244     thdb = GetTHDBFromThreadId(threadId);
    245     if(thdb) {
    246         hook = thdb->hooks[id - WH_MINHOOK];
     242  TEB *teb;
     243
     244    teb = GetTEBFromThreadId(threadId);
     245    if(teb) {
     246        hook = teb->o.odin.hooks[id - WH_MINHOOK];
    247247    }
    248248    if (!hook) hook = HOOK_systemHooks[id - WH_MINHOOK];
     
    261261{
    262262  HOOKDATA *data;
    263   THDB     *thdb;
     263  TEB      *teb;
    264264
    265265    if ((id < WH_MINHOOK) || (id > WH_MAXHOOK) || !proc )
     
    301301    if(dwThreadId)
    302302    {
    303         thdb = GetTHDBFromThreadId(dwThreadId);
    304         if(!thdb) {
     303        teb = GetTEBFromThreadId(dwThreadId);
     304        if(!teb) {
    305305                dprintf(("HOOK_SetHook: can't find thread database for thread %x", dwThreadId));
    306306                return 0;
    307307        }
    308308        threadHookMutex.enter();
    309         data->next = thdb->hooks[id - WH_MINHOOK];
    310         thdb->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;
    311311        threadHookMutex.leave();
    312312    }
     
    331331{
    332332  HOOKDATA **prevHook;
    333   THDB     *thdb;
     333  TEB       *teb;
    334334
    335335    dprintf(("Removing hook %08x\n", data));
     
    351351    if (data->ownerThread)
    352352    {
    353         thdb = GetTHDBFromThreadId(data->ownerThread);
    354         if(!thdb) {
     353        teb = GetTEBFromThreadId(data->ownerThread);
     354        if(!teb) {
    355355                dprintf(("HOOK_RemoveHook: can't find thread database for thread %x", data->ownerThread));
    356356                return FALSE;
    357357        }
    358358        threadHookMutex.enter();
    359         prevHook = (HOOKDATA **)&thdb->hooks[data->id - WH_MINHOOK];
     359        prevHook = (HOOKDATA **)&teb->o.odin.hooks[data->id - WH_MINHOOK];
    360360    }
    361361    else {
Note: See TracChangeset for help on using the changeset viewer.