|
|
1.1 ! root 1: /*static char *SCCSID = "@(#)bsedos16.h 1.29 90/04/20";*/ ! 2: /***************************************************************************\ ! 3: * ! 4: * Module Name: BSEDOS16.H ! 5: * ! 6: * OS/2 Base Include File for 16-bit API ! 7: * ! 8: * Copyright (c) International Business Machines Corporation 1987 ! 9: * Copyright (c) Microsoft Corporation 1987 ! 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_DOSSIGNALS Signals ! 27: * INCL_DOSMISC Miscellaneous ! 28: * INCL_DOSMONITORS Monitors ! 29: * INCL_DOSQUEUES Queues ! 30: * INCL_DOSSESMGR Session Manager Support ! 31: * INCL_DOSDEVICES Device specific, ring 2 support ! 32: * INCL_DOSNMPIPES Named Pipes Support ! 33: * INCL_DOSPROFILE DosProfile API ! 34: * INCL_DOSMVDM MVDM support ! 35: * ! 36: * ! 37: \***************************************************************************/ ! 38: ! 39: #define INCL_DOSINCLUDED ! 40: ! 41: #ifndef INCL_BASEINCLUDED ! 42: #if !(defined(INCL_32) || defined(INCL_16)) ! 43: #ifdef M_I386 ! 44: #define INCL_32 ! 45: #else /* not M_I386 */ ! 46: #define INCL_16 ! 47: #endif /* M_I386 */ ! 48: #endif /* INCL_32 || INCL_16 */ ! 49: ! 50: #if !defined(INCL_16) ! 51: #pragma message ("16-bit Base API included when using 32-bit compiler") ! 52: #endif /* INCL_32 */ ! 53: #endif /* INCL_BASEINCLUDED */ ! 54: ! 55: #ifdef INCL_DOS ! 56: ! 57: #define INCL_DOSPROCESS ! 58: #define INCL_DOSINFOSEG ! 59: #define INCL_DOSFILEMGR ! 60: #define INCL_DOSMEMMGR ! 61: #define INCL_DOSSEMAPHORES ! 62: #define INCL_DOSDATETIME ! 63: #define INCL_DOSMODULEMGR ! 64: #define INCL_DOSRESOURCES ! 65: #define INCL_DOSNLS ! 66: #define INCL_DOSSIGNALS ! 67: #define INCL_DOSMISC ! 68: #define INCL_DOSMONITORS ! 69: #define INCL_DOSQUEUES ! 70: #define INCL_DOSSESMGR ! 71: #define INCL_DOSDEVICES ! 72: #define INCL_DOSNMPIPES ! 73: #define INCL_DOSPROFILE ! 74: #define INCL_DOSMVDM ! 75: ! 76: #endif /* INCL_DOS */ ! 77: ! 78: #ifdef INCL_ERRORS ! 79: #define INCL_DOSERRORS ! 80: #endif /* INCL_ERRORS */ ! 81: ! 82: #if (defined(INCL_DOSPROCESS) || !defined(INCL_NOCOMMON)) ! 83: ! 84: /* XLATOFF */ ! 85: #ifndef INCL_NOXLATE_DOS16 ! 86: #define DosBeep Dos16Beep ! 87: #define DosExit Dos16Exit ! 88: #endif /* INCL_NOXLATE_DOS16 */ ! 89: /* XLATON */ ! 90: ! 91: /*** General services */ ! 92: ! 93: APIRET APIENTRY DosBeep(USHORT usFrequency, USHORT usDuration); ! 94: ! 95: /*** Process and Thread support */ ! 96: ! 97: VOID APIENTRY DosExit(USHORT fTerminate, USHORT usExitCode); ! 98: ! 99: /* DosExit codes */ ! 100: #define EXIT_THREAD 0 ! 101: #define EXIT_PROCESS 1 ! 102: ! 103: #endif /* common INCL_DOSPROCESS definitions */ ! 104: ! 105: #ifdef INCL_DOSPROCESS ! 106: ! 107: typedef struct _PIDINFO { /* pidi */ ! 108: PID pid; ! 109: TID tid; ! 110: PID pidParent; ! 111: } PIDINFO; ! 112: typedef PIDINFO FAR *PPIDINFO; ! 113: ! 114: #ifdef M_I386 ! 115: typedef VOID (*PFNTHREAD)(VOID); /* doesn't need to be PASCAL, */ ! 116: /* since it takes no parameters */ ! 117: #else /* not M_I386 */ ! 118: typedef VOID (FAR *PFNTHREAD)(VOID); /* doesn't need to be PASCAL, */ ! 119: /* since it takes no parameters */ ! 120: #endif /* M_I386 */ ! 121: ! 122: /* XLATOFF */ ! 123: #ifndef INCL_NOXLATE_DOS16 ! 124: #define DosCreateThread Dos16CreateThread ! 125: #define DosResumeThread Dos16ResumeThread ! 126: #define DosSuspendThread Dos16SuspendThread ! 127: #define DosCwait Dos16Cwait ! 128: #define DosSleep Dos16Sleep ! 129: #define DosExecPgm Dos16ExecPgm ! 130: #define DosEnterCritSec Dos16EnterCritSec ! 131: #define DosExitCritSec Dos16ExitCritSec ! 132: #define DosExitList Dos16ExitList ! 133: #define DosGetPrty Dos16GetPrty ! 134: #define DosSetPrty Dos16SetPrty ! 135: #define DosGetPID Dos16GetPID ! 136: #define DosGetPPID Dos16GetPPID ! 137: #define DosKillProcess Dos16KillProcess ! 138: #endif /* INCL_NOXLATE_DOS16 */ ! 139: /* XLATON */ ! 140: ! 141: APIRET APIENTRY DosCreateThread(PFNTHREAD pfnFun, PTID pTid, PBYTE pbStack); ! 142: APIRET APIENTRY DosResumeThread(TID tid); ! 143: APIRET APIENTRY DosSuspendThread(TID tid); ! 144: ! 145: /* Action code values */ ! 146: #define DCWA_PROCESS 0 ! 147: #define DCWA_PROCESSTREE 1 ! 148: ! 149: /* Wait option values */ ! 150: #define DCWW_WAIT 0 ! 151: #define DCWW_NOWAIT 1 ! 152: ! 153: typedef struct _RESULTCODES { /* resc */ ! 154: USHORT codeTerminate; ! 155: USHORT codeResult; ! 156: } RESULTCODES; ! 157: typedef RESULTCODES FAR *PRESULTCODES; ! 158: ! 159: APIRET APIENTRY DosCwait(USHORT fScope, USHORT fWait, PRESULTCODES prescResults, ! 160: PPID ppidProcess, PID pidWaitProcess); ! 161: APIRET APIENTRY DosSleep(ULONG ulTime); ! 162: ! 163: /* codeTerminate values (also passed to ExitList routines) */ ! 164: #define TC_EXIT 0 ! 165: #define TC_HARDERROR 1 ! 166: #define TC_TRAP 2 ! 167: #define TC_KILLPROCESS 3 ! 168: ! 169: typedef VOID (PASCAL FAR *PFNEXITLIST)(USHORT); ! 170: ! 171: APIRET APIENTRY DosEnterCritSec(VOID); ! 172: APIRET APIENTRY DosExitCritSec(VOID); ! 173: APIRET APIENTRY DosExitList(USHORT fFnCode, PFNEXITLIST pfnFunction); ! 174: ! 175: /* DosExitList functions */ ! 176: #define EXLST_ADD 1 ! 177: #define EXLST_REMOVE 2 ! 178: #define EXLST_EXIT 3 ! 179: ! 180: APIRET APIENTRY DosExecPgm(PCHAR pchFailName, SHORT cbFailName, ! 181: USHORT fExecFlags, PSZ pszArgs, PSZ pszEnv, ! 182: PRESULTCODES prescResults, PSZ pszPgmName); ! 183: ! 184: /* DosExecPgm functions */ ! 185: #define EXEC_SYNC 0 ! 186: #define EXEC_ASYNC 1 ! 187: #define EXEC_ASYNCRESULT 2 ! 188: #define EXEC_TRACE 3 ! 189: #define EXEC_BACKGROUND 4 ! 190: #define EXEC_LOAD 5 ! 191: ! 192: APIRET APIENTRY DosGetPID(PPIDINFO ppidInfo); ! 193: APIRET APIENTRY DosGetPPID(USHORT pidChild, PUSHORT ppidParent); ! 194: ! 195: APIRET APIENTRY DosGetPrty(USHORT usScope, PUSHORT pusPriority, USHORT pid); ! 196: APIRET APIENTRY DosSetPrty(USHORT usScope, USHORT fPrtyClass, SHORT sChange, ! 197: USHORT id); ! 198: ! 199: /* Priority scopes */ ! 200: #define PRTYS_PROCESS 0 ! 201: #define PRTYS_PROCESSTREE 1 ! 202: #define PRTYS_THREAD 2 ! 203: ! 204: /* Priority classes */ ! 205: #define PRTYC_NOCHANGE 0 ! 206: #define PRTYC_IDLETIME 1 ! 207: #define PRTYC_REGULAR 2 ! 208: #define PRTYC_TIMECRITICAL 3 ! 209: #define PRTYC_FOREGROUNDSERVER 4 ! 210: ! 211: /* Priority deltas */ ! 212: #define PRTYD_MINIMUM -31 ! 213: #define PRTYD_MAXIMUM 31 ! 214: ! 215: APIRET APIENTRY DosKillProcess(USHORT usScope, PID pidProcess); ! 216: ! 217: #define DKP_PROCESSTREE 0 ! 218: #define DKP_PROCESS 1 ! 219: ! 220: #endif /* INCL_DOSPROCESS */ ! 221: ! 222: ! 223: /*** InfoSeg support */ ! 224: ! 225: #ifdef INCL_DOSINFOSEG ! 226: ! 227: /* Global Information Segment */ ! 228: ! 229: typedef struct _GINFOSEG { /* gis */ ! 230: ULONG time; ! 231: ULONG msecs; ! 232: UCHAR hour; ! 233: UCHAR minutes; ! 234: UCHAR seconds; ! 235: UCHAR hundredths; ! 236: USHORT timezone; ! 237: USHORT cusecTimerInterval; ! 238: UCHAR day; ! 239: UCHAR month; ! 240: USHORT year; ! 241: UCHAR weekday; ! 242: UCHAR uchMajorVersion; ! 243: UCHAR uchMinorVersion; ! 244: UCHAR chRevisionLetter; ! 245: UCHAR sgCurrent; ! 246: UCHAR sgMax; ! 247: UCHAR cHugeShift; ! 248: UCHAR fProtectModeOnly; ! 249: USHORT pidForeground; ! 250: UCHAR fDynamicSched; ! 251: UCHAR csecMaxWait; ! 252: USHORT cmsecMinSlice; ! 253: USHORT cmsecMaxSlice; ! 254: USHORT bootdrive; ! 255: UCHAR amecRAS[32]; ! 256: UCHAR csgWindowableVioMax; ! 257: UCHAR csgPMMax; ! 258: } GINFOSEG; ! 259: typedef GINFOSEG FAR *PGINFOSEG; ! 260: ! 261: /* Local Information Segment */ ! 262: ! 263: typedef struct _LINFOSEG { /* lis */ ! 264: PID pidCurrent; ! 265: PID pidParent; ! 266: USHORT prtyCurrent; ! 267: TID tidCurrent; ! 268: USHORT sgCurrent; ! 269: UCHAR rfProcStatus; ! 270: UCHAR dummy1; ! 271: BOOL fForeground; ! 272: UCHAR typeProcess; ! 273: UCHAR dummy2; ! 274: SEL selEnvironment; ! 275: USHORT offCmdLine; ! 276: USHORT cbDataSegment; ! 277: USHORT cbStack; ! 278: USHORT cbHeap; ! 279: HMODULE hmod; ! 280: SEL selDS; ! 281: } LINFOSEG; ! 282: typedef LINFOSEG FAR *PLINFOSEG; ! 283: ! 284: /* Process Type codes (local information segment typeProcess field) */ ! 285: ! 286: #define PT_FULLSCREEN 0 /* Full screen application */ ! 287: #define PT_REALMODE 1 /* Real mode process */ ! 288: #define PT_WINDOWABLEVIO 2 /* VIO windowable application */ ! 289: #define PT_PM 3 /* Presentation Manager application */ ! 290: #define PT_DETACHED 4 /* Detached application */ ! 291: ! 292: /* Process Status Flag definitions (local info seg rfProcStatus field) */ ! 293: ! 294: #define PS_EXITLIST 1 /* Thread is in exitlist routine */ ! 295: ! 296: ! 297: /* XLATOFF */ ! 298: #ifndef INCL_NOXLATE_DOS16 ! 299: #define DosGetInfoSeg Dos16GetInfoSeg ! 300: #endif /* INCL_NOXLATE_DOS16 */ ! 301: /* XLATON */ ! 302: ! 303: APIRET APIENTRY DosGetInfoSeg(PSEL pselGlobal, PSEL pselLocal); ! 304: ! 305: /* Helper macros used to convert selector to PINFOSEG or LINFOSEG */ ! 306: ! 307: #define MAKEPGINFOSEG(sel) ((PGINFOSEG)MAKEP(sel, 0)) ! 308: #define MAKEPLINFOSEG(sel) ((PLINFOSEG)MAKEP(sel, 0)) ! 309: ! 310: #endif /* INCL_DOSINFOSEG */ ! 311: ! 312: #ifndef INCL_SAADEFS ! 313: ! 314: /* ! 315: * CCHMAXPATH is the maximum fully qualified path name length including ! 316: * the drive letter, colon, backslashes and terminating NULL. ! 317: */ ! 318: #define CCHMAXPATH 260 ! 319: ! 320: /* ! 321: * CCHMAXPATHCOMP is the maximum individual path component name length ! 322: * including a terminating NULL. ! 323: */ ! 324: #define CCHMAXPATHCOMP 256 ! 325: ! 326: #endif /* !INCL_SAADEFS */ ! 327: ! 328: #if (defined(INCL_DOSFILEMGR) || !defined(INCL_NOCOMMON)) ! 329: ! 330: /*** File manager */ ! 331: ! 332: /* DosSetFilePtr() file position codes */ ! 333: ! 334: #define FILE_BEGIN 0x0000 /* relative to beginning of file */ ! 335: #define FILE_CURRENT 0x0001 /* relative to current fptr position*/ ! 336: #define FILE_END 0x0002 /* relative to end of file */ ! 337: ! 338: /* DosFindFirst/Next Directory handle types */ ! 339: ! 340: #define HDIR_SYSTEM 1 /* Use system handle (1) */ ! 341: #define HDIR_CREATE (-1) /* Allocate a new, unused handle */ ! 342: ! 343: /* DosCopy control bits - may be or'ed together */ ! 344: #define DCPY_EXISTING 0x00001 /* Copy even if target exists */ ! 345: #define DCPY_APPEND 0x00002 /* Append to existing file, don't replace*/ ! 346: #define DCPY_FAILEAS 0x00004 /* Fail if EAs not supported on target*/ ! 347: ! 348: /* Dosopen/DosQFHandState/DosQueryFileInfo et al file attributes; also */ ! 349: /* known as Dso File Mode bits... */ ! 350: #define FILE_NORMAL 0x0000 ! 351: #define FILE_READONLY 0x0001 ! 352: #define FILE_HIDDEN 0x0002 ! 353: #define FILE_SYSTEM 0x0004 ! 354: #define FILE_DIRECTORY 0x0010 ! 355: #define FILE_ARCHIVED 0x0020 ! 356: ! 357: /* DosOpen() actions */ ! 358: #define FILE_EXISTED 0x0001 ! 359: #define FILE_CREATED 0x0002 ! 360: #define FILE_TRUNCATED 0x0003 ! 361: ! 362: /* DosOpen() open flags */ ! 363: #define FILE_OPEN 0x0001 ! 364: #define FILE_TRUNCATE 0x0002 ! 365: #define FILE_CREATE 0x0010 ! 366: ! 367: /* applies if file already exists */ ! 368: ! 369: #define OPEN_ACTION_FAIL_IF_EXISTS 0x0000 /* ---- ---- ---- 0000 */ ! 370: #define OPEN_ACTION_OPEN_IF_EXISTS 0x0001 /* ---- ---- ---- 0001 */ ! 371: #define OPEN_ACTION_REPLACE_IF_EXISTS 0x0002 /* ---- ---- ---- 0010 */ ! 372: ! 373: /* applies if file does not exist */ ! 374: ! 375: #define OPEN_ACTION_FAIL_IF_NEW 0x0000 /* ---- ---- 0000 ---- */ ! 376: #define OPEN_ACTION_CREATE_IF_NEW 0x0010 /* ---- ---- 0001 ---- */ ! 377: ! 378: /* DosOpen/DosSetFHandState flags */ ! 379: ! 380: #define OPEN_ACCESS_READONLY 0x0000 /* ---- ---- ---- -000 */ ! 381: #define OPEN_ACCESS_WRITEONLY 0x0001 /* ---- ---- ---- -001 */ ! 382: #define OPEN_ACCESS_READWRITE 0x0002 /* ---- ---- ---- -010 */ ! 383: #define OPEN_SHARE_DENYREADWRITE 0x0010 /* ---- ---- -001 ---- */ ! 384: #define OPEN_SHARE_DENYWRITE 0x0020 /* ---- ---- -010 ---- */ ! 385: #define OPEN_SHARE_DENYREAD 0x0030 /* ---- ---- -011 ---- */ ! 386: #define OPEN_SHARE_DENYNONE 0x0040 /* ---- ---- -100 ---- */ ! 387: #define OPEN_FLAGS_NOINHERIT 0x0080 /* ---- ---- 1--- ---- */ ! 388: #define OPEN_FLAGS_NO_LOCALITY 0x0000 /* ---- -000 ---- ---- */ ! 389: #define OPEN_FLAGS_SEQUENTIAL 0x0100 /* ---- -001 ---- ---- */ ! 390: #define OPEN_FLAGS_RANDOM 0x0200 /* ---- -010 ---- ---- */ ! 391: #define OPEN_FLAGS_RANDOMSEQUENTIAL 0x0300 /* ---- -011 ---- ---- */ ! 392: #define OPEN_FLAGS_NO_CACHE 0x1000 /* ---1 ---- ---- ---- */ ! 393: #define OPEN_FLAGS_FAIL_ON_ERROR 0x2000 /* --1- ---- ---- ---- */ ! 394: #define OPEN_FLAGS_WRITE_THROUGH 0x4000 /* -1-- ---- ---- ---- */ ! 395: #define OPEN_FLAGS_DASD 0x8000 /* 1--- ---- ---- ---- */ ! 396: ! 397: ! 398: /* DosSearchPath() constants */ ! 399: ! 400: #define SEARCH_PATH 0x0000 ! 401: #define SEARCH_CUR_DIRECTORY 0x0001 ! 402: #define SEARCH_ENVIRONMENT 0x0002 ! 403: #define SEARCH_IGNORENETERRS 0x0004 ! 404: ! 405: /* ! 406: * DosFileIO ! 407: */ ! 408: /* File IO command words */ ! 409: #define FIO_LOCK 0 /* Lock Files */ ! 410: #define FIO_UNLOCK 1 /* Unlock Files */ ! 411: #define FIO_SEEK 2 /* Seek (set file ptr) */ ! 412: #define FIO_READ 3 /* File Read */ ! 413: #define FIO_WRITE 4 /* File Write */ ! 414: ! 415: /* Lock Sharing Modes */ ! 416: #define FIO_NOSHARE 0 /* None */ ! 417: #define FIO_SHAREREAD 1 /* Read-Only */ ! 418: ! 419: typedef struct _FIOLOCKCMD { /* FLC FileLockCmd prefix */ ! 420: USHORT usCmd; /* Cmd = FIO_LOCK */ ! 421: USHORT cLockCnt; /* Lock records that follow */ ! 422: ULONG cTimeOut; /* in Msec */ ! 423: } FIOLOCKCMD; ! 424: typedef FIOLOCKCMD FAR *PFIOLOCKCMD; ! 425: ! 426: ! 427: typedef struct _FIOLOCKREC { /* FLR FileLockRecord */ ! 428: USHORT fShare; /* FIO_NOSHARE or FIO_SHAREREAD */ ! 429: ULONG cbStart; /* Starting offset for lock region */ ! 430: ULONG cbLength; /* Length of lock region */ ! 431: } FIOLOCKREC; ! 432: typedef FIOLOCKREC FAR *PFIOLOCKREC; ! 433: ! 434: ! 435: typedef struct _FIOUNLOCKCMD { /* FUC FileUnlockCmd prefix */ ! 436: USHORT usCmd; /* Cmd = FIO_UNLOCK */ ! 437: USHORT cUnlockCnt; /* Unlock records that follow */ ! 438: } FIOUNLOCKCMD; ! 439: typedef FIOUNLOCKCMD FAR *PFIOUNLOCKCMD; ! 440: ! 441: ! 442: typedef struct _FIOUNLOCKREC { /* FUR FileUnlockRecord */ ! 443: ULONG cbStart; /* Starting offset for unlock region */ ! 444: ULONG cbLength; /* Length of unlock region */ ! 445: } FIOUNLOCKREC; ! 446: typedef FIOUNLOCKREC FAR *PFIOUNLOCKREC; ! 447: ! 448: ! 449: typedef struct _FIOSEEKCMD { /* FSC Seek command structure */ ! 450: USHORT usCmd; /* Cmd = FIO_SEEK */ ! 451: USHORT fsMethod; /* One of&gml FPM_BEGINNING, FPM_CURRENT, */ ! 452: /* or FPM_END */ ! 453: ULONG cbDistance; /* Byte offset for seek */ ! 454: ULONG cbNewPosition; /* Bytes from start of file after seek */ ! 455: } FIOSEEKCMD; ! 456: typedef FIOSEEKCMD FAR *PFIOSEEKCMD; ! 457: ! 458: ! 459: typedef struct _FIOREADWRITE { /* RWC Read&Write command structure */ ! 460: USHORT usCmd; /* Cmd = FIO_READ or FIO_WRITE */ ! 461: PVOID pbBuffer; /* Pointer to data buffer */ ! 462: ULONG cbBufferLen; /* Bytes in buffer or max size */ ! 463: ULONG cbActualLen; /* Bytes actually read/written */ ! 464: } FIOREADWRITE; ! 465: typedef FIOREADWRITE FAR *PFIOREADWRITE; ! 466: ! 467: ! 468: /*** ! 469: * EA Info Levels & Find First/Next ! 470: * API's: DosFindFirst, DosQueryFileInfo, DosQueryPathInfo, DosSetFileInfo, ! 471: * DosSetPathInfo ! 472: */ ! 473: ! 474: /* File info levels : All listed API's */ ! 475: #define FIL_STANDARD 1 /* Info level 1, standard file info */ ! 476: #define FIL_QUERYEASIZE 2 /* Level 2, return Full EA size */ ! 477: #define FIL_QUERYEASFROMLIST 3 /* Level 3, return requested EA's */ ! 478: #define FIL_QUERYALLEAS 4 /* Level 4, return all EA's */ ! 479: ! 480: /* File info levels: Dos...PathInfo only */ ! 481: #define FIL_QUERYFULLNAME 5 /* Level 5, return fully qualified */ ! 482: /* name of file */ ! 483: #define FIL_NAMEISVALID 6 /* Level 6, check validity of */ ! 484: /* file/path name for this FSD */ ! 485: ! 486: /* DosFindNotifyFirst() */ ! 487: #define FNOTIL_STANDARD 1 /* Find-Notify Info level 1&gml Return */ ! 488: /* standard directory change info */ ! 489: ! 490: /* DosFsAttach() */ ! 491: /* Attact or detach */ ! 492: #define FSATTACH 0 /* Attach file server */ ! 493: #define FSDETACH 1 /* Detach file server */ ! 494: ! 495: /* DosFsCtl() */ ! 496: /* Routing type */ ! 497: #define FSCTL_HANDLE 1 /* File Handle directs req routing */ ! 498: #define FSCTL_PATHNAME 2 /* Path Name directs req routing */ ! 499: #define FSCTL_FSDNAME 3 /* FSD Name directs req routing */ ! 500: ! 501: /* DosQueryFSAttach() */ ! 502: /* Information level types (defines method of query) */ ! 503: #define FSAIL_QUERYNAME 1 /* Return data for a Drive or Device */ ! 504: #define FSAIL_DEVNUMBER 2 /* Return data for Ordinal Device # */ ! 505: #define FSAIL_DRVNUMBER 3 /* Return data for Ordinal Drive # */ ! 506: ! 507: /* Item types (from data structure item "iType") */ ! 508: #define FSAT_CHARDEV 1 /* Resident character device */ ! 509: #define FSAT_PSEUDODEV 2 /* Pusedu-character device */ ! 510: #define FSAT_LOCALDRV 3 /* Local drive */ ! 511: #define FSAT_REMOTEDRV 4 /* Remote drive attached to FSD */ ! 512: ! 513: typedef struct _FSQBUFFER { /* fsqbuf Data structure for QFSAttach*/ ! 514: USHORT iType; /* Item type */ ! 515: USHORT cbName; /* Length of item name, sans NULL */ ! 516: UCHAR szName[1]; /* ASCIIZ item name */ ! 517: USHORT cbFSDName; /* Length of FSD name, sans NULL */ ! 518: UCHAR szFSDName[1]; /* ASCIIZ FSD name */ ! 519: USHORT cbFSAData; /* Length of FSD Attach data returned */ ! 520: UCHAR rgFSAData[1]; /* FSD Attach data from FSD */ ! 521: } FSQBUFFER; ! 522: typedef FSQBUFFER FAR *PFSQBUFFER; ! 523: ! 524: /* ! 525: * File System Drive Information&gml DosQueryFSInfo DosSetFSInfo ! 526: */ ! 527: ! 528: /* FS Drive Info Levels */ ! 529: #define FSIL_ALLOC 1 /* Drive allocation info (Query only) */ ! 530: #define FSIL_VOLSER 2 /* Drive Volume/Serial information */ ! 531: ! 532: /* DosQueryFHType() */ ! 533: /* Handle classes (low 8 bits of Handle Type) */ ! 534: #define FHT_DISKFILE 0x0000 /* Disk file handle */ ! 535: #define FHT_CHRDEV 0x0001 /* Character device handle */ ! 536: #define FHT_PIPE 0x0002 /* Pipe handle */ ! 537: ! 538: /* Handle bits (high 8 bits of Handle Type) */ ! 539: #define FHB_DSKREMOTE 0x8000 /* Remote disk */ ! 540: #define FHB_CHRDEVREMOTE 0x8000 /* Remote character device */ ! 541: #define FHB_PIPEREMOTE 0x8000 /* Remote pipe */ ! 542: ! 543: ! 544: typedef SHANDLE HFILE; /* hf */ ! 545: typedef HFILE FAR *PHFILE; ! 546: ! 547: #ifndef INCL_SAADEFS ! 548: ! 549: /* File time and date types */ ! 550: ! 551: typedef struct _FTIME { /* ftime */ ! 552: USHORT twosecs : 5; ! 553: USHORT minutes : 6; ! 554: USHORT hours : 5; ! 555: } FTIME; ! 556: typedef FTIME FAR *PFTIME; ! 557: ! 558: typedef struct _FDATE { /* fdate */ ! 559: USHORT day : 5; ! 560: USHORT month : 4; ! 561: USHORT year : 7; ! 562: } FDATE; ! 563: typedef FDATE FAR *PFDATE; ! 564: ! 565: typedef struct _FILEFINDBUF { /* findbuf */ ! 566: FDATE fdateCreation; ! 567: FTIME ftimeCreation; ! 568: FDATE fdateLastAccess; ! 569: FTIME ftimeLastAccess; ! 570: FDATE fdateLastWrite; ! 571: FTIME ftimeLastWrite; ! 572: ULONG cbFile; ! 573: ULONG cbFileAlloc; ! 574: USHORT attrFile; ! 575: UCHAR cchName; ! 576: CHAR achName[CCHMAXPATHCOMP]; ! 577: } FILEFINDBUF; ! 578: typedef FILEFINDBUF FAR *PFILEFINDBUF; ! 579: ! 580: typedef struct _FILEFINDBUF2 { /* findbuf2 */ ! 581: FDATE fdateCreation; ! 582: FTIME ftimeCreation; ! 583: FDATE fdateLastAccess; ! 584: FTIME ftimeLastAccess; ! 585: FDATE fdateLastWrite; ! 586: FTIME ftimeLastWrite; ! 587: ULONG cbFile; ! 588: ULONG cbFileAlloc; ! 589: USHORT attrFile; ! 590: ULONG cbList; ! 591: UCHAR cchName; ! 592: CHAR achName[CCHMAXPATHCOMP]; ! 593: } FILEFINDBUF2; ! 594: typedef FILEFINDBUF2 FAR *PFILEFINDBUF2; ! 595: ! 596: /* extended attribute structures */ ! 597: typedef struct _GEA { /* gea */ ! 598: BYTE cbName; /* name length not including NULL */ ! 599: CHAR szName[1]; /* attribute name */ ! 600: } GEA; ! 601: typedef GEA FAR *PGEA; ! 602: ! 603: typedef struct _GEALIST { /* geal */ ! 604: ULONG cbList; /* total bytes of structure inc full list */ ! 605: GEA list[1]; /* variable length GEA structures */ ! 606: } GEALIST; ! 607: typedef GEALIST FAR * PGEALIST; ! 608: ! 609: typedef struct _FEA { /* fea */ ! 610: BYTE fEA; /* flags */ ! 611: BYTE cbName; /* name length not including NULL */ ! 612: USHORT cbValue; /* value length */ ! 613: } FEA; ! 614: typedef FEA FAR *PFEA; ! 615: ! 616: /* flags for _FEA.fEA */ ! 617: ! 618: #define FEA_NEEDEA 0x80 /* need EA bit */ ! 619: ! 620: typedef struct _FEALIST { /* feal */ ! 621: ULONG cbList; /* total bytes of structure inc full list */ ! 622: FEA list[1]; /* variable length FEA structures */ ! 623: } FEALIST; ! 624: typedef FEALIST FAR * PFEALIST; ! 625: ! 626: typedef struct _EAOP { /* eaop */ ! 627: PGEALIST fpGEAList; /* general EA list */ ! 628: PFEALIST fpFEAList; /* full EA list */ ! 629: ULONG oError; ! 630: } EAOP; ! 631: typedef EAOP FAR * PEAOP; ! 632: ! 633: ! 634: /* ! 635: * Equates for EA types ! 636: * ! 637: * Values 0xFFFE thru 0x8000 are reserved. ! 638: * Values 0x0000 thru 0x7fff are user definable. ! 639: * Value 0xFFFC is not used ! 640: */ ! 641: ! 642: #define EAT_BINARY 0xFFFE /* length preceeded binary */ ! 643: #define EAT_ASCII 0xFFFD /* length preceeded ASCII */ ! 644: #define EAT_BITMAP 0xFFFB /* length preceeded bitmap */ ! 645: #define EAT_METAFILE 0xFFFA /* length preceeded metafile */ ! 646: #define EAT_ICON 0xFFF9 /* length preceeded icon */ ! 647: #define EAT_EA 0xFFEE /* length preceeded ASCII extended attribute */ ! 648: /* name of associated data (#include)*/ ! 649: #define EAT_MVMT 0xFFDF /* multi-valued, multi-typed field */ ! 650: #define EAT_MVST 0xFFDE /* multi-valued, single-typed field */ ! 651: #define EAT_ASN1 0xFFDD /* ASN.1 field */ ! 652: ! 653: ! 654: #endif /* !INCL_SAADEFS */ ! 655: ! 656: /* XLATOFF */ ! 657: #ifndef INCL_NOXLATE_DOS16 ! 658: #define DosBufReset Dos16BufReset ! 659: #define DosChDir Dos16ChDir ! 660: #define DosChgFilePtr Dos16ChgFilePtr ! 661: #define DosClose Dos16Close ! 662: #define DosCopy Dos16Copy ! 663: #define DosDelete Dos16Delete ! 664: #define DosDupHandle Dos16DupHandle ! 665: #define DosEditName Dos16EditName ! 666: #define DosEnumAttribute Dos16EnumAttribute ! 667: #define DosFileIO Dos16FileIO ! 668: #define DosFileLocks Dos16FileLocks ! 669: #define DosFindClose Dos16FindClose ! 670: #define DosFindFirst Dos16FindFirst ! 671: #define DosFindFirst2 Dos16FindFirst2 ! 672: #define DosFindNext Dos16FindNext ! 673: #define DosFindNotifyClose Dos16FindNotifyClose ! 674: #define DosFindNotifyFirst Dos16FindNotifyFirst ! 675: #define DosFindNotifyNext Dos16FindNotifyNext ! 676: #define DosFSAttach Dos16FSAttach ! 677: #define DosFSCtl Dos16FSCtl ! 678: #define DosMkDir Dos16MkDir ! 679: #define DosMkDir2 Dos16MkDir2 ! 680: #define DosMove Dos16Move ! 681: #define DosNewSize Dos16NewSize ! 682: #define DosOpen Dos16Open ! 683: #define DosOpen2 Dos16Open2 ! 684: #define DosQCurDir Dos16QCurDir ! 685: #define DosQCurDisk Dos16QCurDisk ! 686: #define DosQFHandState Dos16QFHandState ! 687: #define DosQFileInfo Dos16QFileInfo ! 688: #define DosQFileMode Dos16QFileMode ! 689: #define DosQFSAttach Dos16QFSAttach ! 690: #define DosQFSInfo Dos16QFSInfo ! 691: #define DosQHandType Dos16QHandType ! 692: #define DosQPathInfo Dos16QPathInfo ! 693: #define DosQVerify Dos16QVerify ! 694: #define DosRead Dos16Read ! 695: #define DosReadAsync Dos16ReadAsync ! 696: #define DosRmDir Dos16RmDir ! 697: #define DosSelectDisk Dos16SelectDisk ! 698: #define DosSetFHandState Dos16SetFHandState ! 699: #define DosSetFileInfo Dos16SetFileInfo ! 700: #define DosSetFileMode Dos16SetFileMode ! 701: #define DosSetFilePtr Dos16SetFilePtr ! 702: #define DosSetFSInfo Dos16SetFSInfo ! 703: #define DosSetMaxFH Dos16SetMaxFH ! 704: #define DosSetPathInfo Dos16SetPathInfo ! 705: #define DosSetVerify Dos16SetVerify ! 706: #define DosShutdown Dos16Shutdown ! 707: #define DosWrite Dos16Write ! 708: #define DosWriteAsync Dos16WriteAsync ! 709: #endif /* INCL_NOXLATE_DOS16 */ ! 710: /* XLATON */ ! 711: ! 712: APIRET APIENTRY DosOpen(PSZ pszFname, PHFILE phfOpen, PUSHORT pusAction, ! 713: ULONG ulFSize, USHORT usAttr, USHORT fsOpenFlags, ! 714: USHORT fsOpenMode, ULONG ulReserved); ! 715: APIRET APIENTRY DosOpen2(PSZ pszFname, PHFILE phf, PUSHORT pusAction, ! 716: ULONG ulFSize, USHORT usAttr, USHORT usOpenFlags, ! 717: ULONG usOpenMode, PEAOP pvEABuf, ULONG ulReserved); ! 718: APIRET APIENTRY DosClose(HFILE hf); ! 719: APIRET APIENTRY DosRead(HFILE hf, PVOID pBuf, USHORT cbBuf, ! 720: PUSHORT pcbBytesRead); ! 721: APIRET APIENTRY DosWrite(HFILE hf, PVOID bBuf, USHORT cbBuf, ! 722: PUSHORT pcbBytesWritten); ! 723: ! 724: /* File system shutdown */ ! 725: ! 726: APIRET APIENTRY DosShutdown(ULONG ulReserved); ! 727: ! 728: /* File time and date types */ ! 729: ! 730: typedef struct _FILESTATUS { /* fsts */ ! 731: FDATE fdateCreation; ! 732: FTIME ftimeCreation; ! 733: FDATE fdateLastAccess; ! 734: FTIME ftimeLastAccess; ! 735: FDATE fdateLastWrite; ! 736: FTIME ftimeLastWrite; ! 737: ULONG cbFile; ! 738: ULONG cbFileAlloc; ! 739: USHORT attrFile; ! 740: } FILESTATUS; ! 741: typedef FILESTATUS FAR *PFILESTATUS; ! 742: ! 743: typedef struct _FILESTATUS2 { /* fsts2 */ ! 744: FDATE fdateCreation; ! 745: FTIME ftimeCreation; ! 746: FDATE fdateLastAccess; ! 747: FTIME ftimeLastAccess; ! 748: FDATE fdateLastWrite; ! 749: FTIME ftimeLastWrite; ! 750: ULONG cbFile; ! 751: ULONG cbFileAlloc; ! 752: USHORT attrFile; ! 753: ULONG cbList; ! 754: } FILESTATUS2; ! 755: typedef FILESTATUS2 FAR *PFILESTATUS2; ! 756: ! 757: typedef struct _FSALLOCATE { /* fsalloc */ ! 758: ULONG idFileSystem; ! 759: ULONG cSectorUnit; ! 760: ULONG cUnit; ! 761: ULONG cUnitAvail; ! 762: USHORT cbSector; ! 763: } FSALLOCATE; ! 764: typedef FSALLOCATE FAR *PFSALLOCATE; ! 765: ! 766: typedef struct _VOLUMELABEL { /* vol */ ! 767: BYTE cch; ! 768: CHAR szVolLabel[12]; ! 769: } VOLUMELABEL; ! 770: typedef VOLUMELABEL FAR *PVOLUMELABEL; ! 771: ! 772: typedef struct _FSINFO { /* fsinf */ ! 773: FDATE fdateCreation; ! 774: FTIME ftimeCreation; ! 775: VOLUMELABEL vol; ! 776: } FSINFO; ! 777: typedef FSINFO FAR *PFSINFO; ! 778: ! 779: /* HANDTYPE values */ ! 780: ! 781: #define HANDTYPE_FILE 0x0000 ! 782: #define HANDTYPE_DEVICE 0x0001 ! 783: #define HANDTYPE_PIPE 0x0002 ! 784: #define HANDTYPE_NETWORK 0x8000 ! 785: ! 786: typedef struct _FILELOCK { /* flock */ ! 787: LONG lOffset; ! 788: LONG lRange; ! 789: } FILELOCK; ! 790: typedef FILELOCK FAR *PFILELOCK; ! 791: ! 792: typedef SHANDLE HDIR; /* hdir */ ! 793: typedef HDIR FAR *PHDIR; ! 794: ! 795: APIRET APIENTRY DosDelete(PSZ pszFName, ULONG ulReserverd); ! 796: APIRET APIENTRY DosDupHandle(HFILE hfOld, PHFILE phfNew); ! 797: ! 798: APIRET APIENTRY DosQFHandState(HFILE hf, PUSHORT pfsOpenMode); ! 799: APIRET APIENTRY DosSetFHandState(HFILE hf, USHORT fsState); ! 800: APIRET APIENTRY DosQHandType(HFILE hf, PUSHORT pfsType, PUSHORT pusDevAttr); ! 801: ! 802: APIRET APIENTRY DosReadAsync (HFILE hf, PULONG hsemRam, PUSHORT pusErrCode, ! 803: PVOID pBuf, USHORT cbBuf, PUSHORT pcbBytesRead); ! 804: APIRET APIENTRY DosWriteAsync(HFILE hf, PULONG hsemRam, PUSHORT pusErrCode, ! 805: PVOID pBuf, USHORT cbBuf, PUSHORT pcbBytesWritten); ! 806: ! 807: APIRET APIENTRY DosFindFirst(PSZ pszFSpec, PHDIR phdir, USHORT usAttr, ! 808: PFILEFINDBUF pffb, USHORT cbBuf, PUSHORT pcSearch, ! 809: ULONG ulReserved); ! 810: APIRET APIENTRY DosFindFirst2(PSZ pszFSpec, PHDIR phdir, USHORT usAttr, ! 811: PVOID pBuf, USHORT cbBuf, PUSHORT pcSearch, ! 812: USHORT usInfoLevel, ULONG ulReserved); ! 813: APIRET APIENTRY DosFindNext(HDIR hdir, PFILEFINDBUF pffb, USHORT cbBuf, ! 814: PUSHORT pcSearch); ! 815: APIRET APIENTRY DosFindClose(HDIR hdir); ! 816: APIRET APIENTRY DosFindNotifyFirst(PSZ pszPath, PHDIR hdir, USHORT usAttr, ! 817: PVOID pBuf, USHORT cbBuf, PUSHORT pcChg, ! 818: USHORT usInfoLevel, ULONG ulTimeOut, ! 819: ULONG ulReserved); ! 820: APIRET APIENTRY DosFindNotifyNext(HDIR hDir, PVOID pBuf, USHORT cbBuf, ! 821: PUSHORT pcChg, ULONG ulTimeOut); ! 822: APIRET APIENTRY DosFindNotifyClose(HDIR hDir); ! 823: ! 824: APIRET APIENTRY DosFSAttach(PSZ pszDevName, PSZ pszFSD, PVOID pData, ! 825: USHORT cbData, USHORT fsOp, ULONG ulReserved); ! 826: APIRET APIENTRY DosQFSAttach(PSZ pszDev, USHORT usOrdinal, USHORT usInfoLevel, ! 827: PVOID pFSAttBuf, PUSHORT cbBuf, ULONG ulReserved); ! 828: APIRET APIENTRY DosFSCtl(PVOID pData, USHORT cbData, PUSHORT pcbData, ! 829: PVOID pParms, USHORT cbParms, PUSHORT pcbParms, ! 830: USHORT usFunCode, PSZ pszRoute, HFILE hf, ! 831: USHORT usRouteMethod, ULONG ulReserved); ! 832: ! 833: APIRET APIENTRY DosNewSize(HFILE hf, ULONG ulNewSize); ! 834: APIRET APIENTRY DosBufReset(HFILE hf); ! 835: ! 836: APIRET APIENTRY DosChgFilePtr(HFILE hf, LONG lOffset, USHORT fsMethod, ! 837: PULONG pulNewOffset); ! 838: ! 839: APIRET APIENTRY DosSetFilePtr(HFILE hf, LONG lOffset, USHORT fsMethod, ! 840: PULONG pulNewOffset); ! 841: ! 842: APIRET APIENTRY DosFileLocks(HFILE hf, PLONG pUnlock, PLONG pLock); ! 843: ! 844: APIRET APIENTRY DosMove(PSZ pszOld, PSZ pszNew, ULONG ulReserved); ! 845: APIRET APIENTRY DosCopy(PSZ pszSrc, PSZ pszDst, USHORT usOpt, ULONG ulReserved); ! 846: APIRET APIENTRY DosEditName(USHORT usEditLevel, PSZ pszSrc, PSZ pszEdit, ! 847: PBYTE pszDst, USHORT cbDst); ! 848: ! 849: APIRET APIENTRY DosFileIO(HFILE hf, PVOID pbCmd, USHORT cbCmd, PUSHORT pusErr); ! 850: APIRET APIENTRY DosMkDir(PSZ pszDirName, ULONG usReserved); ! 851: APIRET APIENTRY DosMkDir2(PSZ pszDir, PEAOP pBuf, ULONG ulReserved); ! 852: APIRET APIENTRY DosRmDir(PSZ pszDir, ULONG ulReserved); ! 853: APIRET APIENTRY DosSelectDisk(USHORT usDrvNum); ! 854: APIRET APIENTRY DosQCurDisk(PUSHORT pusDrvNum, PULONG pulLogDrvMap); ! 855: ! 856: APIRET APIENTRY DosChDir(PSZ pszDir, ULONG ulReserved); ! 857: APIRET APIENTRY DosQCurDir(USHORT usDrvNum, PBYTE pszPathBuf, ! 858: PUSHORT pcbPathBuf); ! 859: ! 860: APIRET APIENTRY DosQFSInfo(USHORT usDrvNum, USHORT usInfoLevel, PVOID pbInfo, ! 861: USHORT cbInfo); ! 862: APIRET APIENTRY DosSetFSInfo(USHORT usDrvNum, USHORT usInfoLevel, PVOID pBuf, ! 863: USHORT cbBuf); ! 864: APIRET APIENTRY DosQVerify(PUSHORT pfVerifyOn); ! 865: APIRET APIENTRY DosSetVerify(USHORT fVerify); ! 866: APIRET APIENTRY DosSetMaxFH(USHORT usHandles); ! 867: ! 868: APIRET APIENTRY DosQFileInfo(HFILE hf, USHORT usInfoLevel, PVOID pInfoBuf, ! 869: USHORT cbInfoBuf); ! 870: APIRET APIENTRY DosSetFileInfo(HFILE hf, USHORT usInfoLevel, PVOID pInfoBuf, ! 871: USHORT cbInfoBuf); ! 872: APIRET APIENTRY DosQPathInfo(PSZ pszPath, USHORT usInfoLevel, PVOID pInfoBuf, ! 873: USHORT cbInfoBuf, ULONG ulReserved); ! 874: APIRET APIENTRY DosSetPathInfo(PSZ pszPath, USHORT usInfoLevel, PVOID pInfoBuf, ! 875: USHORT cbInfoBuf, USHORT usFlags, ! 876: ULONG ulReserved); ! 877: ! 878: /* defines for dossetpathinfo -pathinfo flag */ ! 879: #define DSPI_WRTTHRU 0x10 /* write through */ ! 880: ! 881: APIRET APIENTRY DosQFileMode(PSZ pszFName, PUSHORT pusAttr, ULONG ulReserved); ! 882: APIRET APIENTRY DosSetFileMode(PSZ pszFName, USHORT usAttr, ULONG ulReserved); ! 883: ! 884: APIRET APIENTRY DosEnumAttribute(USHORT fRefType, PVOID pFileRef, ULONG iStartEntry, PVOID pEnumBuf, ULONG cbBuf, PULONG pcbActual, ULONG infoLevel, ULONG reserved); ! 885: ! 886: typedef struct _DENA1 { /* _dena1 level 1 info returned from DosEnumAttribute */ ! 887: UCHAR reserved; /* 0 */ ! 888: UCHAR cbName; /* length of name exculding NULL */ ! 889: USHORT cbValue; /* length of value */ ! 890: UCHAR szName[1]; /* variable length asciiz name */ ! 891: } DENA1; ! 892: typedef DENA1 FAR *PDENA1; ! 893: ! 894: /* Infolevels for DosEnumAttribute */ ! 895: #define ENUMEA_LEVEL_NO_VALUE 1L /* FEA without value */ ! 896: /* Reference types for DosEnumAttribute */ ! 897: #define ENUMEA_REFTYPE_FHANDLE 0 /* file handle */ ! 898: #define ENUMEA_REFTYPE_PATH 1 /* path name */ ! 899: #define ENUMEA_REFTYPE_MAX ENUMEA_REFTYPE_PATH ! 900: ! 901: #endif /* common INCL_DOSFILEMGR */ ! 902: ! 903: #if (defined(INCL_DOSMEMMGR) || !defined(INCL_NOCOMMON)) ! 904: /*** Memory management */ ! 905: ! 906: /* XLATOFF */ ! 907: #ifndef INCL_NOXLATE_DOS16 ! 908: #define DosAllocSeg Dos16AllocSeg ! 909: #define DosFreeSeg Dos16FreeSeg ! 910: #define DosGetSeg Dos16GetSeg ! 911: #define DosGiveSeg Dos16GiveSeg ! 912: #define DosReallocSeg Dos16ReallocSeg ! 913: #define DosSizeSeg Dos16SizeSeg ! 914: #endif /* INCL_NOXLATE_DOS16 */ ! 915: /* XLATON */ ! 916: ! 917: ! 918: APIRET APIENTRY DosAllocSeg(USHORT cbSize, PSEL pSel, USHORT fsAlloc); ! 919: APIRET APIENTRY DosFreeSeg(SEL sel); ! 920: APIRET APIENTRY DosGetSeg(SEL sel); ! 921: APIRET APIENTRY DosGiveSeg(SEL sel, PID pid, PSEL pSelRecipient); ! 922: APIRET APIENTRY DosReallocSeg(USHORT cbNewSize, SEL sel); ! 923: APIRET APIENTRY DosSizeSeg(SEL sel, PULONG pcbSize); ! 924: ! 925: /* Segment attribute flags (used with DosAllocSeg) */ ! 926: ! 927: #define SEG_NONSHARED 0x0000 ! 928: #define SEG_GIVEABLE 0x0001 ! 929: #define SEG_GETTABLE 0x0002 ! 930: #define SEG_DISCARDABLE 0x0004 ! 931: ! 932: #endif /* common INCL_DOSMEMMGR */ ! 933: ! 934: #ifdef INCL_DOSMEMMGR ! 935: ! 936: /* XLATOFF */ ! 937: #ifndef INCL_NOXLATE_DOS16 ! 938: #define DosAllocHuge Dos16AllocHuge ! 939: #define DosAllocShrSeg Dos16AllocShrSeg ! 940: #define DosCreateCSAlias Dos16CreateCSAlias ! 941: #define DosGetHugeShift Dos16GetHugeShift ! 942: #define DosGetShrSeg Dos16GetShrSeg ! 943: #define DosLockSeg Dos16LockSeg ! 944: #define DosMemAvail Dos16MemAvail ! 945: #define DosReallocHuge Dos16ReallocHuge ! 946: #define DosSubAlloc Dos16SubAlloc ! 947: #define DosSubFree Dos16SubFree ! 948: #define DosSubSet Dos16SubSet ! 949: #define DosUnlockSeg Dos16UnlockSeg ! 950: #endif /* INCL_NOXLATE_DOS16 */ ! 951: /* XLATON */ ! 952: ! 953: APIRET APIENTRY DosAllocHuge(USHORT cSegs, USHORT cbPartialSeg, PSEL psel, ! 954: USHORT cMaxSegs, USHORT fsAlloc); ! 955: APIRET APIENTRY DosReallocHuge(USHORT cSegs, USHORT cbPartialSeg, SEL sel); ! 956: APIRET APIENTRY DosGetHugeShift(PUSHORT pusShiftCount); ! 957: ! 958: APIRET APIENTRY DosAllocShrSeg(USHORT cbSeg, PSZ pszSegName, PSEL psel); ! 959: ! 960: APIRET APIENTRY DosLockSeg(SEL sel); ! 961: APIRET APIENTRY DosUnlockSeg(SEL sel); ! 962: ! 963: APIRET APIENTRY DosGetShrSeg(PSZ pszSegName, PSEL psel); ! 964: ! 965: APIRET APIENTRY DosMemAvail(PULONG pcbFree); ! 966: APIRET APIENTRY DosCreateCSAlias(SEL selDS, PSEL pselCS); ! 967: ! 968: APIRET APIENTRY DosSubAlloc(SEL sel, PUSHORT pusOffset, USHORT cb); ! 969: APIRET APIENTRY DosSubFree(SEL sel, USHORT offBlock, USHORT cb); ! 970: APIRET APIENTRY DosSubSet(SEL sel, USHORT fFlags, USHORT cbNew); ! 971: ! 972: #endif /* INCL_DOSMEMMGR */ ! 973: ! 974: #if (defined(INCL_DOSSEMAPHORES) || !defined(INCL_NOCOMMON)) ! 975: ! 976: /*** Semaphore support */ ! 977: ! 978: #define SEM_INDEFINITE_WAIT -1L ! 979: #define SEM_IMMEDIATE_RETURN 0L ! 980: ! 981: /* XLATOFF */ ! 982: #ifndef INCL_NOXLATE_DOS16 ! 983: #define DosSemClear Dos16SemClear ! 984: #define DosSemRequest Dos16SemRequest ! 985: #define DosSemSet Dos16SemSet ! 986: #define DosSemSetWait Dos16SemSetWait ! 987: #define DosSemWait Dos16SemWait ! 988: #endif /* INCL_NOXLATE_DOS16 */ ! 989: /* XLATON */ ! 990: ! 991: APIRET APIENTRY DosSemClear(HSEM hsem); ! 992: APIRET APIENTRY DosSemSet(HSEM hsem); ! 993: APIRET APIENTRY DosSemWait(HSEM hsem, LONG lTimeOut); ! 994: APIRET APIENTRY DosSemSetWait(HSEM hsem, LONG lTimeOut); ! 995: APIRET APIENTRY DosSemRequest(HSEM hsem, LONG lTimeOut); ! 996: ! 997: #endif /* common INCL_DOSSEMAPHORES */ ! 998: ! 999: #ifdef INCL_DOSSEMAPHORES ! 1000: ! 1001: typedef LHANDLE HSYSSEM; /* hssm */ ! 1002: typedef HSYSSEM FAR *PHSYSSEM; ! 1003: ! 1004: #define CSEM_PRIVATE 0 ! 1005: #define CSEM_PUBLIC 1 ! 1006: ! 1007: /* XLATOFF */ ! 1008: #ifndef INCL_NOXLATE_DOS16 ! 1009: #define DosCloseSem Dos16CloseSem ! 1010: #define DosCreateSem Dos16CreateSem ! 1011: #define DosFSRamSemClear Dos16FSRamSemClear ! 1012: #define DosFSRamSemRequest Dos16FSRamSemRequest ! 1013: #define DosMuxSemWait Dos16MuxSemWait ! 1014: #define DosOpenSem Dos16OpenSem ! 1015: #endif /* INCL_NOXLATE_DOS16 */ ! 1016: /* XLATON */ ! 1017: ! 1018: APIRET APIENTRY DosCreateSem(USHORT fExclusive,PHSYSSEM phsem,PSZ pszSemName); ! 1019: APIRET APIENTRY DosOpenSem(PHSEM phsem, PSZ pszSemName); ! 1020: APIRET APIENTRY DosCloseSem(HSEM hsem); ! 1021: ! 1022: typedef struct _MUXSEM { /* mxs */ ! 1023: USHORT zero; ! 1024: HSEM hsem; ! 1025: } MUXSEM; ! 1026: typedef MUXSEM FAR *PMUXSEM; ! 1027: ! 1028: typedef struct _MUXSEMLIST { /* mxsl */ ! 1029: USHORT cmxs; ! 1030: MUXSEM amxs[16]; ! 1031: } MUXSEMLIST; ! 1032: typedef MUXSEMLIST FAR *PMUXSEMLIST; ! 1033: ! 1034: /* ! 1035: * Since a MUXSEMLIST structure is actually a variable length ! 1036: * structure, the following macro may be used to define a MUXSEMLIST ! 1037: * structure having size elements, named "name". ! 1038: */ ! 1039: #define DEFINEMUXSEMLIST(name, size) \ ! 1040: struct { \ ! 1041: USHORT cmxs; \ ! 1042: MUXSEM amxs[size]; \ ! 1043: } name; ! 1044: ! 1045: /* ! 1046: * This function actually takes a far pointer to a MUXSEMLIST structure ! 1047: * as its second parameter, but in order to allow its use with the ! 1048: * DEFINEMUXSEMLIST macro, it is declared here as PVOID. ! 1049: */ ! 1050: APIRET APIENTRY DosMuxSemWait(PUSHORT pisemCleared,PVOID pmsxl,LONG lTimeOut); ! 1051: ! 1052: ! 1053: /*** Fast safe ram semaphores */ ! 1054: ! 1055: typedef struct _DOSFSRSEM { /* dosfsrs */ ! 1056: USHORT cb; ! 1057: PID pid; ! 1058: TID tid; ! 1059: USHORT cUsage; ! 1060: USHORT client; ! 1061: ULONG sem; ! 1062: } DOSFSRSEM; ! 1063: typedef DOSFSRSEM FAR *PDOSFSRSEM; ! 1064: ! 1065: APIRET APIENTRY DosFSRamSemRequest(PDOSFSRSEM pdosfsrs, LONG lTimeOut); ! 1066: APIRET APIENTRY DosFSRamSemClear(PDOSFSRSEM pdosfsrs); ! 1067: ! 1068: #endif /* INCL_DOSSEMAPHORES */ ! 1069: ! 1070: #if (defined(INCL_DOSDATETIME) || !defined(INCL_NOCOMMON)) ! 1071: ! 1072: /*** Time support */ ! 1073: ! 1074: typedef struct _DATETIME { /* date */ ! 1075: UCHAR hours; ! 1076: UCHAR minutes; ! 1077: UCHAR seconds; ! 1078: UCHAR hundredths; ! 1079: UCHAR day; ! 1080: UCHAR month; ! 1081: USHORT year; ! 1082: SHORT timezone; ! 1083: UCHAR weekday; ! 1084: } DATETIME; ! 1085: typedef DATETIME FAR *PDATETIME; ! 1086: ! 1087: /* XLATOFF */ ! 1088: #ifndef INCL_NOXLATE_DOS16 ! 1089: #define DosGetDateTime Dos16GetDateTime ! 1090: #define DosSetDateTime Dos16SetDateTime ! 1091: #endif /* INCL_NOXLATE_DOS16 */ ! 1092: /* XLATON */ ! 1093: ! 1094: APIRET APIENTRY DosGetDateTime(PDATETIME pdatetime); ! 1095: APIRET APIENTRY DosSetDateTime(PDATETIME pdatetime); ! 1096: ! 1097: #endif /* common INCL_DOSDATETIME */ ! 1098: ! 1099: #ifdef INCL_DOSDATETIME ! 1100: ! 1101: typedef SHANDLE HTIMER; ! 1102: typedef HTIMER FAR *PHTIMER; ! 1103: ! 1104: /* XLATOFF */ ! 1105: #ifndef INCL_NOXLATE_DOS16 ! 1106: #define DosTimerAsync Dos16TimerAsync ! 1107: #define DosTimerStart Dos16TimerStart ! 1108: #define DosTimerStop Dos16TimerStop ! 1109: #endif /* INCL_NOXLATE_DOS16 */ ! 1110: /* XLATON */ ! 1111: ! 1112: APIRET APIENTRY DosTimerAsync(ULONG ulTime, HSEM hsem, PHTIMER phtimer); ! 1113: APIRET APIENTRY DosTimerStart(ULONG ulTime, HSEM hsem, PHTIMER phtimer); ! 1114: APIRET APIENTRY DosTimerStop(HTIMER htimer); ! 1115: ! 1116: #endif /* INCL_DOSDATETIME */ ! 1117: ! 1118: ! 1119: /*** Module manager */ ! 1120: ! 1121: #ifdef INCL_DOSMODULEMGR ! 1122: ! 1123: /* XLATOFF */ ! 1124: #ifndef INCL_NOXLATE_DOS16 ! 1125: #define DosFreeModule Dos16FreeModule ! 1126: #define DosGetModHandle Dos16GetModHandle ! 1127: #define DosGetModName Dos16GetModName ! 1128: #define DosGetProcAddr Dos16GetProcAddr ! 1129: #define DosLoadModule Dos16LoadModule ! 1130: #define DosQueryProcType Dos16QueryProcType ! 1131: #endif /* INCL_NOXLATE_DOS16 */ ! 1132: /* XLATON */ ! 1133: ! 1134: APIRET APIENTRY DosLoadModule(PSZ pszFailName, USHORT cbFileName, ! 1135: PSZ pszModName, PHMODULE phmod); ! 1136: APIRET APIENTRY DosFreeModule(HMODULE hmod); ! 1137: APIRET APIENTRY DosGetProcAddr(HMODULE hmod, PSZ pszProcName, ! 1138: PFN FAR * ppfnProcAddr); ! 1139: APIRET APIENTRY DosGetModHandle(PSZ pszModName, PHMODULE phMod); ! 1140: APIRET APIENTRY DosGetModName(HMODULE hmod, USHORT cbBuf, PCHAR pchBuf); ! 1141: ! 1142: #define PT_16BIT 0L ! 1143: #define PT_32BIT 1L ! 1144: ! 1145: APIRET APIENTRY DosQueryProcType(HMODULE hmod, ULONG ordinal, PSZ pszName, PULONG pulprocType); ! 1146: ! 1147: APIRET APIENTRY DosInitializePorthole(ULONG pfmLibInit, ULONG lenttype); ! 1148: ! 1149: typedef struct _MODHDR { /* Module Header Info */ ! 1150: USHORT flags; ! 1151: USHORT flagsothers; ! 1152: USHORT exetype; ! 1153: USHORT expver; ! 1154: USHORT cbrsrc; ! 1155: } MODHDR; ! 1156: typedef MODHDR *PMODHDR; ! 1157: ! 1158: #define HEADER_EXEINFO 1L ! 1159: #define HEADER_READRSRCTBL 2L ! 1160: #define HEADER_READSECTOR 3L ! 1161: ! 1162: APIRET APIENTRY DosQueryHeaderInfo(HMODULE hmod, ULONG i, VOID FAR *pbuf, ULONG cb, ULONG subfunc); ! 1163: ! 1164: #endif /* INCL_DOSMODULEMGR */ ! 1165: ! 1166: #if (defined(INCL_DOSRESOURCES) || !defined(INCL_NOCOMMON)) ! 1167: ! 1168: /*** Resource support */ ! 1169: ! 1170: /* Predefined resource types */ ! 1171: ! 1172: #define RT_POINTER 1 /* mouse pointer shape */ ! 1173: #define RT_BITMAP 2 /* bitmap */ ! 1174: #define RT_MENU 3 /* menu template */ ! 1175: #define RT_DIALOG 4 /* dialog template */ ! 1176: #define RT_STRING 5 /* string tables */ ! 1177: #define RT_FONTDIR 6 /* font directory */ ! 1178: #define RT_FONT 7 /* font */ ! 1179: #define RT_ACCELTABLE 8 /* accelerator tables */ ! 1180: #define RT_RCDATA 9 /* binary data */ ! 1181: #define RT_MESSAGE 10 /* error mesage tables */ ! 1182: #define RT_DLGINCLUDE 11 /* dialog include file name */ ! 1183: #define RT_VKEYTBL 12 /* key to vkey tables */ ! 1184: #define RT_KEYTBL 13 /* key to UGL tables */ ! 1185: #define RT_CHARTBL 14 ! 1186: #define RT_DISPLAYINFO 15 /* screen display information */ ! 1187: ! 1188: #define RT_FKASHORT 16 /* function key area short form */ ! 1189: #define RT_FKALONG 17 /* function key area long form */ ! 1190: ! 1191: #define RT_HELPTABLE 18 /* Help table for Cary Help manager */ ! 1192: #define RT_HELPSUBTABLE 19 /* Help subtable for Cary Help manager */ ! 1193: ! 1194: #define RT_FDDIR 20 /* DBCS uniq/font driver directory */ ! 1195: #define RT_FD 21 /* DBCS uniq/font driver */ ! 1196: ! 1197: #define RT_MAX 22 /* 1st unused Resource Type */ ! 1198: ! 1199: ! 1200: #endif /* common INCL_DOSRESOURCES */ ! 1201: ! 1202: #ifdef INCL_DOSRESOURCES ! 1203: ! 1204: /* XLATOFF */ ! 1205: #ifndef INCL_NOXLATE_DOS16 ! 1206: #define DosFreeResource Dos16FreeResource ! 1207: #define DosGetResource Dos16GetResource ! 1208: #define DosGetResource2 Dos16GetResource2 ! 1209: #define DosQueryResourceSize Dos16QueryResourceSize ! 1210: #endif /* INCL_NOXLATE_DOS16 */ ! 1211: /* XLATON */ ! 1212: ! 1213: APIRET APIENTRY DosGetResource(HMODULE hmod, USHORT idType, USHORT idName, ! 1214: PSEL psel); ! 1215: APIRET APIENTRY DosGetResource2(HMODULE hmod, USHORT idType, USHORT idName, ! 1216: PVOID FAR * ppData); ! 1217: APIRET APIENTRY DosFreeResource(PVOID pData); ! 1218: APIRET APIENTRY DosQueryResourceSize(HMODULE hmod, ULONG idt, ULONG idn, ! 1219: PULONG pulsize); ! 1220: ! 1221: #endif /* INCL_DOSRESOURCES */ ! 1222: ! 1223: ! 1224: /*** NLS Support */ ! 1225: ! 1226: #ifdef INCL_DOSNLS ! 1227: ! 1228: typedef struct _COUNTRYCODE { /* ctryc */ ! 1229: USHORT country; ! 1230: USHORT codepage; ! 1231: } COUNTRYCODE; ! 1232: typedef COUNTRYCODE FAR *PCOUNTRYCODE; ! 1233: ! 1234: typedef struct _COUNTRYINFO { /* ctryi */ ! 1235: USHORT country; ! 1236: USHORT codepage; ! 1237: USHORT fsDateFmt; ! 1238: CHAR szCurrency[5]; ! 1239: CHAR szThousandsSeparator[2]; ! 1240: CHAR szDecimal[2]; ! 1241: CHAR szDateSeparator[2]; ! 1242: CHAR szTimeSeparator[2]; ! 1243: UCHAR fsCurrencyFmt; ! 1244: UCHAR cDecimalPlace; ! 1245: UCHAR fsTimeFmt; ! 1246: USHORT abReserved1[2]; ! 1247: CHAR szDataSeparator[2]; ! 1248: USHORT abReserved2[5]; ! 1249: } COUNTRYINFO; ! 1250: typedef COUNTRYINFO FAR *PCOUNTRYINFO; ! 1251: ! 1252: /* XLATOFF */ ! 1253: #ifndef INCL_NOXLATE_DOS16 ! 1254: #define DosCaseMap Dos16CaseMap ! 1255: #define DosGetCollate Dos16GetCollate ! 1256: #define DosGetCp Dos16GetCp ! 1257: #define DosGetCtryInfo Dos16GetCtryInfo ! 1258: #define DosGetDBCSEv Dos16GetDBCSEv ! 1259: #define DosSetCp Dos16SetCp ! 1260: #define DosSetProcCp Dos16SetProcCp ! 1261: #endif /* INCL_NOXLATE_DOS16 */ ! 1262: /* XLATON */ ! 1263: ! 1264: APIRET APIENTRY DosGetCtryInfo(USHORT cbBuf, PCOUNTRYCODE pctryc, ! 1265: PCOUNTRYINFO pctryi, PUSHORT pcbCtryInfo); ! 1266: APIRET APIENTRY DosGetDBCSEv(USHORT cbBuf, PCOUNTRYCODE pctryc, PCHAR pchBuf); ! 1267: APIRET APIENTRY DosCaseMap(USHORT usLen, PCOUNTRYCODE pctryc, PCHAR pchStr); ! 1268: APIRET APIENTRY DosGetCollate(USHORT cbBuf, PCOUNTRYCODE pctryc, PCHAR pchBuf, ! 1269: PUSHORT pcbTable); ! 1270: APIRET APIENTRY DosGetCp(USHORT cbBuf, PUSHORT pBuf, PUSHORT pcbCodePgLst); ! 1271: APIRET APIENTRY DosSetCp(USHORT usCodePage, USHORT usReserved); ! 1272: APIRET APIENTRY DosSetProcCp(USHORT usCodePage, USHORT usReserved); ! 1273: ! 1274: #endif /* INCL_DOSNLS */ ! 1275: ! 1276: ! 1277: /*** Signal support */ ! 1278: ! 1279: #ifdef INCL_DOSSIGNALS ! 1280: ! 1281: /* Signal Numbers for DosSetSigHandler */ ! 1282: ! 1283: #define SIG_CTRLC 1 /* Control C */ ! 1284: #define SIG_BROKENPIPE 2 /* Broken Pipe */ ! 1285: #define SIG_KILLPROCESS 3 /* Program Termination */ ! 1286: #define SIG_CTRLBREAK 4 /* Control Break */ ! 1287: #define SIG_PFLG_A 5 /* Process Flag A */ ! 1288: #define SIG_PFLG_B 6 /* Process Flag B */ ! 1289: #define SIG_PFLG_C 7 /* Process Flag C */ ! 1290: #define SIG_CSIGNALS 8 /* number of signals plus one */ ! 1291: ! 1292: /* Flag Numbers for DosFlagProcess */ ! 1293: ! 1294: #define PFLG_A 0 /* Process Flag A */ ! 1295: #define PFLG_B 1 /* Process Flag B */ ! 1296: #define PFLG_C 2 /* Process Flag C */ ! 1297: ! 1298: /* Signal actions */ ! 1299: ! 1300: #define SIGA_KILL 0 ! 1301: #define SIGA_IGNORE 1 ! 1302: #define SIGA_ACCEPT 2 ! 1303: #define SIGA_ERROR 3 ! 1304: #define SIGA_ACKNOWLEDGE 4 ! 1305: ! 1306: /* DosHoldSignal constants */ ! 1307: ! 1308: #define HLDSIG_ENABLE 0 ! 1309: #define HLDSIG_DISABLE 1 ! 1310: ! 1311: /* DosFlagProcess codes */ ! 1312: ! 1313: #define FLGP_SUBTREE 0 ! 1314: #define FLGP_PID 1 ! 1315: ! 1316: typedef VOID (PASCAL FAR *PFNSIGHANDLER)(USHORT, USHORT); ! 1317: ! 1318: /* XLATOFF */ ! 1319: #ifndef INCL_NOXLATE_DOS16 ! 1320: #define DosFlagProcess Dos16FlagProcess ! 1321: #define DosHoldSignal Dos16HoldSignal ! 1322: #define DosSendSignal Dos16SendSignal ! 1323: #define DosSetSigHandler Dos16SetSigHandler ! 1324: #endif /* INCL_NOXLATE_DOS16 */ ! 1325: /* XLATON */ ! 1326: ! 1327: APIRET APIENTRY DosSetSigHandler(PFNSIGHANDLER pfnSigHandler, ! 1328: PFNSIGHANDLER FAR * ppfnPrev, PUSHORT pfAction, ! 1329: USHORT fAction, USHORT usSigNum); ! 1330: APIRET APIENTRY DosFlagProcess(PID pid, USHORT fScope, USHORT usFlagNum, ! 1331: USHORT usFlagArg); ! 1332: APIRET APIENTRY DosHoldSignal(USHORT fDisable); ! 1333: APIRET APIENTRY DosSendSignal(USHORT idProcess, USHORT usSigNumber); ! 1334: ! 1335: #endif /* INCL_DOSSIGNALS */ ! 1336: ! 1337: ! 1338: /*** Monitor support */ ! 1339: ! 1340: #ifdef INCL_DOSMONITORS ! 1341: ! 1342: typedef SHANDLE HMONITOR; /* hmon */ ! 1343: typedef HMONITOR FAR *PHMONITOR; ! 1344: ! 1345: /* XLATOFF */ ! 1346: #ifndef INCL_NOXLATE_DOS16 ! 1347: #define DosMonClose Dos16MonClose ! 1348: #define DosMonOpen Dos16MonOpen ! 1349: #define DosMonRead Dos16MonRead ! 1350: #define DosMonReg Dos16MonReg ! 1351: #define DosMonWrite Dos16MonWrite ! 1352: #endif /* INCL_NOXLATE_DOS16 */ ! 1353: /* XLATON */ ! 1354: ! 1355: APIRET APIENTRY DosMonOpen(PSZ pszDevName, PHMONITOR phmon); ! 1356: APIRET APIENTRY DosMonClose(HMONITOR hmon); ! 1357: APIRET APIENTRY DosMonReg(HMONITOR hmon, PBYTE pbInBuf, PBYTE pbOutBuf, ! 1358: USHORT fPosition, USHORT usIndex); ! 1359: APIRET APIENTRY DosMonRead(PBYTE pbInBuf, USHORT fWait, PBYTE pbDataBuf, ! 1360: PUSHORT pcbData); ! 1361: APIRET APIENTRY DosMonWrite(PBYTE pbOutBuf, PBYTE pbDataBuf, USHORT cbData); ! 1362: ! 1363: #endif /* INCL_DOSMONITORS */ ! 1364: ! 1365: ! 1366: /*** Pipe and queue support */ ! 1367: ! 1368: #ifdef INCL_DOSQUEUES ! 1369: #if (defined(INCL_DOSFILEMGR) || !defined(INCL_NOCOMMON)) ! 1370: ! 1371: typedef SHANDLE HQUEUE; /* hq */ ! 1372: typedef HQUEUE FAR *PHQUEUE; ! 1373: ! 1374: /* XLATOFF */ ! 1375: #ifndef INCL_NOXLATE_DOS16 ! 1376: #define DosCloseQueue Dos16CloseQueue ! 1377: #define DosCreateQueue Dos16CreateQueue ! 1378: #define DosMakePipe Dos16MakePipe ! 1379: #define DosOpenQueue Dos16OpenQueue ! 1380: #define DosPeekQueue Dos16PeekQueue ! 1381: #define DosPurgeQueue Dos16PurgeQueue ! 1382: #define DosQueryQueue Dos16QueryQueue ! 1383: #define DosReadQueue Dos16ReadQueue ! 1384: #define DosWriteQueue Dos16WriteQueue ! 1385: #endif /* INCL_NOXLATE_DOS16 */ ! 1386: /* XLATON */ ! 1387: ! 1388: APIRET APIENTRY DosMakePipe(PHFILE phfRead, PHFILE phfWrite, USHORT cb); ! 1389: APIRET APIENTRY DosCloseQueue(HQUEUE hqueue); ! 1390: APIRET APIENTRY DosCreateQueue(PHQUEUE phqueue, USHORT fQueueOrder, ! 1391: PSZ pszQueueName); ! 1392: APIRET APIENTRY DosOpenQueue(PUSHORT ppidOwner, PHQUEUE phqueue, ! 1393: PSZ pszQueueName); ! 1394: APIRET APIENTRY DosPeekQueue(HQUEUE hqueue, PULONG pqresc, PUSHORT pcbElement, ! 1395: PPVOID ppBuf, PUSHORT pElemCode, UCHAR fWait, ! 1396: PBYTE pbElemPrty, ULONG hsem); ! 1397: APIRET APIENTRY DosPurgeQueue(HQUEUE hqueue); ! 1398: APIRET APIENTRY DosQueryQueue(HQUEUE hqueue, PUSHORT pcElem); ! 1399: APIRET APIENTRY DosReadQueue(HQUEUE hqueue, PULONG pqresc, PUSHORT pcbElem, ! 1400: PPVOID ppBuf, USHORT usElem, UCHAR fWait, ! 1401: PBYTE pbElemPrty, HSEM hsem); ! 1402: APIRET APIENTRY DosWriteQueue(HQUEUE hqueue, USHORT usRequest, USHORT cbBuf, ! 1403: PVOID pBuf, UCHAR fPriority); ! 1404: ! 1405: #else /* INCL_DOSFILEMGR || !INCL_NOCOMMON */ ! 1406: #error PHFILE not defined - define INCL_DOSFILEMGR or undefine INCL_NOCOMMON ! 1407: #endif /* INCL_DOSFILEMGR || !INCL_NOCOMMON */ ! 1408: #endif /* INCL_DOSQUEUES */ ! 1409: ! 1410: #ifdef INCL_DOSMISC ! 1411: ! 1412: /* definitions for DOSSEARCHPATH control word */ ! 1413: #define DSP_IMPLIEDCUR 1 /* current dir will be searched first */ ! 1414: #define DSP_PATHREF 2 /* from envirnoment variable */ ! 1415: #define DSP_IGNORENETERR 4 /* ignore net errs & continue search */ ! 1416: ! 1417: /* definition for DOSQSYSINFO */ ! 1418: #define Q_MAX_PATH_LENGTH (0) /* index for query max path length */ ! 1419: ! 1420: /* definitions for DosError - combine with | */ ! 1421: #define FERR_DISABLEHARDERR 0x00000000L /* disable hard error popups */ ! 1422: #define FERR_ENABLEHARDERR 0x00000001L /* enable hard error popups */ ! 1423: #define FERR_ENABLEEXCEPTION 0x00000000L /* enable exception popups */ ! 1424: #define FERR_DISABLEEXCEPTION 0x00000002L /* disable exception popups */ ! 1425: ! 1426: /* XLATOFF */ ! 1427: #ifndef INCL_NOXLATE_DOS16 ! 1428: #define DosDynamicTrace Dos16DynamicTrace ! 1429: #define DosErrClass Dos16ErrClass ! 1430: #define DosError Dos16Error ! 1431: #define DosGetEnv Dos16GetEnv ! 1432: #define DosGetMachineMode Dos16GetMachineMode ! 1433: #define DosGetMessage Dos16GetMessage ! 1434: #define DosGetVersion Dos16GetVersion ! 1435: #define DosInsMessage Dos16InsMessage ! 1436: #define DosPutMessage Dos16PutMessage ! 1437: #define DosQSysInfo Dos16QSysInfo ! 1438: #define DosQueryMessageCP Dos16QueryMessageCP ! 1439: #define DosScanEnv Dos16ScanEnv ! 1440: #define DosSearchPath Dos16SearchPath ! 1441: #define DosSetVec Dos16SetVec ! 1442: #define DosSysTrace Dos16SysTrace ! 1443: #endif /* INCL_NOXLATE_DOS16 */ ! 1444: /* XLATON */ ! 1445: ! 1446: APIRET APIENTRY DosError(USHORT fEnable); ! 1447: APIRET APIENTRY DosSetVec(USHORT usVecNum, PFN pfnFun, PFN FAR *ppfnPrev); ! 1448: APIRET APIENTRY DosGetMessage(PCHAR FAR * ppchVTable, USHORT usVCount, ! 1449: PCHAR pchBuf, USHORT cbBuf, USHORT usMsgNum, ! 1450: PSZ pszFileName, PUSHORT pcbMsg); ! 1451: APIRET APIENTRY DosErrClass(USHORT usErrCode, PUSHORT pusClass, ! 1452: PUSHORT pfsAction, PUSHORT pusLocus); ! 1453: APIRET APIENTRY DosInsMessage(PCHAR FAR * ppchVTable, USHORT usVCount, ! 1454: PSZ pszMsg, USHORT cbMsg, PCHAR pchBuf, ! 1455: USHORT cbBuf, PUSHORT pcbMsg); ! 1456: APIRET APIENTRY DosPutMessage(USHORT hf, USHORT cbMsg, PCHAR pchMsg); ! 1457: APIRET APIENTRY DosQueryMessageCP(PCHAR pb, USHORT cb, PSZ pszFilename, ! 1458: PUSHORT cbBuf); ! 1459: APIRET APIENTRY DosSysTrace(USHORT, USHORT, USHORT, PCHAR); ! 1460: APIRET APIENTRY DosDynamicTrace(USHORT, PBYTE, PBYTE); ! 1461: APIRET APIENTRY DosQSysInfo(USHORT index, PVOID pBuf, USHORT cbBuf); ! 1462: APIRET APIENTRY DosGetEnv(PSEL pselEnv, PUSHORT pOffsetCmd); ! 1463: APIRET APIENTRY DosScanEnv(PSZ pszVarName, PSZ FAR * ppszResult); ! 1464: APIRET APIENTRY DosSearchPath(USHORT fsSearch, PSZ pszPath, PSZ pszFName, ! 1465: PBYTE pBuf, USHORT cbBuf); ! 1466: APIRET APIENTRY DosGetVersion(PUSHORT pVer); ! 1467: APIRET APIENTRY DosGetMachineMode(PBYTE pMachMode); ! 1468: ! 1469: #endif /* INCL_DOSMISC */ ! 1470: ! 1471: ! 1472: /*** Session manager support */ ! 1473: ! 1474: #ifdef INCL_DOSSESMGR ! 1475: ! 1476: typedef struct _STARTDATA { /* stdata */ ! 1477: USHORT Length; ! 1478: USHORT Related; ! 1479: USHORT FgBg; ! 1480: USHORT TraceOpt; ! 1481: PSZ PgmTitle; ! 1482: PSZ PgmName; ! 1483: PBYTE PgmInputs; ! 1484: PBYTE TermQ; ! 1485: PBYTE Environment; ! 1486: USHORT InheritOpt; ! 1487: USHORT SessionType; ! 1488: PSZ IconFile; ! 1489: ULONG PgmHandle; ! 1490: USHORT PgmControl; ! 1491: USHORT InitXPos; ! 1492: USHORT InitYPos; ! 1493: USHORT InitXSize; ! 1494: USHORT InitYSize; ! 1495: USHORT Reserved; ! 1496: PSZ ObjectBuffer; ! 1497: ULONG ObjectBuffLen; ! 1498: } STARTDATA; ! 1499: typedef STARTDATA FAR *PSTARTDATA; ! 1500: ! 1501: #define SSF_RELATED_INDEPENDENT 0 ! 1502: #define SSF_RELATED_CHILD 1 ! 1503: ! 1504: #define SSF_FGBG_FORE 0 ! 1505: #define SSF_FGBG_BACK 1 ! 1506: ! 1507: #define SSF_TRACEOPT_NONE 0 ! 1508: #define SSF_TRACEOPT_TRACE 1 ! 1509: #define SSF_TRACEOPT_TRACEALL 2 ! 1510: ! 1511: #define SSF_INHERTOPT_SHELL 0 ! 1512: #define SSF_INHERTOPT_PARENT 1 ! 1513: ! 1514: /* note that these types are identical to those in pmshl.h for PROG_* */ ! 1515: #define SSF_TYPE_DEFAULT 0 ! 1516: #define SSF_TYPE_FULLSCREEN 1 ! 1517: #define SSF_TYPE_WINDOWABLEVIO 2 ! 1518: #define SSF_TYPE_PM 3 ! 1519: #define SSF_TYPE_VDM 4 ! 1520: #define SSF_TYPE_GROUP 5 ! 1521: #define SSF_TYPE_DLL 6 ! 1522: #define SSF_TYPE_WINDOWEDVDM 7 ! 1523: #define SSF_TYPE_PDD 8 ! 1524: #define SSF_TYPE_VDD 9 ! 1525: ! 1526: /* note that these flags are identical to those in pmshl.h for SHE_* */ ! 1527: #define SSF_CONTROL_VISIBLE 0x0000 ! 1528: #define SSF_CONTROL_INVISIBLE 0x0001 ! 1529: #define SSF_CONTROL_MAXIMIZE 0x0002 ! 1530: #define SSF_CONTROL_MINIMIZE 0x0004 ! 1531: #define SSF_CONTROL_NOAUTOCLOSE 0x0008 ! 1532: #define SSF_CONTROL_SETPOS 0x8000 ! 1533: ! 1534: typedef struct _STATUSDATA { /* stsdata */ ! 1535: USHORT Length; ! 1536: USHORT SelectInd; ! 1537: USHORT BondInd; ! 1538: } STATUSDATA; ! 1539: typedef STATUSDATA FAR *PSTATUSDATA; ! 1540: ! 1541: typedef struct _REGISTERDATA { /* regdata */ ! 1542: USHORT Length; ! 1543: USHORT NotifType; ! 1544: PSZ DDName; ! 1545: } REGISTERDATA; ! 1546: typedef REGISTERDATA FAR *PREGISTERDATA; ! 1547: ! 1548: /* XLATOFF */ ! 1549: #ifndef INCL_NOXLATE_DOS16 ! 1550: #define DosQAppType Dos16QAppType ! 1551: #define DosSMRegisterDD Dos16SMRegisterDD ! 1552: #define DosSelectSession Dos16SelectSession ! 1553: #define DosSetSession Dos16SetSession ! 1554: #define DosStartSession Dos16StartSession ! 1555: #define DosStopSession Dos16StopSession ! 1556: #endif /* INCL_NOXLATE_DOS16 */ ! 1557: /* XLATON */ ! 1558: ! 1559: APIRET APIENTRY DosSMRegisterDD(PREGISTERDATA); ! 1560: APIRET APIENTRY DosStartSession(PSTARTDATA pstdata, PUSHORT pidSession, ! 1561: PUSHORT ppid); ! 1562: APIRET APIENTRY DosSetSession(USHORT idSession, PSTATUSDATA pstsdata); ! 1563: APIRET APIENTRY DosSelectSession(USHORT idSession, ULONG ulReserved); ! 1564: APIRET APIENTRY DosStopSession(USHORT fScope, USHORT idSession, ! 1565: ULONG ulReserved); ! 1566: APIRET APIENTRY DosQAppType(PSZ pszPrgName, PUSHORT pusType); ! 1567: ! 1568: #endif /* INCL_DOSSESMGR */ ! 1569: ! 1570: #if (defined(INCL_DOSSESMGR) || defined(INCL_DOSFILEMGR)) ! 1571: ! 1572: /* AppType returned in by DosQueryAppType in pFlags as follows */ ! 1573: #define FAPPTYP_NOTSPEC 0x0000 ! 1574: #define FAPPTYP_NOTWINDOWCOMPAT 0x0001 ! 1575: #define FAPPTYP_WINDOWCOMPAT 0x0002 ! 1576: #define FAPPTYP_WINDOWAPI 0x0003 ! 1577: #define FAPPTYP_BOUND 0x0008 ! 1578: #define FAPPTYP_DLL 0x0010 ! 1579: #define FAPPTYP_DOS 0x0020 ! 1580: #define FAPPTYP_PHYSDRV 0x0040 /* physical device driver */ ! 1581: #define FAPPTYP_VIRTDRV 0x0080 /* virtual device driver */ ! 1582: #define FAPPTYP_PROTDLL 0x0100 /* 'protected memory' dll */ ! 1583: #define FAPPTYP_32BIT 0x4000 ! 1584: #define FAPPTYP_EXETYPE FAPPTYP_WINDOWAPI ! 1585: ! 1586: #define FAPPTYP_RESERVED ~(FAPPTYP_WINDOWAPI | FAPPTYP_BOUND | FAPPTYP_DLL | FAPPTYP_DOS | FAPPTYP_PHYSDRV | FAPPTYP_VIRTDRV | FAPPTYP_PROTDLL | FAPPTYP_32BIT) ! 1587: ! 1588: #ifdef INCL_DOSFILEMGR ! 1589: ! 1590: #define EAT_APPTYP_PMAPI 0x00 /* Uses PM API */ ! 1591: #define EAT_APPTYP_DOS 0x01 /* DOS APP */ ! 1592: #define EAT_APPTYP_PMW 0x02 /* Window compatible */ ! 1593: #define EAT_APPTYP_NOPMW 0x03 /* Not Window compatible */ ! 1594: #define EAT_APPTYP_EXETYPE 0x03 /* EXE type mask */ ! 1595: #define EAT_APPTYP_RESERVED ~(EAT_APPTYP_EXETYPE) ! 1596: ! 1597: #endif /* INCL_DOSFILEMGR */ ! 1598: ! 1599: #endif /* INCL_DOSSESMGR || INCL_DOSFILEMGR */ ! 1600: ! 1601: /*** Device support */ ! 1602: ! 1603: #ifdef INCL_DOSDEVICES ! 1604: ! 1605: /* XLATOFF */ ! 1606: #ifndef INCL_NOXLATE_DOS16 ! 1607: #define DosCLIAccess Dos16CLIAccess ! 1608: #define DosDevConfig Dos16DevConfig ! 1609: #define DosDevIOCtl Dos16DevIOCtl ! 1610: #define DosDevIOCtl2 Dos16DevIOCtl2 ! 1611: #define DosPhysicalDisk Dos16PhysicalDisk ! 1612: #define DosPortAccess Dos16PortAccess ! 1613: #define DosR2StackRealloc Dos16R2StackRealloc ! 1614: #define DosSystemService Dos16SystemService ! 1615: #define DosCallback Dos16Callback ! 1616: #endif /* INCL_NOXLATE_DOS16 */ ! 1617: /* XLATON */ ! 1618: ! 1619: ! 1620: APIRET APIENTRY DosDevConfig(PVOID pDevInfo, USHORT usItem, USHORT usReserved); ! 1621: #define DEVINFO_PRINTER 0 /* Number of printers attached */ ! 1622: #define DEVINFO_RS232 1 /* Number of RS232 ports */ ! 1623: #define DEVINFO_FLOPPY 2 /* Number of diskette drives */ ! 1624: #define DEVINFO_COPROCESSOR 3 /* Presence of math coprocessor */ ! 1625: #define DEVINFO_SUBMODEL 4 /* PC Submodel Type */ ! 1626: #define DEVINFO_MODEL 5 /* PC Model Type */ ! 1627: #define DEVINFO_ADAPTER 6 /* Primary display adapter type */ ! 1628: #define DEVINFO_COPROCESSORTYPE 7 /* Type of coprocessor functionality */ ! 1629: ! 1630: APIRET APIENTRY DosDevIOCtl(PVOID pData, PVOID pParms, USHORT usFun, ! 1631: USHORT usCategory, HFILE hDev); ! 1632: APIRET APIENTRY DosDevIOCtl2(PVOID pData, USHORT cbData, PVOID pParm, ! 1633: USHORT cbParm, USHORT usFun, USHORT usCategory, ! 1634: HFILE hDev); ! 1635: APIRET APIENTRY DosSystemService(USHORT usCategory, PVOID pRequest, ! 1636: PVOID pResponse); ! 1637: ! 1638: APIRET APIENTRY DosCLIAccess(VOID); ! 1639: APIRET APIENTRY DosPortAccess(USHORT usReserved, USHORT fRelease, ! 1640: USHORT usFirstPort, USHORT usLastPort); ! 1641: APIRET APIENTRY DosPhysicalDisk(USHORT usFun, PVOID pOut, USHORT cbOut, ! 1642: PVOID pParm, USHORT cbParm); ! 1643: #define INFO_COUNT_PARTITIONABLE_DISKS 1 /* # of partitionable disks */ ! 1644: #define INFO_GETIOCTLHANDLE 2 /* Obtain handle */ ! 1645: #define INFO_FREEIOCTLHANDLE 3 /* Release handle */ ! 1646: ! 1647: APIRET APIENTRY DosR2StackRealloc(USHORT cbStack); ! 1648: VOID APIENTRY DosCallback(PFN pfn); ! 1649: ! 1650: #endif /* INCL_DOSDEVICES */ ! 1651: ! 1652: ! 1653: /*** DosNamedPipes API Support */ ! 1654: ! 1655: #ifdef INCL_DOSNMPIPES ! 1656: ! 1657: typedef SHANDLE HPIPE; /* hp */ ! 1658: typedef HPIPE FAR *PHPIPE; ! 1659: ! 1660: typedef struct _AVAILDATA { /* AVAILDATA */ ! 1661: USHORT cbpipe; /* bytes left in the pipe */ ! 1662: USHORT cbmessage; /* bytes left in current message */ ! 1663: } AVAILDATA; ! 1664: typedef AVAILDATA FAR *PAVAILDATA; ! 1665: ! 1666: typedef struct _PIPEINFO { /* nmpinf */ ! 1667: USHORT cbOut; /* length of outgoing I/O buffer */ ! 1668: USHORT cbIn; /* length of incoming I/O buffer */ ! 1669: BYTE cbMaxInst; /* maximum number of instances */ ! 1670: BYTE cbCurInst; /* current number of instances */ ! 1671: BYTE cbName; /* length of pipe name */ ! 1672: CHAR szName[1]; /* start of name */ ! 1673: } PIPEINFO; ! 1674: typedef PIPEINFO FAR *PPIPEINFO; ! 1675: ! 1676: typedef struct _PIPESEMSTATE { /* nmpsmst */ ! 1677: BYTE fStatus; /* type of record, 0 = EOI, 1 = read ok, */ ! 1678: /* 2 = write ok, 3 = pipe closed */ ! 1679: BYTE fFlag; /* additional info, 01 = waiting thread */ ! 1680: USHORT usKey; /* user's key value */ ! 1681: USHORT usAvail; /* available data/space if status = 1/2 */ ! 1682: } PIPESEMSTATE; ! 1683: typedef PIPESEMSTATE FAR *PPIPESEMSTATE; ! 1684: ! 1685: #define NP_INDEFINITE_WAIT -1 ! 1686: #define NP_DEFAULT_WAIT 0L ! 1687: ! 1688: /* DosPeekNmPipe() pipe states */ ! 1689: ! 1690: #define NP_STATE_DISCONNECTED 0x0001 ! 1691: #define NP_STATE_LISTENING 0x0002 ! 1692: #define NP_STATE_CONNECTED 0x0003 ! 1693: #define NP_STATE_CLOSING 0x0004 ! 1694: ! 1695: /* DosCreateNPipe open modes */ ! 1696: ! 1697: #define NP_ACCESS_INBOUND 0x0000 ! 1698: #define NP_ACCESS_OUTBOUND 0x0001 ! 1699: #define NP_ACCESS_DUPLEX 0x0002 ! 1700: #define NP_INHERIT 0x0000 ! 1701: #define NP_NOINHERIT 0x0080 ! 1702: #define NP_WRITEBEHIND 0x0000 ! 1703: #define NP_NOWRITEBEHIND 0x4000 ! 1704: ! 1705: /* DosCreateNPipe and DosQueryNPHState state */ ! 1706: ! 1707: #define NP_READMODE_BYTE 0x0000 ! 1708: #define NP_READMODE_MESSAGE 0x0100 ! 1709: #define NP_TYPE_BYTE 0x0000 ! 1710: #define NP_TYPE_MESSAGE 0x0400 ! 1711: #define NP_END_CLIENT 0x0000 ! 1712: #define NP_END_SERVER 0x4000 ! 1713: #define NP_WAIT 0x0000 ! 1714: #define NP_NOWAIT 0x8000 ! 1715: #define NP_UNLIMITED_INSTANCES 0x00FF ! 1716: ! 1717: ! 1718: /* XLATOFF */ ! 1719: #ifndef INCL_NOXLATE_DOS16 ! 1720: #define DosCallNmPipe Dos16CallNmPipe ! 1721: #define DosConnectNmPipe Dos16ConnectNmPipe ! 1722: #define DosDisConnectNmPipe Dos16DisConnectNmPipe ! 1723: #define DosMakeNmPipe Dos16MakeNmPipe ! 1724: #define DosPeekNmPipe Dos16PeekNmPipe ! 1725: #define DosQNmPHandState Dos16QNmPHandState ! 1726: #define DosQNmPipeInfo Dos16QNmPipeInfo ! 1727: #define DosQNmPipeSemState Dos16QNmPipeSemState ! 1728: #define DosSetNmPHandState Dos16SetNmPHandState ! 1729: #define DosSetNmPipeSem Dos16SetNmPipeSem ! 1730: #define DosTransactNmPipe Dos16TransactNmPipe ! 1731: #define DosWaitNmPipe Dos16WaitNmPipe ! 1732: #endif /* INCL_NOXLATE_DOS16 */ ! 1733: /* XLATON */ ! 1734: ! 1735: APIRET APIENTRY DosCallNmPipe(PSZ pszName, PVOID pInBuf, USHORT cbInBuf, ! 1736: PVOID pbOutBuf, USHORT cbOutBuf, PUSHORT pcbRead, ! 1737: ULONG ulTimeOut); ! 1738: APIRET APIENTRY DosConnectNmPipe(HPIPE hp); ! 1739: APIRET APIENTRY DosDisConnectNmPipe(HPIPE hp); ! 1740: APIRET APIENTRY DosMakeNmPipe(PSZ pszName, PHPIPE php, USHORT fsOpenMode, ! 1741: USHORT fsPipeMode, USHORT cbOutBuf, ! 1742: USHORT cbInBuf, ULONG ulTimeOut); ! 1743: APIRET APIENTRY DosPeekNmPipe(HPIPE hp, PVOID pBuf, USHORT cbBuf, ! 1744: PUSHORT pcbRead, PAVAILDATA pcbAvail, ! 1745: PUSHORT pfsState); ! 1746: APIRET APIENTRY DosQNmPHandState(HPIPE hp, PUSHORT pfsState); ! 1747: APIRET APIENTRY DosQNmPipeInfo(HPIPE hp, USHORT usInfoLevel, PVOID pBuf, ! 1748: USHORT cb); ! 1749: APIRET APIENTRY DosQNmPipeSemState(HSEM hsem, PPIPESEMSTATE pnpss, USHORT cb); ! 1750: APIRET APIENTRY DosSetNmPHandState(HPIPE hp, USHORT fsState); ! 1751: APIRET APIENTRY DosSetNmPipeSem(HPIPE hp, HSEM hsem, USHORT usKeyVal); ! 1752: APIRET APIENTRY DosTransactNmPipe(HPIPE hp, PVOID bOutBuf, USHORT cbOut, ! 1753: PVOID pInBuf, USHORT cbIn, PUSHORT pcbRead); ! 1754: APIRET APIENTRY DosWaitNmPipe(PSZ pszName, ULONG ulTimeOut); ! 1755: ! 1756: /* values in npss_status */ ! 1757: #define NPSS_EOI 0 /* End Of Information */ ! 1758: #define NPSS_RDATA 1 /* read data available */ ! 1759: #define NPSS_WSPACE 2 /* write space available */ ! 1760: #define NPSS_CLOSE 3 /* pipe in CLOSING state */ ! 1761: ! 1762: /* values in npss_flag */ ! 1763: #define NPSS_WAIT 0x01 /* waiting thread on end of pipe */ ! 1764: ! 1765: /* defined bits in pipe mode */ ! 1766: #define NP_NBLK 0x8000 /* non-blocking read/write */ ! 1767: #define NP_SERVER 0x4000 /* set if server end */ ! 1768: #define NP_WMESG 0x0400 /* write messages */ ! 1769: #define NP_RMESG 0x0100 /* read as messages */ ! 1770: #define NP_ICOUNT 0x00FF /* instance count field */ ! 1771: ! 1772: ! 1773: /* Named pipes may be in one of several states depending on the actions ! 1774: * that have been taken on it by the server end and client end. The ! 1775: * following state/action table summarizes the valid state transitions: ! 1776: * ! 1777: * Current state Action Next state ! 1778: * ! 1779: * <none> server DosMakeNmPipe DISCONNECTED ! 1780: * DISCONNECTED server connect LISTENING ! 1781: * LISTENING client open CONNECTED ! 1782: * CONNECTED server disconn DISCONNECTED ! 1783: * CONNECTED client close CLOSING ! 1784: * CLOSING server disconn DISCONNECTED ! 1785: * CONNECTED server close CLOSING ! 1786: * <any other> server close <pipe deallocated> ! 1787: * ! 1788: * If a server disconnects his end of the pipe, the client end will enter a ! 1789: * special state in which any future operations (except close) on the file ! 1790: * descriptor associated with the pipe will return an error. ! 1791: */ ! 1792: ! 1793: /* ! 1794: * Values for named pipe state ! 1795: */ ! 1796: ! 1797: #define NP_DISCONNECTED 1 /* after pipe creation or Disconnect */ ! 1798: #define NP_LISTENING 2 /* after DosNmPipeConnect */ ! 1799: #define NP_CONNECTED 3 /* after Client open */ ! 1800: #define NP_CLOSING 4 /* after Client or Server close */ ! 1801: ! 1802: ! 1803: #endif /* INCL_DOSNMPIPES */ ! 1804: ! 1805: /*** DosProfile API support */ ! 1806: ! 1807: #ifdef INCL_DOSPROFILE ! 1808: ! 1809: /* DosProfile ordinal number */ ! 1810: ! 1811: #define PROF_ORDINAL 133 ! 1812: ! 1813: /* DosProfile usType */ ! 1814: ! 1815: #define PROF_SYSTEM 0 ! 1816: #define PROF_USER 1 ! 1817: #define PROF_USEDD 2 ! 1818: #define PROF_KERNEL 4 ! 1819: #define PROF_VERBOSE 8 ! 1820: #define PROF_ENABLE 16 ! 1821: ! 1822: /* DosProfile usFunc */ ! 1823: ! 1824: #define PROF_ALLOC 0 ! 1825: #define PROF_CLEAR 1 ! 1826: #define PROF_ON 2 ! 1827: #define PROF_OFF 3 ! 1828: #define PROF_DUMP 4 ! 1829: #define PROF_FREE 5 ! 1830: ! 1831: /* DosProfile tic count granularity (DWORD) */ ! 1832: ! 1833: #define PROF_SHIFT 2 ! 1834: ! 1835: /* DosProfile module name string length */ ! 1836: ! 1837: #define PROF_MOD_NAME_SIZE 10 ! 1838: ! 1839: /* DosProfile error code for end of data */ ! 1840: ! 1841: #define PROF_END_OF_DATA 13 ! 1842: ! 1843: #endif /* INCL_DOSPROFILE */ ! 1844: ! 1845: ! 1846: /*** Virtual DOS Machine API support */ ! 1847: ! 1848: #ifdef INCL_DOSMVDM ! 1849: ! 1850: /* XLATOFF */ ! 1851: #ifndef INCL_NOXLATE_DOS16 ! 1852: #define DosOpenVDD Dos16OpenVDD ! 1853: #define DosRequestVDD Dos16RequestVDD ! 1854: #define DosCloseVDD Dos16CloseVDD ! 1855: #define DosQueryDOSProperty Dos16QueryDOSProperty ! 1856: #define DosSetDOSProperty Dos16SetDOSProperty ! 1857: #endif /* INCL_NOXLATE_DOS16 */ ! 1858: /* XLATON */ ! 1859: ! 1860: typedef LHANDLE HVDD; /* hvdd */ ! 1861: typedef HVDD FAR *PHVDD; /* phvdd */ ! 1862: ! 1863: APIRET APIENTRY DosOpenVDD(PSZ pszvdd, PHVDD phvdd); ! 1864: ! 1865: APIRET APIENTRY DosRequestVDD(HVDD hvdd, SGID sgid, USHORT cmd, ! 1866: ULONG cbInput, PVOID pInput, ! 1867: ULONG cbOutput, PVOID pOutput); ! 1868: ! 1869: APIRET APIENTRY DosCloseVDD(HVDD hVDD); ! 1870: ! 1871: APIRET APIENTRY DosQueryDOSProperty(SGID sgid, PSZ pszName, ! 1872: USHORT cb, PSZ pch); ! 1873: ! 1874: APIRET APIENTRY DosSetDOSProperty(SGID sgid, PSZ pszName, ! 1875: USHORT cb, PSZ pch); ! 1876: ! 1877: #endif /* INCL_DOSMVDM */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.