/* FUNCTIONS ******************************************************************/
+BOOL CALLBACK
+FindTopLevelWnd(
+ IN HWND hWnd,
+ IN LPARAM lParam)
+{
+ if (GetWindow(hWnd, GW_OWNER) == NULL)
+ {
+ *(HWND*)lParam = hWnd;
+ return FALSE;
+ }
+ return TRUE;
+}
+
// PUSER_SOUND_SENTRY. Used in basesrv.dll
BOOL NTAPI _UserSoundSentry(VOID)
{
NTAPI
CreateSystemThreads(PVOID pParam)
{
- NtUserCallOneParam((DWORD)pParam, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS);
+ NtUserCallOneParam((DWORD_PTR)pParam, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS);
RtlExitUserThread(0);
return 0;
}
CSR_API(SrvCreateSystemThreads)
{
- DPRINT1("%s not yet implemented\n", __FUNCTION__);
- return STATUS_NOT_IMPLEMENTED;
+ NTSTATUS Status = CsrExecServerThread(CreateSystemThreads, 0);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("Cannot start system thread!\n");
+ }
+
+ return Status;
}
CSR_API(SrvActivateDebugger)
{
PUSER_GET_THREAD_CONSOLE_DESKTOP GetThreadConsoleDesktopRequest = &((PUSER_API_MESSAGE)ApiMessage)->Data.GetThreadConsoleDesktopRequest;
- DPRINT1("%s not yet implemented\n", __FUNCTION__);
+ UNIMPLEMENTED_ONCE;
/* Return nothing for the moment... */
GetThreadConsoleDesktopRequest->ConsoleDesktop = NULL;
/* Set the process creation notify routine for BASE */
BaseSetProcessCreateNotify(NtUserNotifyProcessCreate);
+ /* Initialize the hard errors cache */
+ UserInitHardErrorsCache();
+
/* Initialize the kernel mode subsystem */
Status = NtUserInitialize(USER_VERSION,
ghPowerRequestEvent,
return Status;
}
-/*** From win32csr... See r54125 ***/
- {
- HANDLE ServerThread;
- CLIENT_ID ClientId;
- UINT i;
-
- /* Start the Raw Input Thread and the Desktop Thread */
- for (i = 0; i < 2; ++i)
- {
- Status = RtlCreateUserThread(NtCurrentProcess(),
- NULL, TRUE, 0, 0, 0,
- CreateSystemThreads,
- (PVOID)i, &ServerThread, &ClientId);
- if (NT_SUCCESS(Status))
- {
- NtResumeThread(ServerThread, NULL);
- NtClose(ServerThread);
- }
- else
- {
- DPRINT1("Cannot start Raw Input Thread!\n");
- }
- }
- }
-/*** END - From win32csr... ***/
-
/* All done */
return STATUS_SUCCESS;
}