DOS/32 Advanced DOS Extender - Programmer's Reference


2.34 - DPMI function 0503h - Resize Memory Block

Changes the size of a memory block that was previously allocated with the Allocate Memory Block function 0501h.

 

In: AX = 0503h
BX:CX = new size of block (bytes, must be nonzero)
SI:DI = memory block handle
Out:

if successful:
CF clear
BX:CX = new linear address of memory block
SI:DI = new handle for memory block

if failed:
CF set
AX = error code

8012h - linear memory unavailable
8013h - physical memory unavailable
8014h - backing store unavailable
8016h - handle unavailable
8021h - invalid value (BX:CX = 0)
8023h - invalid handle (in SI:DI)

Notes:

a) After this function returns, the previous handle for the memory block is invalid and should not be used.

b) The linear address and handle of the memory block may change as a result of this call.

c) It is the client's responsibility to update any descriptors that map the memory block with the new linear address after resizing the block.

d) This function returns an error if the client attempts to resize a memory block to zero bytes.

 


Copyright Supernar Systems, Ltd. 1996-2005
All Rights Reserved.