BOOL bResult;
ULONG_PTR pLibNameBuffer = 0, pInitFuncBuffer = 0;
+ /* Do not allow the desktop thread to do callback to user mode */
+ ASSERT(PsGetCurrentThreadWin32Thread() != gptiDesktopThread);
+
TRACE("co_IntClientLoadLibrary: %S, %S, %d, %d\n", pstrLibName->Buffer, pstrLibName->Buffer, Unload, ApiHook);
/* Calculate the size of the argument */
ULONG ResultLength;
NTSTATUS Status;
+ /* Do not allow the desktop thread to do callback to user mode */
+ ASSERT(PsGetCurrentThreadWin32Thread() != gptiDesktopThread);
+
Arguments.Callback = CompletionCallback;
Arguments.Wnd = hWnd;
Arguments.Msg = Msg;
ULONG ArgumentLength;
LRESULT Result;
+ /* Do not allow the desktop thread to do callback to user mode */
+ ASSERT(PsGetCurrentThreadWin32Thread() != gptiDesktopThread);
+
if (0 < lParamBufferSize)
{
ArgumentLength = sizeof(WINDOWPROC_CALLBACK_ARGUMENTS) + lParamBufferSize;
PVOID ResultPointer;
ULONG ResultLength;
+ /* Do not allow the desktop thread to do callback to user mode */
+ ASSERT(PsGetCurrentThreadWin32Thread() != gptiDesktopThread);
+
ResultPointer = NULL;
ResultLength = sizeof(LRESULT);
return (HMENU)Result;
}
+extern HCURSOR gDesktopCursor;
+
BOOL APIENTRY
co_IntLoadDefaultCursors(VOID)
{
ULONG ResultLength;
BOOL DefaultCursor = TRUE;
+ /* Do not allow the desktop thread to do callback to user mode */
+ ASSERT(PsGetCurrentThreadWin32Thread() != gptiDesktopThread);
+
ResultPointer = NULL;
- ResultLength = sizeof(LRESULT);
+ ResultLength = sizeof(HCURSOR);
UserLeaveCo();
UserEnterCo();
+ /* HACK: The desktop class doen't have a proper cursor yet, so set it here */
+ gDesktopCursor = *((HCURSOR*)ResultPointer);
+
if (!NT_SUCCESS(Status))
{
return FALSE;
UINT lParamSize = 0;
ASSERT(Proc);
+ /* Do not allow the desktop thread to do callback to user mode */
+ ASSERT(PsGetCurrentThreadWin32Thread() != gptiDesktopThread);
pti = PsGetCurrentThreadWin32Thread();
if (pti->TIF_flags & TIF_INCLEANUP)
ULONG ArgumentLength, ResultLength;
PVOID Argument, ResultPointer;
+ /* Do not allow the desktop thread to do callback to user mode */
+ ASSERT(PsGetCurrentThreadWin32Thread() != gptiDesktopThread);
+
ArgumentLength = ResultLength = 0;
Argument = ResultPointer = NULL;