Purpose
Dos16QueryModFromCS queries the name, segment, and handle that corresponds to a 16 bit selector. It takes a selector as a parameter and returns information about the module (a protect mode application currently executing) owning that selector.
Syntax
#define INCL_DOSMODULEMGR #include os2.h>
APIRET16 APIENTRY16 Dos16QueryModFromCS
Parameters
sel (SEL) input
typedef struct_QMRESULT{USHORT seg; USHORT htme; char name[256]; } QMRESULT; typedef QMRESULT*PQMRESULT;
Returns
ulrc (APIRET) returns
Dos16QueryModFromCS returns one of the following values
87
Related Functions
Example Code
int main(int argc, char *argv[], char *envp[]){ SEL sel=0; QMRESULT qmresult; APIRET16 rc; if (argc!=2) { printf("QMODCS sel\n"); return; } /* endif */ sel=(SEL)strtoul(argv[1],NULL,16); rc=Dos16QueryModFromCS(sel, qmresult); if (rc != 0) { printf("DosQueryModFromCS returned rc=%u\n",rc); return rc; } /* endif */ printf("Sel=0x%04x Handle=0x%04x Segment=0x%04x %s\n", sel,qmresult.hmte,qmresult.seg,qmresult.name); return 0; }