Author: hbelusca
Date: Sat Feb 28 15:33:26 2015
New Revision: 66498
URL:
http://svn.reactos.org/svn/reactos?rev=66498&view=rev
Log:
[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?
Modified:
trunk/reactos/base/services/svchost/CMakeLists.txt
trunk/reactos/win32ss/user/ntuser/class.c
Modified: trunk/reactos/base/services/svchost/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/svchost/CMak…
==============================================================================
--- trunk/reactos/base/services/svchost/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/services/svchost/CMakeLists.txt [iso-8859-1] Sat Feb 28 15:33:26
2015
@@ -14,6 +14,7 @@
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)
Modified: trunk/reactos/win32ss/user/ntuser/class.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/class.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] Sat Feb 28 15:33:26 2015
@@ -2424,8 +2424,19 @@
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)
{