请问有人知道EnumProcessModules用法吗?
请问有人知道EnumProcessModules用法吗? 问题点数:0、回复次数:4Top
1 楼pankun(剑神一笑 Console下面干革命)回复于 2003-08-03 19:55:51 得分 0
没用过,但从函数名看来像是枚举进程模块?Top
2 楼ljmanage(过客)回复于 2003-08-03 21:58:03 得分 0
EnumProcessModules
The EnumProcessModules function retrieves a handle for each module in the specified process.
BOOL EnumProcessModules(
HANDLE hProcess, // handle to the process
HMODULE * lphModule, // array to receive the module handles
DWORD cb, // size of the array
LPDWORD lpcbNeeded // receives the number of bytes returned
);
Parameters
hProcess
Handle to the process.
lphModule
Pointer to the array that receives the list of module handles.
cb
Specifies the size, in bytes, of the lphModule array.
lpcbNeeded
Receives the number of bytes returned in the lphModule array.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
It is a good idea to give EnumProcessModules a large array of HMODULE values, because it is hard to predict how many modules there will be in the process at the time you call EnumProcessModules. To determine how many modules were enumerated by the call to EnumProcessModules, divide the resulting value in the lpcbNeeded parameter by sizeof(HMODULE).
Top
3 楼ljmanage(过客)回复于 2003-08-03 21:58:39 得分 0
应该在tlhelp32单元中Top
4 楼bqylin(青云)回复于 2003-08-04 00:09:58 得分 0
to ljmanage(过客)
能给出EnumProcessModules的Delphi声明吗?Top




