[SVCHOST]: Delay-load netapi32 and ole32 (they will be loaded only if needed).

[WIN32K]: Fix cursor check (in few corner cases SYSTEMCUR(ARROW) happens to be NULL, when some programs -- ole32 -- wants to create windows while there is no graphics initialized yet). James, can you investigate?

svn path=/trunk/; revision=66498
This commit is contained in:
Hermès Bélusca-Maïto 2015-02-28 15:33:26 +00:00
parent eef5ed99c0
commit a492e11380
2 changed files with 14 additions and 2 deletions

View file

@ -14,6 +14,7 @@ add_executable(svchost
target_link_libraries(svchost uuid)
set_module_type(svchost win32cui UNICODE)
add_importlibs(svchost advapi32 netapi32 rpcrt4 ole32 kernel32 ntdll)
add_delay_importlibs(svchost netapi32 ole32)
add_importlibs(svchost advapi32 rpcrt4 kernel32 ntdll)
add_pch(svchost svchost.h SOURCE)
add_cd_file(TARGET svchost DESTINATION reactos/system32 FOR all)

View file

@ -2424,8 +2424,19 @@ UserRegisterSystemClasses(VOID)
wc.cbClsExtra = 0;
wc.cbWndExtra = DefaultServerClasses[i].ExtraBytes;
wc.hIcon = NULL;
//// System Cursors should be initilized!!!
wc.hCursor = DefaultServerClasses[i].hCursor == (HICON)OCR_NORMAL ? UserHMGetHandle(SYSTEMCUR(ARROW)) : NULL;
if (DefaultServerClasses[i].hCursor == (HICON)OCR_NORMAL &&
SYSTEMCUR(ARROW) != NULL)
{
wc.hCursor = UserHMGetHandle(SYSTEMCUR(ARROW));
}
else
{
ERR("SYSTEMCUR(ARROW) == NULL, should not happen!!\n");
wc.hCursor = NULL;
}
hBrush = DefaultServerClasses[i].hBrush;
if (hBrush <= (HBRUSH)COLOR_MENUBAR)
{