home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
FHEXP.ZIP
/
ARGS.C
next >
Wrap
Text File
|
1992-11-22
|
925b
|
38 lines
/* this program displays the arguments passed to it */
/* Author: LaVern R. Ogden */
/* Date: 11/22/92 */
#define INCL_DOSFILEMGR
#include <os2.h>
#include <stdio.h>
void main(int argc, char *argv[]) {
int index;
LONG ReqCount; /* number to add to maximum handle count */
ULONG CurMaxFH; /* new count of handles */
APIRET rc; /* return code */
printf("Argument count is %d\n",argc);
for (index=1;index<argc;index++) {
printf("Argument %d is %s\n",index,argv[index]);
}
ReqCount=0;
rc=DosSetRelMaxFH(&ReqCount,&CurMaxFH);
/* on successful return, the CurMaxFH */
/* variable will contain the total */
/* number of allocated file handles */
/* for this process */
if (rc!=0) {
printf("DosSetRelMaxFH error: return code = %ld",rc);
return;
}
printf("Number of available handles: %d\n",CurMaxFH);
}