Ignore:
Timestamp:
May 12, 2000, 8:09:42 PM (25 years ago)
Author:
sandervl
Message:

hook, syscolor & message bugfixes

File:
1 edited

Legend:

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

    r3207 r3525  
    1 /* $Id: HOOK.CPP,v 1.13 2000-03-23 19:24:25 sandervl Exp $ */
     1/* $Id: HOOK.CPP,v 1.14 2000-05-12 18:09:39 sandervl Exp $ */
    22
    33/*
     
    333333  HOOKDATA **prevHook;
    334334  THDB     *thdb;
    335   VMutex   *hookMutex;
    336335
    337336    dprintf(("Removing hook %08x\n", data));
     
    358357                return FALSE;
    359358        }
    360         hookMutex = &threadHookMutex;
    361         hookMutex->enter();
     359        threadHookMutex.enter();
    362360        prevHook = (HOOKDATA **)&thdb->hooks[data->id - WH_MINHOOK];
    363361    }
    364362    else {
    365         hookMutex = &systemHookMutex;
    366         hookMutex->enter();
     363        systemHookMutex.enter(VMUTEX_WAIT_FOREVER, &hGlobalHookMutex);
    367364        prevHook = (HOOKDATA **)&HOOK_systemHooks[data->id - WH_MINHOOK];
    368365    }
     
    371368
    372369    if (!prevHook) {
    373         hookMutex->leave();
     370        if (data->ownerThread) {
     371                threadHookMutex.leave();
     372        }
     373        else    systemHookMutex.leave(&hGlobalHookMutex);
     374
    374375        return FALSE;
    375376    }
    376377    *prevHook = (HOOKDATA *)data->next;
    377     hookMutex->leave();
     378
     379    if (data->ownerThread) {
     380         threadHookMutex.leave();
     381    }
     382    else systemHookMutex.leave(&hGlobalHookMutex);
    378383
    379384    HeapFree(GetProcessHeap(), 0, (LPVOID)data );
Note: See TracChangeset for help on using the changeset viewer.