Function Reference


_WinAPI_GetProcAddress

Retrieves the address of an exported function or variable from the specified module

#include <WinAPISys.au3>
_WinAPI_GetProcAddress ( $hModule, $vName )

Parameters

$hModule A handle to the module that contains the function or variable
$vName The function or variable name, or the function's ordinal value

Return Value

Success: The address of the exported function or variable
Failure: 0, call _WinAPI_GetLastError() to get extended error information

Related

_WinAPI_GetModuleHandle, _WinAPI_LoadLibrary, _WinAPI_LoadLibraryEx

See Also

Search GetProcAddress in MSDN Library.

Example

#include <WinAPISys.au3>

; Get handle of the loaded module
Local $hModule = _WinAPI_GetModuleHandle("kernel32.dll")

If $hModule Then
        Local $pFunction = _WinAPI_GetProcAddress($hModule, "CreateFiber")
        ConsoleWrite("The address of the function is " & $pFunction & @CRLF)

        ; Do whatever here

EndIf