Microsoft KB Archive/324452

= 16-Bit Program May Stop Responding While Calling GlobalAlloc =

Article ID: 324452

Article Last Modified on 10/30/2006

-

APPLIES TO


 * Microsoft Windows 2000 Service Pack 2
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Service Pack 2

-



This article was previously published under Q324452



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
If a 16-bit program calls GlobalAlloc, the program may stop responding, and you may receive the following error message:

caused a General Protection Fault in module KRNL386.EXE at 0001:6382

Choose close. will close.

NOTE: The hexadecimal address where the problem occurs is exactly 0001:6382.



CAUSE
This issue may occur because in Windows 2000 Service Pack 2 (SP2) and later, a program compatibility shim loads in the Ntvdm.exe address space to propagate environment variables. This behavior may affect a 16-bit program, which is sensitive to 16-bit memory allocations.



RESOLUTION
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To work around this problem, delete the following registry key, and then restart the computer:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\AppCompatibility\ntvdm.exe

The 16-Bit Windows Programming guidelines recommend that GlobalAlloc be called only when it is necessary. These guidelines recommend that you use LocalAlloc instead.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Keywords: kbenv kbprb KB324452

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.