- Call UserUnregisterUserApiHook from the process cleanup routine if the process has registered the user api hook

svn path=/branches/GSoC_2011/ThemesSupport/; revision=52652
This commit is contained in:
Giannis Adamopoulos 2011-07-12 09:24:16 +00:00
parent aeebfa7e0e
commit cf8d09b13c

View file

@ -382,6 +382,18 @@ Win32kThreadCallback(struct _ETHREAD *Thread,
}
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);