函数参考


_WinAPI_EnumDllProc

Enumerates an exported functions of the specified dynamic-link library (DLL).

#Include <WinAPIEx.au3>
_WinAPI_EnumDllProc ( $sPath [, $sMask [, $iFlags]] )

参数

$sPath 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 [可选参数] 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, all the exported
functions will be enumerated.
$iFlags [可选参数] 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:
[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.
失败: 返回 0 并设置 @error 标志为非 0 值.

注意/说明

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 library that was used to enumerate.

相关

详情参考

在MSDN中搜索


示例/演示


#Include <APIConstants.au3>
#Include <Array.au3>
#Include <WinAPIEx.au3>

Opt('MustDeclareVars', 1)

Global $Data

$Data = _WinAPI_EnumDllProc('ntdll.dll', 'Rtl*', $SYMOPT_CASE_INSENSITIVE)

If IsArray($Data) Then
    For $i = 1 To $Data[0][0]
        $Data[$i][0] = '0x' & Hex($Data[$i][0])
    Next
EndIf

_ArrayDisplay($Data, _WinAPI_GetExtended())