Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.26 KB

GlobalLock.md

File metadata and controls

45 lines (31 loc) · 1.26 KB

Home

Function name : GlobalLock

Group: Memory Management - Library: kernel32


The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object"s memory block.


Code examples:

Copying strings through the global memory block
Opening the Page Setup dialog box to specify the attributes of a printed page
Enumerating network resources
Passing data records between VFP applications via the Clipboard

Declaration:

LPVOID GlobalLock(
  HGLOBAL hMem   // handle to global memory object
);  

FoxPro declaration:

DECLARE INTEGER GlobalLock IN kernel32;
	INTEGER hMem  

Parameters:

hMem [in] Handle to the global memory object. This handle is returned by either the GlobalAlloc or GlobalReAlloc function.


Return value:

If the function succeeds, the return value is a pointer to the first byte of the memory block. If the function fails, the return value is NULL.