HDC ScreenDeviceContext = NULL;
PTHREADINFO gptiDesktopThread = NULL;
HCURSOR gDesktopCursor = NULL;
+PKEVENT gpDesktopThreadStartedEvent = NULL;
/* OBJECT CALLBACKS **********************************************************/
ExDesktopObjectType->TypeInfo.DefaultNonPagedPoolCharge = sizeof(DESKTOP);
ExDesktopObjectType->TypeInfo.GenericMapping = IntDesktopMapping;
ExDesktopObjectType->TypeInfo.ValidAccessMask = DESKTOP_ALL_ACCESS;
+
+ /* Allocate memory for the event structure */
+ gpDesktopThreadStartedEvent = ExAllocatePoolWithTag(NonPagedPool,
+ sizeof(KEVENT),
+ USERTAG_EVENT);
+ if (!gpDesktopThreadStartedEvent)
+ {
+ ERR("Failed to allocate event!\n");
+ return STATUS_NO_MEMORY;
+ }
+
+ /* Initialize the kernel event */
+ KeInitializeEvent(gpDesktopThreadStartedEvent,
+ SynchronizationEvent,
+ FALSE);
+
return STATUS_SUCCESS;
}
classes will be allocated from the shared heap */
UserRegisterSystemClasses();
+ KeSetEvent(gpDesktopThreadStartedEvent, IO_NO_INCREMENT, FALSE);
+
while (TRUE)
{
Ret = co_IntGetPeekMessage(&Msg, 0, 0, 0, PM_REMOVE, TRUE);