Purpose
DosVerifyPidTid validates a PID/TID pair. If the thread and process exist, then a zero return code is set; otherwise the return code indicates whether the thread or the process is invalid.
Syntax
#define INCL_DOSMISC #include os2.h>
APIRET APIENTRY DosVerifyPidTid
Parameters
pid (PID) input
Returns
ulrc (APIRET) returns
DosVerifyPidTid returns one of the following values
303
Related Functions
Example Code
int main(int argc, char *argv[], char *envp[]){ PID pid=0; TID tid=1; int i; APIRET rc; if (argc 2) { printf("VPIDTID /P=pid [/T=tid]\n"); return; } /* endif */ for (i=1; i(argc ;++i ) { if (strnicmp (argv[i],"/P=",3)==0) pid=strtoul (argv[i]+3, NULL,16); else if (strnicmp (argv[i],"/T=",3)==0) tid=strtoul (argv[i]+3, NULL,16); } /* endfor */ if (pid == 0) { printf("VPIDTID /P=pid [/T=tid\n"); return; } /* endif */ rc=DosVerifyPidTid (pid,tid); printf("Verify pid=0x%04x tid=0x%04x rc=%u\n", pid,tid,rc); return 0; }