Annotation of os2sdk/include/bsedos.h, revision 1.1.1.1

1.1       root        1: /***************************************************************************\
                      2: *
                      3: * Module Name: BSEDOS.H
                      4: *
                      5: * OS/2 Base Include File
                      6: *
                      7: * This file is compatible with OS/2 version 1.0.
                      8: *
                      9: * Copyright (c) 1988  Microsoft Corporation
                     10: *
                     11: *****************************************************************************
                     12: *
                     13: * Subcomponents marked with "+" are partially included by default
                     14: *
                     15: *   #define:                To include:
                     16: *
                     17: * + INCL_DOSPROCESS         Process and thread support
                     18: *   INCL_DOSINFOSEG         InfoSeg support
                     19: * + INCL_DOSFILEMGR         File Management
                     20: * + INCL_DOSMEMMGR          Memory Management
                     21: * + INCL_DOSSEMAPHORES      Semaphore support
                     22: * + INCL_DOSDATETIME        Date/Time and Timer support
                     23: *   INCL_DOSMODULEMGR       Module manager
                     24: * + INCL_DOSRESOURCES       Resource support
                     25: *   INCL_DOSNLS             National Language Support
                     26: *   INCL_DOSMISC            Miscellaneous
                     27: *   INCL_DOSSIGNALS         Signals
                     28: *   INCL_DOSMONITORS        Monitors
                     29: *   INCL_DOSQUEUES          Queues
                     30: *   INCL_DOSSESMGR          Session Manager Support
                     31: *
                     32: \***************************************************************************/
                     33: 
                     34: #define INCL_DOSINCLUDED
                     35: 
                     36: #ifdef INCL_DOS
                     37: 
                     38: #define INCL_DOSPROCESS
                     39: #define INCL_DOSINFOSEG
                     40: #define INCL_DOSFILEMGR
                     41: #define INCL_DOSMEMMGR
                     42: #define INCL_DOSMISC
                     43: #define INCL_DOSSEMAPHORES
                     44: #define INCL_DOSDATETIME
                     45: #define INCL_DOSMODULEMGR
                     46: #define INCL_DOSRESOURCES
                     47: #define INCL_DOSNLS
                     48: #define INCL_DOSSIGNALS
                     49: #define INCL_DOSMONITORS
                     50: #define INCL_DOSQUEUES
                     51: #define INCL_DOSSESMGR
                     52: 
                     53: #endif /* INCL_DOS */
                     54: 
                     55: #ifdef INCL_ERRORS
                     56: #define INCL_DOSERRORS
                     57: #endif /* INCL_ERRORS */
                     58: 
                     59: #if (defined(INCL_DOSPROCESS) | !defined(INCL_NOCOMMON))
                     60: 
                     61: /*** General services */
                     62: 
                     63: USHORT APIENTRY DosBeep(USHORT, USHORT);
                     64: 
                     65: /*** Process and Thread support */
                     66: 
                     67: VOID APIENTRY DosExit(USHORT, USHORT);
                     68: 
                     69: /* DosExit codes */
                     70: 
                     71: #define EXIT_THREAD         0
                     72: #define EXIT_PROCESS        1
                     73: 
                     74: #endif /* common INCL_DOSPROCESS stuff */
                     75: 
                     76: #ifdef INCL_DOSPROCESS
                     77: 
                     78: typedef struct _PIDINFO {         /* pidi */
                     79:     PID pid;
                     80:     TID tid;
                     81:     PID pidParent;
                     82: } PIDINFO;
                     83: typedef PIDINFO FAR *PPIDINFO;
                     84: 
                     85: USHORT APIENTRY DosCreateThread(VOID (FAR *)(VOID), PTID, PBYTE);
                     86: USHORT APIENTRY DosResumeThread(TID);
                     87: USHORT APIENTRY DosSuspendThread(TID);
                     88: 
                     89: /* Action code values */
                     90: 
                     91: #define DCWA_PROCESS        0
                     92: #define DCWA_PROCESSTREE    1
                     93: 
                     94: /* Wait option values */
                     95: 
                     96: #define DCWW_WAIT   0
                     97: #define DCWW_NOWAIT 1
                     98: 
                     99: typedef struct _RESULTCODES {     /* resc */
                    100:     USHORT codeTerminate;
                    101:     USHORT codeResult;
                    102: } RESULTCODES;
                    103: typedef RESULTCODES FAR *PRESULTCODES;
                    104: 
                    105: USHORT APIENTRY DosCWait(USHORT, USHORT, PRESULTCODES, PPID, PID);
                    106: USHORT APIENTRY DosSleep(ULONG);
                    107: 
                    108: /* codeTerminate values (also passed to ExitList routines) */
                    109: 
                    110: #define TC_EXIT          0
                    111: #define TC_HARDERROR     1
                    112: #define TC_TRAP          2
                    113: #define TC_KILLPROCESS   3
                    114: 
                    115: VOID   APIENTRY DosEnterCritSec(VOID);
                    116: VOID   APIENTRY DosExitCritSec(VOID);
                    117: USHORT APIENTRY DosExitList(USHORT, VOID (FAR *)(USHORT));
                    118: 
                    119: /* DosExitList functions */
                    120: 
                    121: #define EXLST_ADD       1
                    122: #define EXLST_REMOVE    2
                    123: #define EXLST_EXIT      3
                    124: 
                    125: USHORT APIENTRY DosExecPgm(PCHAR, USHORT, USHORT, PSZ, PSZ, PRESULTCODES, PSZ);
                    126: 
                    127: /* DosExecPgm functions */
                    128: 
                    129: #define EXEC_SYNC           0
                    130: #define EXEC_ASYNC          1
                    131: #define EXEC_ASYNCRESULT    2
                    132: #define EXEC_TRACE          3
                    133: #define EXEC_BACKGROUND     4
                    134: #define EXEC_LOAD           5
                    135: 
                    136: USHORT APIENTRY DosGetPid(PPIDINFO);
                    137: 
                    138: USHORT APIENTRY DosGetPrty(USHORT, PUSHORT, USHORT);
                    139: USHORT APIENTRY DosSetPrty(USHORT, USHORT, SHORT, USHORT);
                    140: 
                    141: /* Priority scopes */
                    142: 
                    143: #define PRTYS_PROCESS       0
                    144: #define PRTYS_PROCESSTREE   1
                    145: #define PRTYS_THREAD        2
                    146: 
                    147: /* Priority classes */
                    148: 
                    149: #define PRTYC_NOCHANGE      0
                    150: #define PRTYC_IDLETIME      1
                    151: #define PRTYC_REGULAR       2
                    152: #define PRTYC_TIMECRITICAL  3
                    153: 
                    154: USHORT APIENTRY DosKillProcess(USHORT, PID);
                    155: 
                    156: #define DKP_PROCESS         0
                    157: #define DKP_PROCESSTREE     1
                    158: 
                    159: #endif /* INCL_DOSPROCESS */
                    160: 
                    161: 
                    162: /*** InfoSeg support */
                    163: 
                    164: #ifdef INCL_DOSINFOSEG
                    165: 
                    166: /* Global Info Seg */
                    167: 
                    168: typedef struct _GINFOSEG {      /* gis */
                    169:     ULONG   time;
                    170:     ULONG   msecs;
                    171:     UCHAR   hour;
                    172:     UCHAR   minutes;
                    173:     UCHAR   seconds;
                    174:     UCHAR   hundredths;
                    175:     USHORT  timezone;
                    176:     USHORT  cusecTimerInterval;
                    177:     UCHAR   day;
                    178:     UCHAR   month;
                    179:     USHORT  year;
                    180:     UCHAR   weekday;
                    181:     UCHAR   uchMajorVersion;
                    182:     UCHAR   uchMinorVersion;
                    183:     UCHAR   chRevisionLetter;
                    184:     UCHAR   sgCurrent;
                    185:     UCHAR   sgMax;
                    186:     UCHAR   cHugeShift;
                    187:     UCHAR   fProtectModeOnly;
                    188:     USHORT  pidForeground;
                    189:     UCHAR   fDynamicSched;
                    190:     UCHAR   csecMaxWait;
                    191:     USHORT  cmsecMinSlice;
                    192:     USHORT  cmsecMaxSlice;
                    193:     USHORT  bootdrive;
                    194:     UCHAR   amecRAS[32];
                    195: } GINFOSEG;
                    196: typedef GINFOSEG FAR *PGINFOSEG;
                    197: 
                    198: /* Local Info Seg */
                    199: 
                    200: typedef struct _LINFOSEG {      /* lis */
                    201:     PID     pidCurrent;
                    202:     PID     pidParent;
                    203:     USHORT  prtyCurrent;
                    204:     TID     tidCurrent;
                    205:     USHORT  sgCurrent;
                    206:     USHORT  sgSub;
                    207:     BOOL    fForeground;
                    208: } LINFOSEG;
                    209: typedef LINFOSEG FAR *PLINFOSEG;
                    210: 
                    211: /* Process Type codes (local info seg typeProcess field) */
                    212: 
                    213: #define PT_FULLSCREEN       0
                    214: #define PT_REALMODE         1
                    215: #define PT_WINDOWABLEVIO    2
                    216: #define PT_PM               3
                    217: #define PT_DETACHED         4
                    218: 
                    219: USHORT APIENTRY DosGetInfoSeg(PSEL, PSEL);
                    220: 
                    221: /* Helper macros used to convert selector to PINFOSEG or LINFOSEG */
                    222: 
                    223: #define MAKEPGINFOSEG(sel)  ((PGINFOSEG)MAKEP(sel, 0))
                    224: #define MAKEPLINFOSEG(sel)  ((PLINFOSEG)MAKEP(sel, 0))
                    225: 
                    226: #endif /* INCL_DOSINFOSEG */
                    227: 
                    228: #if (defined(INCL_DOSFILEMGR) | !defined(INCL_NOCOMMON))
                    229: 
                    230: /*** File manager */
                    231: 
                    232: USHORT APIENTRY DosOpen(PSZ, PHFILE, PUSHORT, ULONG, USHORT, USHORT, USHORT, ULONG);
                    233: USHORT APIENTRY DosClose(HFILE);
                    234: USHORT APIENTRY DosRead(HFILE, PVOID, USHORT, PUSHORT);
                    235: USHORT APIENTRY DosWrite(HFILE, PVOID, USHORT, PUSHORT);
                    236: 
                    237: /* File time and date types */
                    238: 
                    239: typedef struct _FILESTATUS {    /* fsts */
                    240:     FDATE  fdateCreation;
                    241:     FTIME  ftimeCreation;
                    242:     FDATE  fdateLastAccess;
                    243:     FTIME  ftimeLastAccess;
                    244:     FDATE  fdateLastWrite;
                    245:     FTIME  ftimeLastWrite;
                    246:     ULONG  cbFile;
                    247:     ULONG  cbFileAlloc;
                    248:     USHORT attrFile;
                    249: } FILESTATUS;
                    250: typedef FILESTATUS FAR *PFILESTATUS;
                    251: 
                    252: typedef struct _FSALLOCATE {    /* fsalloc */
                    253:     ULONG  idFileSystem;
                    254:     ULONG  cSectorUnit;
                    255:     ULONG  cUnit;
                    256:     ULONG  cUnitAvail;
                    257:     USHORT cbSector;
                    258: } FSALLOCATE;
                    259: typedef FSALLOCATE FAR *PFSALLOCATE;
                    260: 
                    261: typedef SHANDLE HDIR;        /* hdir */
                    262: typedef HDIR FAR *PHDIR;
                    263: 
                    264: USHORT APIENTRY DosDelete(PSZ, ULONG);
                    265: USHORT APIENTRY DosDupHandle(HFILE, PHFILE);
                    266: 
                    267: USHORT APIENTRY DosQFHandState(HFILE, PUSHORT);
                    268: USHORT APIENTRY DosSetFHandState(HFILE, USHORT);
                    269: USHORT APIENTRY DosQHandType(HFILE, PUSHORT, PUSHORT);
                    270: 
                    271: USHORT APIENTRY DosReadAsync (HFILE, PULONG, PUSHORT, PVOID, USHORT, PUSHORT);
                    272: USHORT APIENTRY DosWriteAsync(HFILE, PULONG, PUSHORT, PVOID, USHORT, PUSHORT);
                    273: 
                    274: USHORT APIENTRY DosFindFirst(PSZ, PHDIR, USHORT, PFILEFINDBUF, USHORT, PUSHORT, ULONG);
                    275: USHORT APIENTRY DosFindNext(HDIR, PFILEFINDBUF, USHORT, PUSHORT);
                    276: USHORT APIENTRY DosFindClose(HDIR);
                    277: 
                    278: USHORT APIENTRY DosNewSize(HFILE, ULONG);
                    279: USHORT APIENTRY DosBufReset(HFILE);
                    280: 
                    281: USHORT APIENTRY DosChgFilePtr(HFILE, LONG, USHORT, PULONG);
                    282: 
                    283: USHORT APIENTRY DosFileLocks(HFILE, PLONG, PLONG);
                    284: 
                    285: USHORT APIENTRY DosMove(PSZ, PSZ, ULONG);
                    286: USHORT APIENTRY DosMkdir(PSZ, ULONG);
                    287: USHORT APIENTRY DosRmdir(PSZ, ULONG);
                    288: USHORT APIENTRY DosSelectDisk(USHORT);
                    289: USHORT APIENTRY DosQCurDisk(PUSHORT, PULONG);
                    290: 
                    291: USHORT APIENTRY DosChdir(PSZ, ULONG);
                    292: USHORT APIENTRY DosQCurDir(USHORT, PBYTE, PUSHORT);
                    293: 
                    294: USHORT APIENTRY DosQFSInfo(USHORT, USHORT, PBYTE, USHORT);
                    295: USHORT APIENTRY DosSetFSInfo(USHORT, USHORT, PBYTE, USHORT);
                    296: USHORT APIENTRY DosQVerify(PUSHORT);
                    297: USHORT APIENTRY DosSetVerify(USHORT);
                    298: USHORT APIENTRY DosSetMaxFH(USHORT);
                    299: 
                    300: USHORT APIENTRY DosQFileInfo(HFILE, USHORT, PFILESTATUS, USHORT);
                    301: USHORT APIENTRY DosSetFileInfo(HFILE, USHORT, PFILESTATUS, USHORT);
                    302: 
                    303: USHORT APIENTRY DosQFileMode(PSZ, PUSHORT, ULONG);
                    304: USHORT APIENTRY DosSetFileMode(PSZ, USHORT, ULONG);
                    305: 
                    306: #endif /* common INCL_DOSFILEMGR */
                    307: 
                    308: #if (defined(INCL_DOSMEMMGR) | !defined(INCL_NOCOMMON))
                    309: /*** Memory management */
                    310: 
                    311: USHORT APIENTRY DosAllocSeg(USHORT, PSEL, USHORT);
                    312: USHORT APIENTRY DosReallocSeg(USHORT, SEL);
                    313: USHORT APIENTRY DosFreeSeg(SEL);
                    314: USHORT APIENTRY DosGiveSeg(SEL, PID, PSEL);
                    315: USHORT APIENTRY DosGetSeg(SEL);
                    316: 
                    317: /* Segment attribute flags (used with DosAllocSeg) */
                    318: 
                    319: #define SEG_GIVEABLE        0x0001
                    320: #define SEG_GETTABLE        0x0002
                    321: #define SEG_DISCARDABLE     0x0004
                    322: 
                    323: #endif /* common INCL_DOSMEMMGR */
                    324: 
                    325: #ifdef INCL_DOSMEMMGR
                    326: 
                    327: USHORT APIENTRY DosAllocHuge(USHORT, USHORT, PSEL, USHORT, USHORT);
                    328: USHORT APIENTRY DosReallocHuge(USHORT, USHORT, SEL);
                    329: USHORT APIENTRY DosGetHugeShift(PUSHORT);
                    330: 
                    331: USHORT APIENTRY DosAllocShrSeg(USHORT, PSZ, PSEL);
                    332: 
                    333: USHORT APIENTRY DosLockSeg(SEL);
                    334: USHORT APIENTRY DosUnlockSeg(SEL);
                    335: 
                    336: USHORT APIENTRY DosGetShrSeg(PSZ, PSEL);
                    337: 
                    338: USHORT APIENTRY DosMemAvail(PULONG);
                    339: USHORT APIENTRY DosCreateCSAlias(SEL, PSEL);
                    340: 
                    341: USHORT APIENTRY DosSubAlloc(SEL, PUSHORT, USHORT);
                    342: USHORT APIENTRY DosSubFree(SEL, USHORT, USHORT);
                    343: USHORT APIENTRY DosSubSet(SEL, USHORT, USHORT);
                    344: 
                    345: #endif /* INCL_DOSMEMMGR */
                    346: 
                    347: #if (defined(INCL_DOSSEMAPHORES) | !defined(INCL_NOCOMMON))
                    348: 
                    349: /*** Semaphore support */
                    350: 
                    351: USHORT APIENTRY DosSemClear(HSEM);
                    352: USHORT APIENTRY DosSemSet(HSEM);
                    353: USHORT APIENTRY DosSemWait(HSEM, LONG);
                    354: USHORT APIENTRY DosSemSetWait(HSEM, LONG);
                    355: USHORT APIENTRY DosSemRequest(HSEM, LONG);
                    356: 
                    357: #endif /* common INCL_DOSSEMAPHORES */
                    358: 
                    359: #ifdef INCL_DOSSEMAPHORES
                    360: 
                    361: typedef LHANDLE HSYSSEM;          /* hssm */
                    362: typedef HSYSSEM FAR *PHSYSSEM;
                    363: 
                    364: USHORT APIENTRY DosCreateSem(USHORT, PHSYSSEM, PSZ);
                    365: 
                    366: #define CSEM_PRIVATE    0
                    367: #define CSEM_PUBLIC     1
                    368: 
                    369: USHORT APIENTRY DosOpenSem(PHSEM, PSZ);
                    370: USHORT APIENTRY DosCloseSem(HSEM);
                    371: 
                    372: typedef struct _MUXSEM {        /* mxs */
                    373:     USHORT zero;
                    374:     HSEM   hsem;
                    375: } MUXSEM;
                    376: typedef MUXSEM FAR *PMUXSEM;
                    377: 
                    378: typedef struct _MUXSEMLIST {    /* mxsl */
                    379:     USHORT  cmxs;
                    380:     MUXSEM  amxs[16];
                    381: } MUXSEMLIST;
                    382: typedef MUXSEMLIST FAR *PMUXSEMLIST;
                    383: 
                    384: /*
                    385:  * Since a MUXSEMLIST structure is actually a variable length
                    386:  * structure, the following macro may be used to define a MUXSEMLIST
                    387:  * structure having size elements, named "name".
                    388:  */
                    389: #define DEFINEMUXSEMLIST(name, size) \
                    390:     struct {                         \
                    391:         USHORT cmxs;                 \
                    392:         MUXSEM amxs[size];           \
                    393:     } name;
                    394: 
                    395: /*
                    396:  * This function actually takes a far pointer to a MUXSEMLIST structure
                    397:  * as its second parameter, but in order to allow its use with the
                    398:  * DEFINEMUXSEMLIST macro, it is declared here as PVOID.
                    399:  */
                    400: USHORT APIENTRY DosMuxSemWait(PUSHORT, PVOID, LONG);
                    401: 
                    402: #endif /* INCL_DOSSEMAPHORES */
                    403: 
                    404: #if (defined(INCL_DOSDATETIME) | !defined(INCL_NOCOMMON))
                    405: 
                    406: /*** Time support */
                    407: 
                    408: typedef struct _DATETIME {    /* date */
                    409:     UCHAR   hours;
                    410:     UCHAR   minutes;
                    411:     UCHAR   seconds;
                    412:     UCHAR   hundredths;
                    413:     UCHAR   day;
                    414:     UCHAR   month;
                    415:     USHORT  year;
                    416:     SHORT   timezone;
                    417:     UCHAR   weekday;
                    418: } DATETIME;
                    419: typedef DATETIME FAR *PDATETIME;
                    420: 
                    421: USHORT APIENTRY DosGetDateTime(PDATETIME);
                    422: USHORT APIENTRY DosSetDateTime(PDATETIME);
                    423: 
                    424: #endif /* common INCL_DOSDATETIME */
                    425: 
                    426: #ifdef INCL_DOSDATETIME
                    427: 
                    428: typedef SHANDLE HTIMER;
                    429: typedef HTIMER FAR *PHTIMER;
                    430: 
                    431: USHORT APIENTRY DosTimerAsync(ULONG, HSEM, PHTIMER);
                    432: USHORT APIENTRY DosTimerStart(ULONG, HSEM, PHTIMER);
                    433: USHORT APIENTRY DosTimerStop(HTIMER);
                    434: 
                    435: #endif /* INCL_DOSDATETIME */
                    436: 
                    437: 
                    438: /*** Module manager */
                    439: 
                    440: #ifdef INCL_DOSMODULEMGR
                    441: 
                    442: USHORT APIENTRY DosLoadModule(PSZ, USHORT, PSZ, PHMODULE);
                    443: USHORT APIENTRY DosFreeModule(HMODULE);
                    444: USHORT APIENTRY DosGetProcAddr(HMODULE, PSZ, PPFN);
                    445: USHORT APIENTRY DosGetModHandle(PSZ, PHMODULE);
                    446: USHORT APIENTRY DosGetModName(HMODULE, USHORT, PCHAR);
                    447: 
                    448: #endif /* INCL_DOSMODULEMGR */
                    449: 
                    450: 
                    451: /*** NLS Support */
                    452: 
                    453: #ifdef INCL_DOSNLS
                    454: 
                    455: typedef struct _COUNTRYCODE { /* ctryc */
                    456:     USHORT country;
                    457:     USHORT codepage;
                    458: } COUNTRYCODE;
                    459: typedef COUNTRYCODE FAR *PCOUNTRYCODE;
                    460: 
                    461: typedef struct _COUNTRYINFO { /* ctryi */
                    462:     USHORT country;
                    463:     USHORT codepage;
                    464:     USHORT fsDateFmt;
                    465:     CHAR   szCurrency[5];
                    466:     CHAR   szThousandsSeparator[2];
                    467:     CHAR   szDecimal[2];
                    468:     CHAR   szDateSeparator[2];
                    469:     CHAR   szTimeSeparator[2];
                    470:     UCHAR  fsCurrencyFmt;
                    471:     UCHAR  cDecimalPlace;
                    472:     UCHAR  fsTimeFmt;
                    473:     USHORT abReserved1[2];
                    474:     CHAR   szDataSeparator[2];
                    475:     USHORT abReserved2[5];
                    476: } COUNTRYINFO;
                    477: typedef COUNTRYINFO FAR *PCOUNTRYINFO;
                    478: 
                    479: USHORT APIENTRY DosGetCtryInfo(USHORT, PCOUNTRYCODE, PCOUNTRYINFO, PUSHORT);
                    480: USHORT APIENTRY DosGetDBCSEv(USHORT, PCOUNTRYCODE, PCHAR);
                    481: USHORT APIENTRY DosCaseMap(USHORT, PCOUNTRYCODE, PCHAR);
                    482: USHORT APIENTRY DosGetCollate(USHORT, PCOUNTRYCODE, PCHAR, PUSHORT);
                    483: USHORT APIENTRY DosGetCp(USHORT, PUSHORT, PUSHORT);
                    484: USHORT APIENTRY DosSetCp(USHORT, USHORT);
                    485: 
                    486: #endif /* INCL_DOSNLS */
                    487: 
                    488: 
                    489: /*** Signal support */
                    490: 
                    491: #ifdef INCL_DOSSIGNALS
                    492: 
                    493: /* Signal Numbers for DosSetSigHandler  */
                    494: 
                    495: #define SIG_CTRLC           1       /* Control C            */
                    496: #define SIG_BROKENPIPE      2       /* Broken Pipe          */
                    497: #define SIG_KILLPROCESS     3       /* Program Termination  */
                    498: #define SIG_CTRLBREAK       4       /* Control Break        */
                    499: #define SIG_PFLG_A          5       /* Process Flag A       */
                    500: #define SIG_PFLG_B          6       /* Process Flag B       */
                    501: #define SIG_PFLG_C          7       /* Process Flag C       */
                    502: #define SIG_CSIGNALS        8       /* number of signals plus one */
                    503: 
                    504: /* Flag Numbers for DosFlagProcess      */
                    505: 
                    506: #define PFLG_A              0       /* Process Flag A       */
                    507: #define PFLG_B              1       /* Process Flag B       */
                    508: #define PFLG_C              2       /* Process Flag C       */
                    509: 
                    510: /* Signal actions */
                    511: 
                    512: #define SIGA_KILL           0
                    513: #define SIGA_IGNORE         1
                    514: #define SIGA_ACCEPT         2
                    515: #define SIGA_ERROR          3
                    516: #define SIGA_ACKNOWLEDGE    4
                    517: 
                    518: /* DosHoldSignal constants */
                    519: 
                    520: #define HLDSIG_ENABLE       0
                    521: #define HLDSIG_DISABLE      1
                    522: 
                    523: /* DosFlagProcess codes */
                    524: 
                    525: #define FLGP_SUBTREE        0
                    526: #define FLGP_PID            1
                    527: 
                    528: typedef VOID (FAR PASCAL *PFNSIGHANDLER)(USHORT, USHORT);
                    529: 
                    530: USHORT APIENTRY DosSetSigHandler(PFNSIGHANDLER, PFNSIGHANDLER FAR *, PUSHORT, USHORT, USHORT);
                    531: USHORT APIENTRY DosFlagProcess(PID, USHORT, USHORT, USHORT);
                    532: USHORT APIENTRY DosHoldSignal(USHORT);
                    533: USHORT APIENTRY DosSendSignal(USHORT, USHORT);
                    534: 
                    535: #endif /* INCL_DOSSIGNALS */
                    536: 
                    537: 
                    538: /*** Monitor support */
                    539: 
                    540: #ifdef INCL_DOSMONITORS
                    541: 
                    542: typedef SHANDLE HMONITOR;    /* hmon */
                    543: typedef HMONITOR FAR *PHMONITOR;
                    544: 
                    545: USHORT APIENTRY DosMonOpen(PSZ, PHMONITOR);
                    546: USHORT APIENTRY DosMonClose(HMONITOR);
                    547: USHORT APIENTRY DosMonReg(HMONITOR, PBYTE, PBYTE, USHORT, USHORT);
                    548: USHORT APIENTRY DosMonRead(PBYTE, USHORT, PBYTE, PUSHORT);
                    549: USHORT APIENTRY DosMonWrite(PBYTE, PBYTE, USHORT);
                    550: 
                    551: #endif /* INCL_DOSMONITORS */
                    552: 
                    553: 
                    554: /*** Pipe and queue support */
                    555: 
                    556: #ifdef INCL_DOSQUEUES
                    557: 
                    558: typedef SHANDLE HQUEUE;  /* hq */
                    559: typedef HQUEUE FAR *PHQUEUE;
                    560: 
                    561: USHORT APIENTRY DosMakePipe(PHFILE, PHFILE, USHORT);
                    562: USHORT APIENTRY DosCloseQueue(HQUEUE);
                    563: USHORT APIENTRY DosCreateQueue(PHQUEUE, USHORT, PSZ);
                    564: USHORT APIENTRY DosOpenQueue(PUSHORT, PHQUEUE, PSZ);
                    565: USHORT APIENTRY DosPeekQueue(HQUEUE, PULONG, PUSHORT, PULONG, PUSHORT, USHORT, PBYTE, HSEM);
                    566: USHORT APIENTRY DosPurgeQueue(HQUEUE);
                    567: USHORT APIENTRY DosQueryQueue(HQUEUE, PUSHORT);
                    568: USHORT APIENTRY DosReadQueue(HQUEUE, PULONG, PUSHORT, PULONG, USHORT, USHORT, PBYTE, HSEM);
                    569: USHORT APIENTRY DosWriteQueue(HQUEUE, USHORT, USHORT, PBYTE, USHORT);
                    570: 
                    571: #endif /* INCL_DOSQUEUES */
                    572: 
                    573: 
                    574: /*** Miscellaneous functions */
                    575: 
                    576: #ifdef INCL_DOSMISC
                    577: 
                    578: USHORT APIENTRY DosError(USHORT);
                    579: USHORT APIENTRY DosSetVec(USHORT, PFN, PPFN);
                    580: USHORT APIENTRY DosGetMessage(PCHAR FAR *, USHORT, PCHAR, USHORT, USHORT, PSZ, PUSHORT);
                    581: USHORT APIENTRY DosErrClass(USHORT, PUSHORT, PUSHORT, PUSHORT);
                    582: USHORT APIENTRY DosInsMessage(PCHAR FAR *, USHORT, PSZ, USHORT, PCHAR, USHORT, PUSHORT);
                    583: USHORT APIENTRY DosPutMessage(HFILE, USHORT, PCHAR);
                    584: USHORT APIENTRY DosGetEnv(PUSHORT, PUSHORT);
                    585: USHORT APIENTRY DosScanEnv(PSZ, PSZ  FAR *);
                    586: USHORT APIENTRY DosSearchPath(USHORT, PSZ, PSZ, PBYTE, USHORT);
                    587: USHORT APIENTRY DosGetVersion(PUSHORT);
                    588: USHORT APIENTRY DosGetMachineMode(PBYTE);
                    589: 
                    590: #endif /* INCL_DOSMISC */
                    591: 
                    592: 
                    593: /*** Session manager support */
                    594: 
                    595: #ifdef INCL_DOSSESMGR
                    596: 
                    597: typedef struct _STARTDATA {   /* stdata */
                    598:     USHORT cb;
                    599:     USHORT Related;
                    600:     USHORT FgBg;
                    601:     USHORT TraceOpt;
                    602:     PSZ    PgmTitle;
                    603:     PSZ    PgmName;
                    604:     PBYTE  PgmInputs;
                    605:     PBYTE  TermQ;
                    606: } STARTDATA;
                    607: typedef STARTDATA FAR *PSTARTDATA;
                    608: 
                    609: typedef struct _STATUSDATA { /* stsdata */
                    610:     USHORT cb;
                    611:     USHORT SelectInd;
                    612:     USHORT BindInd;
                    613: } STATUSDATA;
                    614: typedef STATUSDATA FAR *PSTATUSDATA;
                    615: 
                    616: USHORT APIENTRY DosStartSession(PSTARTDATA, PUSHORT, PUSHORT);
                    617: USHORT APIENTRY DosSetSession(USHORT, PSTATUSDATA);
                    618: USHORT APIENTRY DosSelectSession(USHORT, ULONG);
                    619: USHORT APIENTRY DosStopSession(USHORT, USHORT, ULONG);
                    620: 
                    621: #endif /* INCL_DOSSESMGR */
                    622: 
                    623: 
                    624: /*** Device support */
                    625: 
                    626: #ifdef INCL_DOSDEVICES
                    627: 
                    628: USHORT APIENTRY DosDevConfig(PVOID, USHORT, USHORT);
                    629: USHORT APIENTRY DosDevIOCtl(PVOID, PVOID, USHORT, USHORT, USHORT);
                    630: USHORT APIENTRY DosSystemService(USHORT, PVOID, PVOID);
                    631: 
                    632: USHORT APIENTRY DosCLIAccess(VOID);
                    633: USHORT APIENTRY DosPortAccess(USHORT, USHORT, USHORT, USHORT);
                    634: USHORT APIENTRY DosPhysicalDisk(USHORT, PBYTE, USHORT, PBYTE, USHORT);
                    635: 
                    636: #endif /* INCL_DOSDEVICES */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.