The MASM Forum Archive 2004 to 2012

Project Support Forums => MASM32 => WINDOWS.INC Project => Topic started by: ragdog on March 29, 2011, 11:33:27 PM

Title: New Struct for Windows.inc
Post by: ragdog on March 29, 2011, 11:33:27 PM
I use GetModuleInformation for my project an missing this struct in the Windows.inc


MODULEINFO struct
  lpBaseOfDll DWORD ?
  SizeOfImage DWORD ?
  EntryPoint  DWORD ?
MODULEINFO ends


  invoke GetModuleInformation, _hProcess, DWORD PTR [ebx],addr ModuleInfo,sizeof ModuleInfo

greets,
Title: Re: New Struct for Windows.inc
Post by: Magnum on March 30, 2011, 12:40:01 AM
It might be in psapi.lib.

Library

Kernel32.lib on Windows 7 and Windows Server 2008 R2, Psapi.lib if PSAPI_VERSION=1 on Windows 7 and Windows Server 2008 R2, Psapi.lib on Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000
Title: Re: New Struct for Windows.inc
Post by: MichaelW on March 30, 2011, 05:57:02 AM
The structure definition will be in a header file, not a library. Here is the definition from psapi.h in the 2003 PSDK:

typedef struct _MODULEINFO {
    LPVOID lpBaseOfDll;
    DWORD SizeOfImage;
    LPVOID EntryPoint;
} MODULEINFO, *LPMODULEINFO;