Author: gadamopoulos
Date: Tue Jul 12 09:24:16 2011
New Revision: 52652
URL:
http://svn.reactos.org/svn/reactos?rev=52652&view=rev
Log:
[win32k]
- Call UserUnregisterUserApiHook from the process cleanup routine if the process has
registered the user api hook
Modified:
branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/main/dllmain.c
Modified: branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/main/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/subsyst…
==============================================================================
--- branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/main/dllmain.c [iso-8859-1]
(original)
+++ branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/main/dllmain.c [iso-8859-1]
Tue Jul 12 09:24:16 2011
@@ -382,6 +382,18 @@
}
while (pti);
}
+
+ /* Do now some process cleanup that requires a valid win32 thread */
+ if(Win32Thread->ppi->cThreads == 0)
+ {
+ /* Check if we have registered the user api hook */
+ if(Win32Thread->ppi == ppiUahServer)
+ {
+ /* Unregister the api hook without blocking */
+ UserUnregisterUserApiHook(FALSE);
+ }
+ }
+
DceFreeThreadDCE(Win32Thread);
HOOK_DestroyThreadHooks(Thread);
EVENT_DestroyThreadEvents(Thread);