Purpose
DosQueryModFromEIP queries a module handle and name from a given flat address. It takes a flat 32 bit address as a parameter and returns information about the module (a protect mode application currently executing) owning the storage.
Syntax
#define INCL_DOSMODULEMGR #include os2.h>
APIRET APIENTRY DosQueryModFromEIP
Parameters
phMod (PHMODULE) output
Returns
ulrc (APIRET) returns
DosQueryModFromEIP returns one of the following values
87
Related Functions
Example Code
int main(int argc, char *argv[], char *envp[]){ HMODULE hMod; ULONG ObjNum; ULONG Offset; ULONG eip; APIRET rc; char Buff[256]; if (argc !=2) { printf("QEIP \n"); return 0; } /* endif */ eip = strtoul(argv[1],NULL,0); rc=DosQueryModFromEIP( hMod, ObjNum, sizeof(Buff), Buff, Offset, eip); if (rc!=0) { printf("DosQueryModFromEIP returned rc=%u\n",rc); return rc; } /* endif */ printf("\nLinear Address 0x%08x\n",eip); printf("%s\n",Buff); printf("handle 0x%04x\n",hMod); printf("Object 0x%08x\n",ObjNum); printf("Offset 0x%08x\n",Offset); return 0; }