Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

768 lines
30 KiB

  1. /*
  2. * Microsoft Confidential
  3. * Copyright (C) Microsoft Corporation 1991-1994
  4. * All Rights Reserved.
  5. *
  6. *
  7. * PIF.H
  8. * DOS Program Information File structures, constants, etc.
  9. */
  10. #ifndef _INC_PIF
  11. #define _INC_PIF
  12. #define PIFNAMESIZE 30
  13. #define PIFSTARTLOCSIZE 63
  14. #define PIFDEFPATHSIZE 64
  15. #define PIFPARAMSSIZE 64
  16. #define PIFSHPROGSIZE 64
  17. #define PIFSHDATASIZE 64
  18. #define PIFDEFFILESIZE 80
  19. #ifndef LF_FACESIZE
  20. #define LF_FACESIZE 32
  21. #endif
  22. #define LARGEST_GROUP sizeof(STDPIF)
  23. #define OPENPROPS_NONE 0x0000
  24. #define OPENPROPS_RAWIO 0x0001
  25. #define GETPROPS_NONE 0x0000
  26. #define GETPROPS_RAWIO 0x0001
  27. #define GETPROPS_EXTENDED 0x0004
  28. #define SETPROPS_NONE 0x0000
  29. #define SETPROPS_RAWIO 0x0001
  30. #define SETPROPS_CACHE 0x0002
  31. #define SETPROPS_EXTENDED 0x0004
  32. #define FLUSHPROPS_NONE 0x0000
  33. #define FLUSHPROPS_DISCARD 0x0001
  34. #define CLOSEPROPS_NONE 0x0000
  35. #define CLOSEPROPS_DISCARD 0x0001
  36. #define LOADPROPLIB_DEFER 0x0001
  37. /* XLATOFF */
  38. #ifndef FAR
  39. #define FAR
  40. #endif
  41. /* XLATON */
  42. #ifdef RECT
  43. #define _INC_WINDOWS
  44. #endif
  45. #ifndef _INC_WINDOWS
  46. /* ASM
  47. RECT struc
  48. rcLeft dw ?
  49. rcTop dw ?
  50. rcRight dw ?
  51. rcBottom dw ?
  52. RECT ends
  53. */
  54. /* XLATOFF */
  55. typedef struct tagRECT {
  56. int left;
  57. int top;
  58. int right;
  59. int bottom;
  60. } RECT;
  61. typedef RECT *PRECT;
  62. typedef RECT FAR *LPRECT;
  63. /* XLATON */
  64. #endif
  65. /*
  66. * Property groups, used by PIFMGR.DLL and VxD interfaces
  67. *
  68. * The structures for each of the pre-defined, ordinal-based groups
  69. * is a logical view of data in the associated PIF file, if any -- not a
  70. * physical view.
  71. */
  72. #define GROUP_PRG 1 // program group
  73. #define PRG_DEFAULT (PRG_CLOSEONEXIT | PRG_AUTOWINEXEC)
  74. #define PRG_CLOSEONEXIT 0x0001 // MSflags & EXITMASK
  75. //#define PRG_RESERVED 0x0002 // Reserved
  76. #define PRG_AUTOWINEXEC 0x0004 // !(PfW386Flags & fDisAutoWinExec)
  77. #define PRGINIT_DEFAULT 0
  78. #define PRGINIT_MINIMIZED 0x0001 // PfW386Flags & fMinimized (NEW)
  79. #define PRGINIT_MAXIMIZED 0x0002 // PfW386Flags & fMaximized (NEW)
  80. #define PRGINIT_USEPIFICON 0x0004 // PfW386Flags & fUsePIFIcon (NEW)
  81. #define PRGINIT_REALMODE 0x0008 // PfW386Flags & fRealMode (NEW)
  82. #define PRGINIT_NOPIF 0x1000 // (NEW -- informational only)
  83. #define PRGINIT_DEFAULTPIF 0x2000 // (NEW -- informational only)
  84. #define ICONFILE_DEFAULT "PIFMGR.DLL"
  85. #define ICONINDEX_DEFAULT 0
  86. typedef struct PROPPRG { /* prg */
  87. WORD flPrg; // see PRG_ flags
  88. WORD flPrgInit; // see PRGINIT_ flags
  89. char achTitle[PIFNAMESIZE]; // name[30]
  90. char achCmdLine[PIFSTARTLOCSIZE]; // startfile[63] + params[64]
  91. char achWorkDir[PIFDEFPATHSIZE]; // defpath[64]
  92. WORD wHotKey; // PfHotKeyScan thru PfHotKeyVal
  93. BYTE rgbReserved[6]; // (Reserved)
  94. char achIconFile[PIFDEFFILESIZE]; // (NEW)
  95. WORD wIconIndex; // (NEW)
  96. char achPIFFile[PIFDEFFILESIZE]; // (NEW)
  97. } PROPPRG;
  98. typedef PROPPRG *PPROPPRG;
  99. typedef PROPPRG FAR *LPPROPPRG;
  100. typedef const PROPPRG FAR *LPCPROPPRG;
  101. #define GROUP_TSK 2 // multi-tasking group
  102. #define TSK_DEFAULT (TSK_BACKGROUND)
  103. #define TSK_ALLOWCLOSE 0x0001 // PfW386Flags & fEnableClose (SAME BIT)
  104. #define TSK_BACKGROUND 0x0002 // PfW386Flags & fBackground (SAME BIT)
  105. #define TSK_EXCLUSIVE 0x0004 // PfW386Flags & fExclusive (SAME BIT)
  106. #define TSK_FAKEBOOST 0x0008 // (NEW -- informational only)
  107. #define TSK_NOWARNTERMINATE 0x0010 // Don't warn before terminating (NEW)
  108. #define TSK_NOSCREENSAVER 0x0020 // Do not activate screen saver (NEW)
  109. #define TSKINIT_DEFAULT 0
  110. #define TSKFGND_DEFAULT 75 // normal fgnd % (NEW)
  111. #define TSKBGND_DEFAULT 25 // normal bgnd % (NEW)
  112. #define TSKFGND_OLD_DEFAULT 100 // normal fgnd setting
  113. #define TSKBGND_OLD_DEFAULT 50 // normal bgnd setting
  114. #define TSKBOOSTTIME_MIN 0 // in # milliseconds
  115. #define TSKBOOSTTIME_DEFAULT 1 // in # milliseconds
  116. #define TSKBOOSTTIME_MAX 5000 // in # milliseconds
  117. #define TSKIDLEDELAY_MIN 0 // in # milliseconds
  118. #define TSKIDLEDELAY_DEFAULT 500 // in # milliseconds
  119. #define TSKIDLEDELAY_MAX 5000 // in # milliseconds
  120. #define TSKIDLESENS_DEFAULT 50 // % (min-max == 0-100)
  121. typedef struct PROPTSK { /* tsk */
  122. WORD flTsk; // see TSK_ flags
  123. WORD flTskInit; // see TSKINIT_ flags
  124. short iFgndBoost; // PfFPriority (NEW, converted to boost)
  125. short iBgndBoost; // PfBPriority (NEW, converted to boost)
  126. WORD msKeyBoostTime; // ([386Enh]:KeyBoostTime)
  127. WORD msKeyIdleDelay; // ([386Enh]:KeyIdleDelay)
  128. WORD wIdleSensitivity; // PfW386Flags & fPollingDetect (NEW, %)
  129. } PROPTSK;
  130. typedef PROPTSK *PPROPTSK;
  131. typedef PROPTSK FAR *LPPROPTSK;
  132. #define GROUP_VID 3 // video group
  133. #define VID_DEFAULT (VID_TEXTEMULATE | VID_FULLSCREENGRFX | VID_AUTOSUSPEND)
  134. #define VID_TEXTEMULATE 0x0001 // PfW386Flags2 & fVidTxtEmulate (SAME BIT)
  135. #define VID_TEXTTRAP 0x0002 // PfW386Flags2 & fVidNoTrpTxt (INVERTED BIT)
  136. #define VID_LOGRFXTRAP 0x0004 // PfW386Flags2 & fVidNoTrpLRGrfx (INVERTED BIT)
  137. #define VID_HIGRFXTRAP 0x0008 // PfW386Flags2 & fVidNoTrpHRGrfx (INVERTED BIT)
  138. #define VID_RETAINMEMORY 0x0080 // PfW386Flags2 & fVidRetainAllo (SAME BIT)
  139. #define VID_FULLSCREEN 0x0100 // PfW386Flags & fFullScreen
  140. #define VID_FULLSCREENGRFX 0x0200 // PfW386Flags2 & fFullScreenGrfx (NEW)
  141. #define VIDINIT_DEFAULT 0
  142. #define VIDMODE_DEFAULT VIDMODE_TEXT
  143. #define VIDMODE_TEXT 1 // PfW386Flags2 & fVidTextMd
  144. #define VIDMODE_LOGRFX 2 // PfW386Flags2 & fVidLowRsGrfxMd
  145. #define VIDMODE_HIGRFX 3 // PfW386Flags2 & fVidHghRsGrfxMd
  146. #define VIDSCROLLFREQ_MIN 1 // in # lines
  147. #define VIDSCROLLFREQ_DEFAULT 2 // in # lines
  148. #define VIDSCROLLFREQ_MAX 25 // in # lines
  149. #define VIDUPDATEFREQ_MIN 10 // in # milliseconds
  150. #define VIDUPDATEFREQ_DEFAULT 50 // in # milliseconds
  151. #define VIDUPDATEFREQ_MAX 5000 // in # milliseconds
  152. #define VIDSCREENLINES_MIN 0 // in # lines (0 = use VDD value)
  153. #define VIDSCREENLINES_DEFAULT 0 // in # lines
  154. typedef struct PROPVID { /* vid */
  155. WORD flVid; // see VID_ flags
  156. WORD flVidInit; // see VIDINIT_ flags
  157. WORD iVidMode; // see VIDMODE_ ordinals
  158. WORD cScrollFreq; // ([386Enh]:ScrollFrequency)
  159. WORD msUpdateFreq; // ([386Enh]:WindowUpdateTime)
  160. WORD cScreenLines; // ([NonWindowsApp]:ScreenLines)
  161. BYTE abTextColorRemap[16]; // (NEW)
  162. } PROPVID;
  163. typedef PROPVID *PPROPVID;
  164. typedef PROPVID FAR *LPPROPVID;
  165. #define GROUP_MEM 4 // memory group
  166. #define MEM_DEFAULT 0
  167. #define MEMINIT_DEFAULT 0
  168. #define MEMINIT_NOHMA 0x0001 // PfW386Flags & fNoHMA
  169. #define MEMINIT_LOWLOCKED 0x0002 // PfW386Flags & fVMLocked
  170. #define MEMINIT_EMSLOCKED 0x0004 // PfW386Flags & fEMSLocked
  171. #define MEMINIT_XMSLOCKED 0x0008 // PfW386Flags & fXMSLocked
  172. #define MEMINIT_GLOBALPROTECT 0x0010 // PfW386Flags & fGlobalProtect (NEW)
  173. #define MEMINIT_STRAYPTRDETECT 0x0020 // PfW386Flags & fStrayPtrDetect(NEW)
  174. #define MEMLOW_MIN_MIN 0xFFFF // in KB
  175. #define MEMLOW_MIN_DEFAULT 0 // in KB
  176. #define MEMLOW_MIN_MAX 640 // in KB
  177. #define MEMLOW_MAX_MIN 0xFFFF // in KB
  178. #define MEMLOW_MAX_DEFAULT 0xFFFF // in KB
  179. #define MEMLOW_MAX_MAX 640 // in KB
  180. #define MEMEMS_MIN_MIN 0 // in KB
  181. #define MEMEMS_MIN_DEFAULT 0 // in KB
  182. #define MEMEMS_MIN_MAX 16384 // in KB
  183. #define MEMEMS_MAX_MIN 0xFFFF // in KB (-1 means "no limit")
  184. #define MEMEMS_MAX_DEFAULT 1024 // in KB
  185. #define MEMEMS_MAX_MAX 16384 // in KB
  186. #define MEMXMS_MIN_MIN 0 // in KB
  187. #define MEMXMS_MIN_DEFAULT 0 // in KB
  188. #define MEMXMS_MIN_MAX 16384 // in KB
  189. #define MEMXMS_MAX_MIN 0xFFFF // in KB (-1 means "no limit")
  190. #define MEMXMS_MAX_DEFAULT 1024 // in KB
  191. #define MEMXMS_MAX_MAX 16384 // in KB
  192. typedef struct PROPMEM { /* mem */
  193. WORD flMem; // see MEM_ flags
  194. WORD flMemInit; // see MEMINIT_ flags
  195. WORD wMinLow; // PfW386minmem
  196. WORD wMaxLow; // PfW386maxmem
  197. WORD wMinEMS; // PfMinEMMK
  198. WORD wMaxEMS; // PfMaxEMMK
  199. WORD wMinXMS; // PfMinXmsK
  200. WORD wMaxXMS; // PfMaxXmsK
  201. } PROPMEM;
  202. typedef PROPMEM *PPROPMEM;
  203. typedef PROPMEM FAR *LPPROPMEM;
  204. #define GROUP_KBD 5 // keyboard group
  205. #define KBD_DEFAULT (KBD_FASTPASTE)
  206. #define KBD_FASTPASTE 0x0001 // PfW386Flags & fINT16Paste
  207. #define KBD_NOALTTAB 0x0020 // PfW386Flags & fALTTABdis (SAME BIT)
  208. #define KBD_NOALTESC 0x0040 // PfW386Flags & fALTESCdis (SAME BIT)
  209. #define KBD_NOALTSPACE 0x0080 // PfW386Flags & fALTSPACEdis (SAME BIT)
  210. #define KBD_NOALTENTER 0x0100 // PfW386Flags & fALTENTERdis (SAME BIT)
  211. #define KBD_NOALTPRTSC 0x0200 // PfW386Flags & fALTPRTSCdis (SAME BIT)
  212. #define KBD_NOPRTSC 0x0400 // PfW386Flags & fPRTSCdis (SAME BIT)
  213. #define KBD_NOCTRLESC 0x0800 // PfW386Flags & fCTRLESCdis (SAME BIT)
  214. #define KBDINIT_DEFAULT 0
  215. #define KBDALTDELAY_MIN 1
  216. #define KBDALTDELAY_DEFAULT 5
  217. #define KBDALTDELAY_MAX 5000
  218. #define KBDALTPASTEDELAY_MIN 1
  219. #define KBDALTPASTEDELAY_DEFAULT 25
  220. #define KBDALTPASTEDELAY_MAX 5000
  221. #define KBDPASTEDELAY_MIN 1
  222. #define KBDPASTEDELAY_DEFAULT 3
  223. #define KBDPASTEDELAY_MAX 5000
  224. #define KBDPASTEFULLDELAY_MIN 1
  225. #define KBDPASTEFULLDELAY_DEFAULT 200
  226. #define KBDPASTEFULLDELAY_MAX 5000
  227. #define KBDPASTETIMEOUT_MIN 1
  228. #define KBDPASTETIMEOUT_DEFAULT 1000
  229. #define KBDPASTETIMEOUT_MAX 5000
  230. #define KBDPASTESKIP_MIN 1
  231. #define KBDPASTESKIP_DEFAULT 2
  232. #define KBDPASTESKIP_MAX 100
  233. #define KBDPASTECRSKIP_MIN 1
  234. #define KBDPASTECRSKIP_DEFAULT 10
  235. #define KBDPASTECRSKIP_MAX 100
  236. typedef struct PROPKBD { /* kbd */
  237. WORD flKbd; // see KBD_ flags
  238. WORD flKbdInit; // see KBDINIT_ flags
  239. WORD msAltDelay; // ([386Enh]:AltKeyDelay)
  240. WORD msAltPasteDelay; // ([386Enh]:AltPasteDelay)
  241. WORD msPasteDelay; // ([386Enh]:KeyPasteDelay)
  242. WORD msPasteFullDelay; // ([386Enh]:KeyBufferDelay)
  243. WORD msPasteTimeout; // ([386Enh]:KeyPasteTimeOut)
  244. WORD cPasteSkip; // ([386Enh]:KeyPasteSkipCount)
  245. WORD cPasteCRSkip; // ([386Enh]:KeyPasteCRSkipCount)
  246. } PROPKBD;
  247. typedef PROPKBD *PPROPKBD;
  248. typedef PROPKBD FAR *LPPROPKBD;
  249. #define GROUP_MSE 6 // mouse group
  250. /* No VxD currently pays attention to PROPMSE. VMDOSAPP should know how to
  251. * handle all cases resulting from a change in these flags.
  252. *
  253. * Note that MSE_WINDOWENABLE corresponds to the Windows NT "QuickEdit"
  254. * property, except backwards.
  255. */
  256. #define MSE_DEFAULT (MSE_WINDOWENABLE)
  257. #define MSE_WINDOWENABLE 0x0001 // ([NonWindowsApp]:MouseInDosBox)
  258. #define MSE_EXCLUSIVE 0x0002 // (NEW)
  259. #define MSEINIT_DEFAULT 0 // default flags
  260. typedef struct PROPMSE { /* mse */
  261. WORD flMse; // see MSE_ flags
  262. WORD flMseInit; // see MSEINIT_ flags
  263. } PROPMSE;
  264. typedef PROPMSE *PPROPMSE;
  265. typedef PROPMSE FAR *LPPROPMSE;
  266. #define GROUP_TMR 7 // timer group
  267. #define TMR_DEFAULT 0
  268. #define TMR_TRAPTMRPORTS 0x0001 // (NEW)
  269. #define TMR_FULLBGNDTICKS 0x0002 // (NEW)
  270. #define TMR_BURSTMODE 0x0004 // (NEW)
  271. #define TMR_PATCHEOI 0x0008 // (NEW)
  272. #define TMRINIT_DEFAULT 0
  273. #define TMRBURSTDELAY_MIN 0
  274. #define TMRBURSTDELAY_DEFAULT 0
  275. #define TMRBURSTDELAY_MAX 100
  276. typedef struct PROPTMR { /* tmr */
  277. WORD flTmr; // see TMR_ flags
  278. WORD flTmrInit; // see TMRINIT_ flags
  279. WORD wBurstDelay;
  280. } PROPTMR;
  281. typedef PROPTMR *PPROPTMR;
  282. typedef PROPTMR FAR *LPPROPTMR;
  283. // Extended TIMER data
  284. typedef struct PROPTMREXT { /* tmrext */
  285. PROPTMR tmrData; //
  286. WORD msIntFreq; // current interrupt frequency (in ms.)
  287. WORD wExecPercent; // current *actual* execution percentage
  288. } PROPTMREXT;
  289. typedef PROPTMREXT *PPROPTMREXT;
  290. typedef PROPTMREXT FAR *LPPROPTMREXT;
  291. #define GROUP_FNT 11 // font group
  292. #define FNT_DEFAULT (FNT_BOTHFONTS)
  293. #define FNT_RASTERFONTS 0x0004 // allow raster fonts in dialog
  294. #define FNT_TTFONTS 0x0008 // allow truetype fonts in dialog
  295. #define FNT_BOTHFONTS (FNT_RASTERFONTS | FNT_TTFONTS)
  296. #define FNT_AUTOSIZE 0x0010 // enable auto-sizing
  297. #define FNT_RASTER 0x0400 // specified font is raster
  298. #define FNT_TT 0x0800 // specified font is truetype
  299. #define FNT_FONTMASK (FNT_BOTHFONTS)
  300. #define FNT_FONTMASKBITS 2 // # of bits shifted left
  301. #define FNTINIT_DEFAULT 0
  302. #define FNTINIT_NORESTORE 0x0001 // don't restore on restart
  303. typedef struct PROPFNT { /* fnt */
  304. WORD flFnt; // see FNT_ flags
  305. WORD flFntInit; // see FNTINIT_ flags
  306. WORD cxFont; // width of desired font
  307. WORD cyFont; // height of desired font
  308. WORD cxFontActual; // actual width of desired font
  309. WORD cyFontActual; // actual height of desired font
  310. char achRasterFaceName[LF_FACESIZE]; // name to use for raster font
  311. char achTTFaceName[LF_FACESIZE]; // name to use for tt font
  312. #ifdef JAPAN //CodePage Support
  313. WORD wCharSet; // Character Set
  314. #endif
  315. } PROPFNT;
  316. typedef PROPFNT *PPROPFNT;
  317. typedef PROPFNT FAR *LPPROPFNT;
  318. #define GROUP_WIN 12 // window group
  319. #define WIN_DEFAULT (WIN_SAVESETTINGS)
  320. #define WIN_SAVESETTINGS 0x0001 // save settings on exit (default)
  321. #define WIN_TOOLBAR 0x0002 // enable toolbar
  322. #define WININIT_DEFAULT 0
  323. #define WININIT_NORESTORE 0x0001 // don't restore on restart
  324. typedef struct PROPWIN { /* win */
  325. WORD flWin; // see WIN_ flags
  326. WORD flWinInit; // see WININIT flags
  327. WORD cxCells; // width in cells
  328. WORD cyCells; // height in cells
  329. WORD cxClient; // width of client window
  330. WORD cyClient; // height of client window
  331. WORD cxWindow; // width of entire window
  332. WORD cyWindow; // height of entire window
  333. #ifdef WPF_SETMINPOSITION // if windows.h is included
  334. WINDOWPLACEMENT wp; // then use WINDOWPLACEMENT type
  335. #else // else define equivalent structure
  336. WORD wLength;
  337. WORD wShowFlags;
  338. WORD wShowCmd;
  339. WORD xMinimize;
  340. WORD yMinimize;
  341. WORD xMaximize;
  342. WORD yMaximize;
  343. RECT rcNormal;
  344. #endif
  345. } PROPWIN;
  346. typedef PROPWIN *PPROPWIN;
  347. typedef PROPWIN FAR *LPPROPWIN;
  348. #define GROUP_ENV 13 // environment/startup group
  349. #define ENV_DEFAULT 0
  350. #define ENVINIT_DEFAULT (ENVINIT_INSTRUCTIONS)
  351. #define ENVINIT_INSTRUCTIONS 0x0001 // ([386Enh]:DOSPromptExitInstruc)
  352. #define ENVSIZE_MIN 0
  353. #define ENVSIZE_DEFAULT 0
  354. #define ENVSIZE_MAX 4096
  355. typedef struct PROPENV { /* env */
  356. WORD flEnv; // see ENV_ flags
  357. WORD flEnvInit; // see ENVINIT_ flags
  358. char achBatchFile[PIFDEFFILESIZE]; // (NEW)
  359. WORD cbEnvironment; // ([386Enh]:CommandEnvSize)
  360. #ifdef JAPAN //CodePage Support
  361. WORD wCodePage; // Current CodePage
  362. WORD wInitCodePage; // Initial CodePage
  363. #endif
  364. } PROPENV;
  365. typedef PROPENV *PPROPENV;
  366. typedef PROPENV FAR *LPPROPENV;
  367. #define MAX_GROUP 0x0FF
  368. #define MAX_VALID_GROUP GROUP_ENV
  369. /*
  370. * Additional group ordinal bits that can be passed to VxD property hooks
  371. */
  372. #define EXT_GROUP_QUERY 0x100
  373. #define EXT_GROUP_UPDATE 0x200
  374. /*
  375. * PIF "file" structures, used by .PIFs
  376. */
  377. #define PIFEXTSIGSIZE 16 // Length of extension signatures
  378. #define MAX_GROUP_NAME PIFEXTSIGSIZE //
  379. #define STDHDRSIG "MICROSOFT PIFEX" // extsig value for stdpifext
  380. #define LASTHDRPTR 0xFFFF // This value in the
  381. // extnxthdrfloff field indicates
  382. // there are no more extensions.
  383. #define W286HDRSIG30 "WINDOWS 286 3.0"
  384. #define W386HDRSIG30 "WINDOWS 386 3.0"
  385. #define WENHHDRSIG40 "WINDOWS PIF.402" // (NEW)
  386. #define WENHICOSIG001 "WINDOWS ICO.001" // (NEW)
  387. typedef struct PIFEXTHDR { /* peh */
  388. char extsig[PIFEXTSIGSIZE];
  389. WORD extnxthdrfloff;
  390. WORD extfileoffset;
  391. WORD extsizebytes;
  392. } PIFEXTHDR;
  393. typedef PIFEXTHDR *PPIFEXTHDR;
  394. typedef PIFEXTHDR FAR *LPPIFEXTHDR;
  395. /* Flags for MSflags
  396. */
  397. #define fResident 0x01 // Directly Modifies: Memory
  398. #define fGraphics 0x02 // Screen Exchange: Graphics/Text
  399. #define fNoSwitch 0x04 // Program Switch: Prevent
  400. #define fNoGrab 0x08 // Screen Exchange: None
  401. #define fDestroy 0x10 // Close Window on exit
  402. #define fCOM2 0x40 // Directly Modifies: COM2
  403. #define fCOM1 0x80 // Directly Modifies: COM1
  404. #define MEMMASK fResident
  405. #define GRAPHMASK fGraphics
  406. #define TEXTMASK ((BYTE)(~GRAPHMASK))
  407. #define PSMASK fNoSwitch
  408. #define SGMASK fNoGrab
  409. #define EXITMASK fDestroy
  410. #define COM2MASK fCOM2
  411. #define COM1MASK fCOM1
  412. /* Flags for behavior
  413. */
  414. #define fScreen 0x80 // Directly Modifies: Screen
  415. #define fForeground 0x40 // Set same as fScreen (alias)
  416. #define f8087 0x20 // No PIFEDIT control
  417. #define fKeyboard 0x10 // Directly Modifies: Keyboard
  418. #define SCRMASK (fScreen + fForeground)
  419. #define MASK8087 f8087
  420. #define KEYMASK fKeyboard
  421. /* Flags for sysflags
  422. */
  423. #define SWAPMASK 0x20
  424. #define PARMMASK 0x40
  425. /*
  426. * All strings in the STDPIF are in the OEM character set.
  427. */
  428. typedef struct STDPIF { /* std */ //Examples
  429. BYTE unknown; // 0x00 0x00
  430. BYTE id; // 0x01 0x78
  431. char appname[PIFNAMESIZE]; // 0x02 'MS-DOS Prompt'
  432. WORD maxmem; // 0x20 0x0200 (512Kb)
  433. WORD minmem; // 0x22 0x0080 (128Kb)
  434. char startfile[PIFSTARTLOCSIZE]; // 0x24 "COMMAND.COM"
  435. BYTE MSflags; // 0x63 0x10
  436. BYTE reserved; // 0x64 0x00
  437. char defpath[PIFDEFPATHSIZE]; // 0x65 "\"
  438. char params[PIFPARAMSSIZE]; // 0xA5 ""
  439. BYTE screen; // 0xE5 0x00
  440. BYTE cPages; // 0xE6 0x01 (ALWAYS!)
  441. BYTE lowVector; // 0xE7 0x00 (ALWAYS!)
  442. BYTE highVector; // 0xE8 0xFF (ALWAYS!)
  443. BYTE rows; // 0xE9 0x19 (Not used)
  444. BYTE cols; // 0xEA 0x50 (Not used)
  445. BYTE rowoff; // 0xEB 0x00 (Not used)
  446. BYTE coloff; // 0xEC 0x00 (Not used)
  447. WORD sysmem; // 0xED 0x0007 (Not used; 7=>Text, 23=>Grfx/Mult Text)
  448. char shprog[PIFSHPROGSIZE]; // 0xEF 0's (Not used)
  449. char shdata[PIFSHDATASIZE]; // 0x12F 0's (Not used)
  450. BYTE behavior; // 0x16F 0x00
  451. BYTE sysflags; // 0x170 0x00 (Not used)
  452. } STDPIF;
  453. typedef STDPIF *PSTDPIF;
  454. typedef STDPIF FAR *LPSTDPIF;
  455. /* Flags for PfW286Flags
  456. */
  457. #define fALTTABdis286 0x0001
  458. #define fALTESCdis286 0x0002
  459. #define fALTPRTSCdis286 0x0004
  460. #define fPRTSCdis286 0x0008
  461. #define fCTRLESCdis286 0x0010
  462. #define fNoSaveVid286 0x0020 // New for 3.10
  463. #define fCOM3_286 0x4000
  464. #define fCOM4_286 0x8000
  465. typedef struct W286PIF30 { /* 286 */ //Examples
  466. WORD PfMaxXmsK; // 0x19D 0x0000
  467. WORD PfMinXmsK; // 0x19F 0x0000
  468. WORD PfW286Flags; // 0x1A1 0x0000
  469. } W286PIF30;
  470. typedef W286PIF30 *PW286PIF30;
  471. typedef W286PIF30 FAR *LPW286PIF30;
  472. /* Flags for PfW386Flags
  473. */
  474. #define fEnableClose 0x00000001 //
  475. #define fEnableCloseBit 0 //
  476. #define fBackground 0x00000002 //
  477. #define fBackgroundBit 1 //
  478. #define fExclusive 0x00000004 //
  479. #define fExclusiveBit 2 //
  480. #define fFullScreen 0x00000008 //
  481. #define fFullScreenBit 3 //
  482. #define fALTTABdis 0x00000020 //
  483. #define fALTTABdisBit 5 //
  484. #define fALTESCdis 0x00000040 //
  485. #define fALTESCdisBit 6 //
  486. #define fALTSPACEdis 0x00000080 //
  487. #define fALTSPACEdisBit 7 //
  488. #define fALTENTERdis 0x00000100 //
  489. #define fALTENTERdisBit 8 //
  490. #define fALTPRTSCdis 0x00000200 //
  491. #define fALTPRTSCdisBit 9 //
  492. #define fPRTSCdis 0x00000400 //
  493. #define fPRTSCdisBit 10 //
  494. #define fCTRLESCdis 0x00000800 //
  495. #define fCTRLESCdisBit 11 //
  496. #define fPollingDetect 0x00001000 //
  497. #define fPollingDetectBit 12 //
  498. #define fNoHMA 0x00002000 //
  499. #define fNoHMABit 13 //
  500. #define fHasHotKey 0x00004000 //
  501. #define fHasHotKeyBit 14 //
  502. #define fEMSLocked 0x00008000 //
  503. #define fEMSLockedBit 15 //
  504. #define fXMSLocked 0x00010000 //
  505. #define fXMSLockedBit 16 //
  506. #define fINT16Paste 0x00020000 //
  507. #define fINT16PasteBit 17 //
  508. #define fVMLocked 0x00040000 //
  509. #define fVMLockedBit 18 //
  510. #define fGlobalProtect 0x00080000 // New for 4.00
  511. #define fGlobalProtectBit 19 // New for 4.00
  512. #define fMinimized 0x00100000 // New for 4.00
  513. #define fMinimizedBit 20 // New for 4.00
  514. #define fMaximized 0x00200000 // New for 4.00
  515. #define fMaximizedBit 21 // New for 4.00
  516. #define fRealMode 0x00800000 // New for 4.00
  517. #define fRealModeBit 23 // New for 4.00
  518. #define fDisAutoWinExec 0x01000000 // New for 4.00
  519. #define fDisAutoWinExecBit 24 // New for 4.00
  520. #define fStrayPtrDetect 0x02000000 // New for 4.00
  521. #define fStrayPtrDetectBit 25 // New for 4.00
  522. /* Flags for PfW386Flags2
  523. *
  524. * NOTE THAT THE LOW 16 BITS OF THIS DWORD ARE VDD RELATED
  525. * NOTE THAT ALL OF THE LOW 16 BITS ARE RESERVED FOR VIDEO BITS
  526. *
  527. * You cannot monkey with these bits locations without breaking
  528. * all VDDs as well as all old PIFs. SO DON'T MESS WITH THEM.
  529. */
  530. #define fVDDMask 0x0000FFFF //
  531. #define fVDDMinBit 0 //
  532. #define fVDDMaxBit 15 //
  533. #define fVidTxtEmulate 0x00000001 //
  534. #define fVidTxtEmulateBit 0 //
  535. #define fVidNoTrpTxt 0x00000002 //
  536. #define fVidNoTrpTxtBit 1 //
  537. #define fVidNoTrpLRGrfx 0x00000004 //
  538. #define fVidNoTrpLRGrfxBit 2 //
  539. #define fVidNoTrpHRGrfx 0x00000008 //
  540. #define fVidNoTrpHRGrfxBit 3 //
  541. #define fVidTextMd 0x00000010 //
  542. #define fVidTextMdBit 4 //
  543. #define fVidLowRsGrfxMd 0x00000020 //
  544. #define fVidLowRsGrfxMdBit 5 //
  545. #define fVidHghRsGrfxMd 0x00000040 //
  546. #define fVidHghRsGrfxMdBit 6 //
  547. #define fVidRetainAllo 0x00000080 //
  548. #define fVidRetainAlloBit 7 //
  549. /*
  550. * This mask is used to isolate status bits shared with VM_Descriptor
  551. */
  552. #define PifDescMask \
  553. (fALTTABdis + fALTESCdis + fALTSPACEdis + \
  554. fALTENTERdis + fALTPRTSCdis + fPRTSCdis + \
  555. fCTRLESCdis + fPollingDetect+ fNoHMA + \
  556. fHasHotKey + fEMSLocked + fXMSLocked + \
  557. fINT16Paste + fVMLocked)
  558. typedef struct W386PIF30 { /* 386 */ //Examples
  559. // These new maxmem/minmem fields allow values
  560. // that will not conflict with the 286-specific values
  561. WORD PfW386maxmem; // 0x1B9 0xFFFF (-1)
  562. WORD PfW386minmem; // 0x1BB 0xFFFF (-1)
  563. WORD PfFPriority; // 0x1BD 0x0064 (100)
  564. WORD PfBPriority; // 0x1BF 0x0032 (50)
  565. WORD PfMaxEMMK; // 0x1C1 0x0000 (0)
  566. WORD PfMinEMMK; // 0x1C3 0x0000 (0)
  567. WORD PfMaxXmsK; // 0x1C5 0x0800 (2048)
  568. WORD PfMinXmsK; // 0x1C7 0x0000 (0)
  569. DWORD PfW386Flags; // 0x1C9 0x00021003
  570. DWORD PfW386Flags2; // 0x1CD 0x0000001F
  571. WORD PfHotKeyScan; // 0x1D1 Scan code in lower byte
  572. WORD PfHotKeyShVal; // 0x1D3 Shift state
  573. WORD PfHotKeyShMsk; // 0x1D5 Mask for shift states interested in
  574. BYTE PfHotKeyVal; // 0x1D7 Enhanced flags
  575. BYTE PfHotKeyPad[9]; // 0x1D8 Pad Hot key section to 16 bytes
  576. char PfW386params[PIFPARAMSSIZE]; // 0x1E1
  577. } W386PIF30;
  578. typedef W386PIF30 *PW386PIF30;
  579. typedef W386PIF30 FAR *LPW386PIF30;
  580. /* AssociateProperties associations
  581. */
  582. #define HVM_ASSOCIATION 1
  583. #define HWND_ASSOCIATION 2
  584. /* SHEETTYPEs for AddPropertySheet/EnumPropertySheets
  585. */
  586. #define SHEETTYPE_SIMPLE 0
  587. #define SHEETTYPE_ADVANCED 1
  588. /* External function ordinals and prototypes
  589. */
  590. #define ORD_OPENPROPERTIES 2
  591. #define ORD_GETPROPERTIES 3
  592. #define ORD_SETPROPERTIES 4
  593. #define ORD_EDITPROPERTIES 5
  594. #define ORD_FLUSHPROPERTIES 6
  595. #define ORD_ENUMPROPERTIES 7
  596. #define ORD_ASSOCIATEPROPERTIES 8
  597. #define ORD_CLOSEPROPERTIES 9
  598. #define ORD_LOADPROPERTYLIB 10
  599. #define ORD_ENUMPROPERTYLIBS 11
  600. #define ORD_FREEPROPERTYLIB 12
  601. #define ORD_ADDPROPERTYSHEET 13
  602. #define ORD_REMOVEPROPERTYSHEET 14
  603. #define ORD_LOADPROPERTYSHEETS 15
  604. #define ORD_ENUMPROPERTYSHEETS 16
  605. #define ORD_FREEPROPERTYSHEETS 17
  606. /* XLATOFF */
  607. #ifdef WINAPI
  608. int WINAPI OpenProperties(LPCSTR lpszApp, int hInf, int flOpt);
  609. int WINAPI GetProperties(int hProps, LPCSTR lpszGroup, LPVOID lpProps, int cbProps, int flOpt);
  610. int WINAPI SetProperties(int hProps, LPCSTR lpszGroup, CONST VOID FAR *lpProps, int cbProps, int flOpt);
  611. int WINAPI EditProperties(int hProps, LPCSTR lpszTitle, UINT uStartPage, HWND hwnd, UINT uMsgPost);
  612. int WINAPI FlushProperties(int hProps, int flOpt);
  613. int WINAPI EnumProperties(int hProps);
  614. long WINAPI AssociateProperties(int hProps, int iAssociate, long lData);
  615. int WINAPI CloseProperties(int hProps, int flOpt);
  616. #ifdef PIF_PROPERTY_SHEETS
  617. int WINAPI LoadPropertyLib(LPCSTR lpszDLL, int fLoad);
  618. int WINAPI EnumPropertyLibs(int iLib, LPHANDLE lphDLL, LPSTR lpszDLL, int cbszDLL);
  619. BOOL WINAPI FreePropertyLib(int hLib);
  620. int WINAPI AddPropertySheet(const PROPSHEETPAGE FAR *lppsi, int iType);
  621. BOOL WINAPI RemovePropertySheet(int hSheet);
  622. int WINAPI LoadPropertySheets(int hProps, int flags);
  623. int WINAPI EnumPropertySheets(int hProps, int iType, int iSheet, LPPROPSHEETPAGE lppsi);
  624. int WINAPI FreePropertySheets(int hProps, int flags);
  625. #endif
  626. #endif
  627. /* XLATON */
  628. #endif // _INC_PIF