_SetReclaimableItem


#include vmm.h

DWORD _SetReclaimableItem(DWORD enumKey, ReclaimStruc *pReclaim, 
    DWORD Flags);

Marks as fully reclaimable or restorable, the regions of reclaimable VM memory declared by a previous call to the _AddReclaimableItem service. Uses C calling convention and the EAX, ECX, EDX, and Flags registers.

enumKey

Enumeration key. Set this parameter to zero to begin enumeration. Subsequent calls to this service specify enumeration keys returned by previous calls.

pReclaim

Address of ReclaimStruc structure to copy. The callback in the RS_CallBack member of the ReclaimStruc structure is called using the CDECL calling and register conventions, and has no defined return value. The reference data for the callback, if any, is not passed separately, since it is already available in the ReclaimStruc.

Flags

Reserved; must be 0.

If the block's contents must be restored prior to System_Exit, RS_RESTORE must also be specified in the RS_Flags member. If the RS_Callback member specifies the address of an optional callback function, the function is called immediately after the contents have been restored, prior to System_Exit.

If the system does not use a fully-reclaimable block (for example, if the block's alignment or size makes it unsuitable), it still calls the caller's callback address, if any, so that any external references to the block can still be restored.

If a block marked reclaimable cannot later be reclaimed, call SetReclaimableItem with the RS_RECLAIM flag clear.

See also _AddReclaimableItem, _EnumReclaimableItem, ReclaimStruc