Author: hpoussin Date: Wed May 20 00:25:46 2009 New Revision: 40990
URL: http://svn.reactos.org/svn/reactos?rev=40990&view=rev Log: It doesn't hurt to try to start Blue service before accessing it
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win3... ============================================================================== --- trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c [iso-8859-1] Wed May 20 00:25:46 2009 @@ -32,11 +32,42 @@ }
static BOOL FASTCALL +TuiStartService(LPCWSTR lpServiceName) +{ + SC_HANDLE hSCManager = NULL; + SC_HANDLE hService = NULL; + BOOL ret = FALSE; + + hSCManager = OpenSCManagerW(NULL, NULL, 0); + if (hSCManager == NULL) + goto cleanup; + + hService = OpenServiceW(hSCManager, lpServiceName, SERVICE_START); + if (hService == NULL) + goto cleanup; + + ret = StartServiceW(hService, 0, NULL); + if (!ret) + goto cleanup; + + ret = TRUE; + +cleanup: + if (hSCManager != NULL) + CloseServiceHandle(hSCManager); + if (hService != NULL) + CloseServiceHandle(hService); + return ret; +} + +static BOOL FASTCALL TuiInit(DWORD OemCP) { CONSOLE_SCREEN_BUFFER_INFO ScrInfo; DWORD BytesReturned; WNDCLASSEXW wc; + + TuiStartService(L"Blue");
ConsoleDeviceHandle = CreateFileW(L"\\.\BlueScreen", FILE_ALL_ACCESS, 0, NULL, OPEN_EXISTING, 0, NULL);