Click or drag to resize

RegistryHelperGetProcAddress Method

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

Namespace:  MFiles.VAF.Common
Assembly:  MFiles.VAF (in MFiles.VAF.dll) Version: 2.1.0.1 (2.1.0.1)
Syntax
C#
[DllImportAttribute("kernel32.dll", CharSet = CharSet.Ansi, ExactSpelling = true, 
	SetLastError = true)]
public static UIntPtr GetProcAddress(
	IntPtr hModule,
	string procName
)

Parameters

hModule
Type: SystemIntPtr
- 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
Type: SystemString
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

Type: 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