Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.8 KB

GetModuleHandle.md

File metadata and controls

52 lines (37 loc) · 1.8 KB

Home

Function name : GetModuleHandle

Group: Dynamic-Link Library - Library: kernel32


Retrieves a module handle for the specified module if the file has been mapped into the address space of the calling process.


Code examples:

Retrieving a handle to DLL and address of an exported function in it
Finding the path to the VFP executable running
Retrieving information about the main VFP window
How to view icons stored in executable files (Icon Viewer)
Retrieving Window Class information for the VFP window
Drawing icons associated with the VFP main window
Loading a string resource from an executable file
GDI+: Storing DLL icon resources in image files
Displaying dimmed window behind VFP top-level form

Declaration:

HMODULE GetModuleHandle(
  LPCTSTR lpModuleName   // module name
);  

FoxPro declaration:

DECLARE INTEGER GetModuleHandle IN kernel32;
	STRING lpModuleName  

Parameters:

lpModuleName [in] Pointer to a null-terminated string that contains the name of the module (either a .dll or .exe file).


Comments:

If this parameter is NULL, the GetModuleHandle returns a handle to the file used to create the calling process. This is a direct way to get a handle to the running VFP application.

Equivalent result can be achieved through the GetWindowLong call.