Retrieves a handle and name for each module in the specified process.
#Include <WinAPIEx.au3>
_WinAPI_EnumProcessModules ( [$PID [, $iFlag]] )
$PID | [可选参数] The PID of the process. Default (0) is the current process. |
$iFlag | [可选参数] The filter criteria. This parameter is valid only for Windows Vista and later, and can be one of the following values. $LIST_MODULES_32BIT $LIST_MODULES_64BIT $LIST_MODULES_ALL $LIST_MODULES_DEFAULT |
Success | The 2D array containing the following information: |
[0][0] | Number of rows in array (n) |
[0][1] | Unused |
[n][0] | Handle to the module. |
[n][1] | The path to the file that contains the module. |
失败: | 返回 0 并设置 @error 标志为非 0 值. |
在MSDN中搜索
#Include <Array.au3>
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
If (_WinAPI_GetVersion() < '6.0') And (@AutoItX64) Then
MsgBox(16, 'Error', 'This example works from a 64-bit system only in Windows Vista or later.')
Exit
EndIf
Global $Data = _WinAPI_EnumProcessModules()
_ArrayDisplay($Data, '_WinAPI_EnumProcessModules')