The information in this article applies to:
SYMPTOMSWhen creating a console-mode application via CreateProcess() or CreateProcessAsUser() from a service, a large number of instances may cause failure when initializing Comctl32.dll. CAUSEThis is a result of the behavior of CreateProcess() when invoked from a service. By default, CreateProcess() and CreateProcessAsUser() create a new console window that has its own instance of Comctl32.dll. Because the desktop heap is fixed to only 48 MB in size, this can rapidly consume the entire desktop heap. Even though this console window may be completely invisible, and on its own (phantom) desktop, it still loads its own instance of Comctl32.dll. RESOLUTIONThe console-mode application must be created as a detached process, if possible, and with the CREATE_NO_WINDOW flag. This method prevents the creation of the window and consumes far fewer resources. STATUSThis behavior is by design. Additional query words:
Keywords : kbCtrl kbNTOS400 kbSDKPlatform kbSDKWin32 kbGrpUser |
Last Reviewed: June 30, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |