13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LocalCompactfunction discards moveable and discardable blocks that are not lockeddown, until the requested amount of space is generated, wheneverpossible.Parameters wMinFree WORD Specifies the number of free bytes desired. IfwMinFree is zero, the function returns a value but does notcompact memory.Return valueThe return value specifies the number of bytes in the largest block of freelocal memory.LocalDiscardSyntaxHANDLE LocaIDiscard(hMem)function LocaIDiscard(Mem: THandle): THandle;This function discards the local memory block specified by the hMemparameter. The lock count of the memory block must be zero.The local memory block is removed from memory, but its handle remainsvalid. An application can subsequently pass the handle to theLocalReAlloc function to allocate another local memory block identifiedby the same handle.Parameters hMem HANDLE Identifies the local memory block to be discarded.Return valueThe return value specifies the outcome of the function. It is NULL if thefunction is successful. Otherwise, it is equal to hMem.LocalFlagsSyntaxWORD LocaIFlags(hMem)function LocaIFlags(Mem: THandle): Word;This function returns information about the specified local memory block.Parameters hMem HANDLE Identifies the local memory block.Return valueThe return value contains one of the following memory-allocation flags inthe high byte:ValueLMEM_DISCARDABLELMEM_DISCARDEDMeaningBlock is marked as discardable.Block has been discarded.Chapter 4, Functions directory415

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!