HGLOBAL GetCodeHandle(lpProc) | |||||
FARPROC lpProc; | /* instance address of function | */ |
The GetCodeHandle function determines which code segment contains the specified function.
lpProc
Points to the procedure-instance address of the function for which to return the code segment. Typically, this address is returned by the MakeProcInstance function.
The return value identifies the code segment that contains the function if the GetCodeHandle function is successful. Otherwise, it is NULL.
If the code segment that contains the function is already loaded, the GetCodeHandle function marks the segment as recently used. If the code segment is not loaded, GetCodeHandle attempts to load it. Thus, an application can use this function to attempt to preload one or more segments necessary to perform a particular task.