Platform SDK: Performance Monitoring

GetModuleInformation

The GetModuleInformation function retrieves information about the specified module in the MODULEINFO structure.

BOOL GetModuleInformation(
  HANDLE hProcess,         // handle to process
  HMODULE hModule,         // handle to module
  LPMODULEINFO lpmodinfo,  // information buffer
  DWORD cb                 // size of buffer
);

Parameters

hProcess
[in] Handle to the process that contains the module.
hModule
[in] Handle to the module.
lpmodinfo
[out] Pointer to the MODULEINFO structure that receives information about the module.
cb
[in] Specifies the size, in bytes, of the MODULEINFO structure.

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.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Header: Declared in Psapi.h.
  Library: Use Psapi.lib.

See Also

Process Status Helper Overview, PSAPI Functions, EnumProcesses, MODULEINFO