Why do I get the message 'Initialization of USER32.dll or KERNEL32.dll' failed?

John Savill

April 7, 1999

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. Every desktop object on the system has a desktop heap associatedwith it. The desktop object uses the heap to store menus, hooks, strings, andwindows.

There is soft limit on the Desktop Heap size (128KB). This can be expandedby changing a parameter in the Registry as follows:

  1. Start the registry editor (regedt32.exe)

  2. Move to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSessionManagerSubSystems

  3. Double click on the Windows value

  4. The data will be of the format:
    %SystemRoot%system32csrss.exe ObjectDirectory=WindowsSharedSection=1024,3072 Windows=OnSubSystemType=Windows ServerDll=basesrv,1ServerDll=winsrv:UserServerDllInitialization,3ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=OffMaxRequestThreads=16

  5. Find the SharedSection value and add ,512 or ,1024 after the second number,for example:
    %SystemRoot%system32csrss.exe ObjectDirectory=Windows SharedSection=1024,3072,1024 Windows=On SubSystemType=WindowsServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=OffMaxRequestThreads=16
    Setting to ,512 will set the desktop heap to 512KB for each desktop associatedwith non- interactive window stations. 1024 would set it to 1MB.

  6. Close the registry editor

  7. Reboot the machine

If you try and set the value to anything less than 128 then a default of 128will be used by the system, ignoring you value.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like