Enumerates an exported functions of the specified dynamic-link library (DLL)
#include <WinAPIDiag.au3>
_WinAPI_EnumDllProc ( $sFilePath [, $sMask = '' [, $iFlags = 0]] )
$sFilePath | The path to the library. Although this function searches for a file path when it specified as the relative path or the name without a path, will better to specify a fully qualified path to the library for an unequivocal result. |
$sMask | [optional] A wildcard string that indicates the function names to be enumerated. This string can optionally contain the wildcards, "*" and "?". If this parameter is an empty string or omitted (Default), all the exported functions will be enumerated. |
$iFlags | [optional] The optional flags. This parameter can be one or more of the following values: $SYMOPT_CASE_INSENSITIVE $SYMOPT_UNDNAME |
Success: | The 2D array containing the following information, @extended flag will contain one of the $IMAGE_FILE_MACHINE_* constants. [0][0] - Number of rows in array (n) [0][1] - Unused [n][0] - The function address relative to the library base address (UINT64). [n][1] - The function name. |
Failure: | Sets the @error flag to non-zero. |
This function works with 32- and 64-bit DLLs regardless of the system (32- or 64-bit), although 64-bit executables cannot load 32-bit DLLs and vice-versa.
Call _WinAPI_GetExtended() to retrieve a fully qualified path to the found DLL that was loaded for enumerating functions.
Note, use the fully qualified path to be sure that the _WinAPI_EnumDllProc() loads the DLL that is of interest.
In addition, this function does not use the file system redirection.
This function requires dbghelp.dll version 5.1 or later.
Search SymEnumSymbols in MSDN Library.
#include <Array.au3>
#include <WinAPIDiag.au3>
#include <WinAPIMisc.au3>
_Example()
Func _Example()
Local $aData = _WinAPI_EnumDllProc('ntdll.dll', 'Rtl*', $SYMOPT_CASE_INSENSITIVE)
If IsArray($aData) Then
For $i = 1 To $aData[0][0]
$aData[$i][0] = '0x' & Hex($aData[$i][0])
Next
EndIf
_ArrayDisplay($aData, _WinAPI_GetExtended())
EndFunc ;==>_Example