DosFreeMem

DosFreeMem will free the private or shared memory block from the process. The released page will automaticly get an access protection of 'no access'. If no other references to this memory block exists throughout the system, it will be discarded, and can later be reused.

Syntax
rc = DosFreeMem( pBaseAddress );

Parameters

 * PVOID pBaseAddress (input):This variable should contain the base address of the private/shared memory object, whose reference is to be freed.

Returns
APIRET rc The following values can be returned

Include Info

 * 1) define INCL_DOSMEMMGR
 * 2) include 

Sample Code

 * 1) define INCL_DOSMEMMGR
 * 2) include 

PVOID BaseAddress; /* Pointer to the allocated memory block */ /* We allocate a memory block, and put the base address of it in BaseAddress */ rc = DosFreeMem( BaseAddress); if (rc != 0) {	 /* We got an error to take care of. */	}