RegistryHelperGetProcAddress Method

Retrieves the address of an exported function or variable from the specified dynamic-link library (DLL).

Definition

Namespace: MFiles.VAF.Common
Assembly: MFiles.VAF (in MFiles.VAF.dll) Version: 24.1.706.1
C#
public static UIntPtr GetProcAddress(
	IntPtr hModule,
	string procName
)

Parameters

hModule  IntPtr
- A handle to the DLL module that contains the function or variable. The LoadLibrary, LoadLibraryEx, LoadPackagedLibrary, or GetModuleHandle function returns this handle. - The GetProcAddress function does not retrieve addresses from modules that were loaded using the LOAD_LIBRARY_AS_DATAFILE flag. For more information, see LoadLibraryEx.
procName  String
The function or variable name, or the function's ordinal value. If this parameter is an ordinal value, it must be in the low-order word; the high-order word must be zero.

Return Value

UIntPtr
- If the function succeeds, the return value is the address of the exported function or variable. - If the function fails, the return value is NULL. To get extended error information, call GetLastError.

See Also