mirror of
https://github.com/reactos/reactos.git
synced 2024-08-19 18:02:55 +00:00
[user32]
- When ClearUserApiHook returns false, this means that the library will be freed in EndUserApiHook. In this case return success to let win32k know that the process has removed the api hook. Fixes reloading the api hook after unloading it svn path=/branches/GSoC_2011/ThemesSupport/; revision=52949
This commit is contained in:
parent
4c2f096717
commit
23e86250fb
|
@ -438,6 +438,14 @@ HINSTANCE ClientLoadLibrary(PUNICODE_STRING pstrLibName,
|
|||
ANSI_STRING InitFuncName;
|
||||
BOOL Result = FALSE;
|
||||
|
||||
TRACE("ClientLoadLibrary: pid: %d, strLibraryName: %S, "
|
||||
"strInitFuncName: %S, Unload: %d, ApiHook:%d\n",
|
||||
GetCurrentProcessId(),
|
||||
pstrLibName->Buffer,
|
||||
pstrInitFunc->Buffer,
|
||||
Unload,
|
||||
ApiHook);
|
||||
|
||||
/* Check if we have to load the module */
|
||||
if(Unload == FALSE)
|
||||
{
|
||||
|
@ -485,7 +493,14 @@ HINSTANCE ClientLoadLibrary(PUNICODE_STRING pstrLibName,
|
|||
if(ApiHook == TRUE)
|
||||
{
|
||||
Result = ClearUserApiHook(ghmodUserApiHook);
|
||||
hLibrary = Result ? ghmodUserApiHook : 0;
|
||||
hLibrary = ghmodUserApiHook;
|
||||
/* Check if we can we unload it now */
|
||||
if(Result == FALSE)
|
||||
{
|
||||
/* Return success because we are going to free
|
||||
the library in EndUserApiHook*/
|
||||
return hLibrary;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue