The GetModuleInformation function retrieves information about the specified module in the MODULEINFO structure.
BOOL GetModuleInformation(
HANDLE hProcess, // handle to the process
HMODULE hModule, // handle to the module
LPMODULEINFO lpmodinfo, // structure that receives information
DWORD cb // size of the structure
);
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.
Process Status Helper Overview, PSAPI Functions, EnumProcesses, MODULEINFO