PRWIN9012024: GlobalReAlloc() Fails in Enhanced Mode

ID Number: Q66366

3.00

WINDOWS

buglist3.00

Summary:

PROBLEM ID: WIN9012024

SYMPTOMS

The GlobalReAlloc() function fails to allocate requested memory

even when there is enough memory available in the system to satisfy

the request.

RESOLUTION

Create a function, MyGlobalReAlloc(), to use for this purpose.

MyGlobalReAlloc() should perform four steps:

1. Call the system GlobalReAlloc() function to perform the

operation. If the system function succeeds, the operation is

complete.

2. If the system function fails, call GlobalAlloc() to allocate a

new memory block.

3. If GlobalAlloc() succeeds, copy the contents of the old memory

block to the new block and free the old block.

4. If GlobalAlloc() fails, there is no memory available in the

system to satisfy the request.

Microsoft has confirmed this to be a problem in Windows version

3.00. We are researching this problem and will post new information

here as it becomes available.