Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 193 of file usrapihk.c.
Referenced by ClientLoadLibrary().
{ HMODULE hModule; USERAPIHOOKPROC pfn = NULL, pfn1 = NULL; RtlEnterCriticalSection(&gcsUserApiHook); hModule = ghmodUserApiHook; if ( ghmodUserApiHook == hInstance ) { pfn1 = gpfnInitUserApi; if ( --gcLoadUserApiHook == 0 ) { gfUserApiHook = 0; ResetUserApiHook(&guah); if ( gcCallUserApiHook ) { hInstance = NULL; pfn1 = NULL; pfn = gpfnInitUserApi; gcLoadUserApiHook = 1; } else { hInstance = hModule; ghmodUserApiHook = NULL; gpfnInitUserApi = NULL; } } } RtlLeaveCriticalSection(&gcsUserApiHook); if ( pfn ) { pfn(uahShutdown, 0); // Shutdown. RtlEnterCriticalSection(&gcsUserApiHook); pfn1 = gpfnInitUserApi; if ( --gcLoadUserApiHook == 0 ) { if ( gcCallUserApiHook ) { hInstance = NULL; pfn1 = NULL; } else { hInstance = ghmodUserApiHook; ghmodUserApiHook = NULL; gpfnInitUserApi = NULL; } } RtlLeaveCriticalSection(&gcsUserApiHook); } if ( pfn1 ) pfn1(uahStop, 0); return hInstance != 0; }