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.

GlobolLockGlobalLockSyntaxLPSTR GlobalLockChMem)function GlobalLockCMem: THandle): Pointer;This function retrieves a pointer to the global memory block specified bythe hMem parameter.Except for nondiscardable objects in protected Cstandard or 386 enhanced)mode, the block is locked into memory at the given address and its lockcount is increased by one. Locked memory is not subject to moving ordiscarding except when the memory block is being reallocated by theGlobalReAlioc function. The block remains locked in memory until itslock count is decreased to zero.In protected mode, GlobalLock increments the lock count of discardableobjects and automatic data segments only.Each time an application calls GlobalLock for an object, it must eventuallycall GlobalUnlock for the object. The GlobalUnlock function decreases thelock count for the object if GlobalLock increased the lock count for theobject. Other functions also can affect the lock count of a memory object.See the description of the GlobalFlags function for a list of the functionsthat affect the lock count.Parameters hMem HANDLE Identifies the global memory block to be locked.Return valueCommentsThe return value points to the first byte of memory in the global block ifthe function is successful. If the object has been discarded or an erroroccurs, the return value is NULL.Discarded objects always have a lock count of zero.GlobalLRUNewestSyntaxHANDLE GlobalLRUNewestChMem)function GlobalLRUNewestCMem: THandle): THandle;This function moves the global memory object identified by hMem to thenewest least-recently-used CLRU) position in memory. This greatlyreduces the likelihood that the object will be discarded soon, but does notprevent the object from eventually being discarded.Parameters hMem HANDLE Identifies the global memory object to be moved.Return valueThe return value is NULL if the hMem parameter does not specify a validhandle.374 Software development kit

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

Saved successfully!

Ooh no, something went wrong!