Source code of Windows XP (NT5)
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.

443 lines
25 KiB

  1. #include <pifdump.h>
  2. #pragma hdrstop
  3. #define STRING(x) x[0]?x:"(empty string in .pif file)"
  4. int __cdecl main( int argc, char *argv[])
  5. {
  6. HFILE hFile;
  7. STDPIF stdpif;
  8. PIFEXTHDR pifexthdr;
  9. LONG cbRead;
  10. CHAR szTemp[ 512 ];
  11. memset( &stdpif, 0, sizeof(stdpif) );
  12. if (argc!=2)
  13. {
  14. printf("usage: pifdump filename.pif\n" );
  15. return(1);
  16. }
  17. hFile = _lopen( argv[1], OF_READ );
  18. if (hFile == HFILE_ERROR)
  19. {
  20. printf( "pifdump: unable to open file %s, err %d\n",
  21. argv[1],
  22. GetLastError()
  23. );
  24. return(1);
  25. }
  26. _lread( hFile, &stdpif, sizeof(stdpif) );
  27. printf( "\n===== Dump of PIF file (%s) =====\n\n", argv[1] );
  28. printf( "[Standard PIF Data]\n" );
  29. printf( " unknown = 0x%02X\n", stdpif.unknown );
  30. printf( " id = 0x%02X\n", stdpif.id );
  31. printf( " appname = %s\n", STRING(stdpif.appname) );
  32. printf( " maxmem = 0x%04X\n", stdpif.maxmem );
  33. printf( " minmem = 0x%04X\n", stdpif.minmem );
  34. printf( " startfile = %s\n", STRING(stdpif.startfile) );
  35. printf( " MSflags = 0x%02X\n", stdpif.MSflags );
  36. if (stdpif.MSflags & fResident)
  37. printf( " [fResident is set ==> directly modifies memory]\n", fResident );
  38. if (stdpif.MSflags & fGraphics)
  39. printf( " [fGraphics is set ==> screen exchange: graphics/text]\n", fGraphics );
  40. if (stdpif.MSflags & fNoSwitch)
  41. printf( " [fNoSwitch is set ==> program switch: prevent]\n", fNoSwitch );
  42. if (stdpif.MSflags & fNoGrab)
  43. printf( " [fNoGrab is set ==> screen exchange: none]\n", fNoGrab );
  44. if (stdpif.MSflags & fDestroy)
  45. printf( " [fDestroy is set ==> close window on exit]\n", fDestroy );
  46. if (stdpif.MSflags & fCOM1)
  47. printf( " [fCOM1 is set ==> directly modifies: COM1]\n", fCOM1 );
  48. if (stdpif.MSflags & fCOM2)
  49. printf( " [fCOM2 is set ==> directly modifies: COM2]\n", fCOM2 );
  50. printf( " reserved = 0x%02X\n", stdpif.reserved );
  51. printf( " defpath = %s\n", STRING(stdpif.defpath) );
  52. printf( " params = %s\n", STRING(stdpif.params) );
  53. printf( " cPages = 0x%02X (should always be 0x01!)\n", stdpif.cPages );
  54. printf( " lowVector = 0x%02X (should always be 0x00!)\n", stdpif.lowVector );
  55. printf( " highVector = 0x%02X (should always be 0xFF!)\n", stdpif.highVector );
  56. printf( " rows = 0x%02X (not used)\n", stdpif.rows );
  57. printf( " cols = 0x%02X (not used)\n", stdpif.cols );
  58. printf( " rowoff = 0x%02X (not used)\n", stdpif.rowoff );
  59. printf( " coloff = 0x%02X (not used)\n", stdpif.coloff );
  60. printf( " sysmem = 0x%04X (not used)\n", stdpif.sysmem );
  61. printf( " behavior = 0x%02X\n", stdpif.behavior);
  62. if (stdpif.behavior & fScreen)
  63. printf( " [fScreen (0x%02X) is set ==> directly modifies screen]\n", fScreen );
  64. if (stdpif.behavior & fForeground)
  65. printf( " [fForeground (0x%02X) is set ==> Set same as fScreen (alias)]\n", fForeground );
  66. if (stdpif.behavior & f8087)
  67. printf( " [f8087 (0x%02X) is set ==> No PIFEDIT control]\n", f8087 );
  68. if (stdpif.behavior & fKeyboard)
  69. printf( " [fKeyboard (0x%02X) is set ==> directly modifies keyboard]\n", fKeyboard );
  70. printf( " sysflags = 0x%02X\n", stdpif.sysflags);
  71. // Read in extended header sections
  72. while( (cbRead = _lread( hFile, &pifexthdr, sizeof( pifexthdr )))!=0 )
  73. {
  74. printf( "\n[%s]\n", pifexthdr.extsig );
  75. if (strcmp(pifexthdr.extsig, STDHDRSIG)==0) {
  76. if (pifexthdr.extnxthdrfloff==0xFFFF) {
  77. printf( " No more entries\n" );
  78. goto OutOfHere;
  79. }
  80. else
  81. printf( " No information in \"%s\" section (as expected)\n\n", STDHDRSIG );
  82. }
  83. if (strcmp(pifexthdr.extsig, W286HDRSIG30)==0) {
  84. W286PIF30 w286ext30;
  85. _lread( hFile, &w286ext30, sizeof( w286ext30 ) );
  86. printf( " PfMaxXmsK = 0x%04X\n", w286ext30.PfMaxXmsK );
  87. printf( " PfMinXmsK = 0x%04X\n", w286ext30.PfMinXmsK );
  88. printf( " PfW286Flags = 0x%04X\n", w286ext30.PfW286Flags );
  89. if (w286ext30.PfW286Flags & fALTTABdis286)
  90. printf( " fALTTABdis286 is set.\n" );
  91. if (w286ext30.PfW286Flags & fALTESCdis286)
  92. printf( " fALTESCdis286 is set.\n" );
  93. if (w286ext30.PfW286Flags & fALTESCdis286)
  94. printf( " fALTPRTSCdis286 is set.\n" );
  95. if (w286ext30.PfW286Flags & fPRTSCdis286)
  96. printf( " fPRTSCdis286 is set.\n" );
  97. if (w286ext30.PfW286Flags & fCTRLESCdis286)
  98. printf( " fCTRLESCdis286 is set.\n" );
  99. if (w286ext30.PfW286Flags & fNoSaveVid286)
  100. printf( " fNoSaveVid286 is set.\n" );
  101. if (w286ext30.PfW286Flags & fCOM3_286)
  102. printf( " fCOM3_286 is set.\n" );
  103. if (w286ext30.PfW286Flags & fCOM4_286)
  104. printf( " fCOM4_286 is set.\n" );
  105. printf( "\n" );
  106. }
  107. if (strcmp(pifexthdr.extsig, W386HDRSIG30)==0) {
  108. W386PIF30 w386ext30;
  109. _lread( hFile, &w386ext30, sizeof( w386ext30 ) );
  110. printf( " PfW386maxmem = 0x%02X (%d)\n", w386ext30.PfW386maxmem, w386ext30.PfW386maxmem );
  111. printf( " PfW386minmem = 0x%02X (%d)\n", w386ext30.PfW386minmem, w386ext30.PfW386minmem );
  112. printf( " PfFPriority = 0x%02X (%d)\n", w386ext30.PfFPriority, w386ext30.PfFPriority );
  113. printf( " PfBPriority = 0x%02X (%d)\n", w386ext30.PfBPriority, w386ext30.PfBPriority );
  114. printf( " PfMaxEMMK = 0x%02X (%d)\n", w386ext30.PfMaxEMMK, w386ext30.PfMaxEMMK );
  115. printf( " PfMinEMMK = 0x%02X (%d)\n", w386ext30.PfMinEMMK, w386ext30.PfMinEMMK );
  116. printf( " PfMaxXmsK = 0x%02X (%d)\n", w386ext30.PfMaxXmsK, w386ext30.PfMaxXmsK );
  117. printf( " PfMinXmsK = 0x%02X (%d)\n", w386ext30.PfMinXmsK, w386ext30.PfMinXmsK );
  118. printf( " PfW386Flags = 0x%08X\n", w386ext30.PfW386Flags );
  119. if (w386ext30.PfW386Flags & fEnableClose)
  120. printf( " fEnableClose is set.\n" );
  121. if (w386ext30.PfW386Flags & fBackground)
  122. printf( " fBackground is set.\n" );
  123. if (w386ext30.PfW386Flags & fExclusive)
  124. printf( " fExclusive is set.\n" );
  125. if (w386ext30.PfW386Flags & fFullScreen)
  126. printf( " fFullScreen is set.\n" );
  127. if (w386ext30.PfW386Flags & fALTTABdis)
  128. printf( " fALTTABdis is set.\n" );
  129. if (w386ext30.PfW386Flags & fALTESCdis)
  130. printf( " fALTESCdis is set.\n" );
  131. if (w386ext30.PfW386Flags & fALTSPACEdis)
  132. printf( " fALTSPACEdis is set.\n" );
  133. if (w386ext30.PfW386Flags & fALTENTERdis)
  134. printf( " fALTENTERdis is set.\n" );
  135. if (w386ext30.PfW386Flags & fALTPRTSCdis)
  136. printf( " fALTPRTSCdis is set.\n" );
  137. if (w386ext30.PfW386Flags & fPRTSCdis)
  138. printf( " fPRTSCdis is set.\n" );
  139. if (w386ext30.PfW386Flags & fCTRLESCdis)
  140. printf( " fCTRLESCdis is set.\n" );
  141. if (w386ext30.PfW386Flags & fPollingDetect)
  142. printf( " fPollingDetect is set.\n" );
  143. if (w386ext30.PfW386Flags & fNoHMA)
  144. printf( " fNoHMA is set.\n" );
  145. if (w386ext30.PfW386Flags & fHasHotKey)
  146. printf( " fHasHotKey is set.\n" );
  147. if (w386ext30.PfW386Flags & fEMSLocked)
  148. printf( " fEMSLocked is set.\n" );
  149. if (w386ext30.PfW386Flags & fXMSLocked)
  150. printf( " fXMSLocked is set.\n" );
  151. if (w386ext30.PfW386Flags & fINT16Paste)
  152. printf( " fINT16Paste is set.\n" );
  153. if (w386ext30.PfW386Flags & fVMLocked)
  154. printf( " fVMLocked is set.\n" );
  155. if (w386ext30.PfW386Flags & fGlobalProtect)
  156. printf( " fGlobalProtect is set.\n" );
  157. if (w386ext30.PfW386Flags & fMinimized)
  158. printf( " fMinimized is set.\n" );
  159. if (w386ext30.PfW386Flags & fMaximized)
  160. printf( " fMaximized is set.\n" );
  161. if (w386ext30.PfW386Flags & fRealMode)
  162. printf( " fRealMode is set.\n" );
  163. if (w386ext30.PfW386Flags & fWinLie)
  164. printf( " fWinLie is set.\n" );
  165. if (w386ext30.PfW386Flags & fStrayPtrDetect)
  166. printf( " fStrayPtrDetect is set.\n" );
  167. if (w386ext30.PfW386Flags & fNoSuggestMSDOS)
  168. printf( " fNoSuggestMSDOS is set.\n" );
  169. if (w386ext30.PfW386Flags & fLocalUMBs)
  170. printf( " fLocalUMBs is set.\n" );
  171. if (w386ext30.PfW386Flags & fRealModeSilent)
  172. printf( " fRealModeSilent is set.\n" );
  173. if (w386ext30.PfW386Flags & fQuickStart)
  174. printf( " fQuickStart is set.\n" );
  175. if (w386ext30.PfW386Flags & fAmbiguousPIF)
  176. printf( " fAmbiguousPIF is set.\n" );
  177. printf( " PfW386Flags2 = 0x%08X\n", w386ext30.PfW386Flags2 );
  178. if (w386ext30.PfW386Flags2 & fVidTxtEmulate)
  179. printf( " fVidTxtEmulate is set.\n" );
  180. if (w386ext30.PfW386Flags2 & fVidNoTrpTxt)
  181. printf( " fVidNoTrpTxt is set.\n" );
  182. if (w386ext30.PfW386Flags2 & fVidNoTrpLRGrfx)
  183. printf( " fVidNoTrpLRGrfx is set.\n" );
  184. if (w386ext30.PfW386Flags2 & fVidNoTrpHRGrfx)
  185. printf( " fVidNoTrpHRGrfx is set.\n" );
  186. if (w386ext30.PfW386Flags2 & fVidTextMd)
  187. printf( " fVidTextMd is set.\n" );
  188. if (w386ext30.PfW386Flags2 & fVidLowRsGrfxMd)
  189. printf( " fVidLowRsGrfxd is set.\n" );
  190. if (w386ext30.PfW386Flags2 & fVidHghRsGrfxMd)
  191. printf( " fVidHghRsGrfxd is set.\n" );
  192. if (w386ext30.PfW386Flags2 & fVidRetainAllo)
  193. printf( " fVidRetainAllo is set.\n" );
  194. printf( " PfHotKeyScan = 0x%04X\n", w386ext30.PfHotKeyScan );
  195. printf( " PfHotKeyShVal = 0x%04X\n", w386ext30.PfHotKeyShVal );
  196. printf( " PfHotKeyShMsk = 0x%04X\n", w386ext30.PfHotKeyShMsk );
  197. printf( " PfHotKeyVal = 0x%02X\n", w386ext30.PfHotKeyVal );
  198. printf( " PfW386params = %s\n", STRING(w386ext30.PfW386params) );
  199. printf( "\n" );
  200. }
  201. if (strcmp(pifexthdr.extsig, WNTHDRSIG31)==0) {
  202. WNTPIF31 wntpif31;
  203. _lread( hFile, &wntpif31, sizeof( wntpif31 ) );
  204. printf( " ==> Internal Revision %d <==\n", wntpif31.wInternalRevision );
  205. printf( " dwWNTFlags = 0x%08X\n", wntpif31.nt31Prop.dwWNTFlags );
  206. if (wntpif31.nt31Prop.dwWNTFlags & COMPAT_TIMERTIC)
  207. printf( " COMPAT_TIMERTIC is set.\n" );
  208. printf( " dwRes1 = 0x%08X\n", wntpif31.nt31Prop.dwRes1 );
  209. printf( " dwRes2 = 0x%08X\n", wntpif31.nt31Prop.dwRes2 );
  210. printf( " achConfigFile = %s\n", STRING(wntpif31.nt31Prop.achConfigFile) );
  211. printf( " achAuotexecFile = %s\n", STRING(wntpif31.nt31Prop.achAutoexecFile) );
  212. }
  213. if (strcmp(pifexthdr.extsig, WENHHDRSIG40)==0) {
  214. WENHPIF40 wenhpif40;
  215. _lread( hFile, &wenhpif40, sizeof( wenhpif40 ) );
  216. printf( " ==> Internal Revision %d <==\n", wenhpif40.wInternalRevision );
  217. printf( " dwEnhModeFlagsProp = 0x%08X\n", wenhpif40.dwEnhModeFlagsProp );
  218. printf( " dwRealModeFlagsProp = 0x%08X\n", wenhpif40.dwRealModeFlagsProp );
  219. printf( " achOtherFileProp = %s\n", STRING(wenhpif40.achOtherFileProp) );
  220. printf( " achIconFileProp = %s\n", STRING(wenhpif40.achIconFileProp) );
  221. printf( " wIconInxexProp = 0x%04X\n", wenhpif40.wIconIndexProp );
  222. printf( " PROPTSK:\n" );
  223. printf( " flTsk = 0x%04X\n", wenhpif40.tskProp.flTsk );
  224. if (wenhpif40.tskProp.flTsk & TSK_ALLOWCLOSE)
  225. printf( " TSK_ALLOWCLOSE is set.\n" );
  226. if (wenhpif40.tskProp.flTsk & TSK_BACKGROUND)
  227. printf( " TSK_BACKGROUND is set.\n" );
  228. if (wenhpif40.tskProp.flTsk & TSK_EXCLUSIVE)
  229. printf( " TSK_EXCLUSIVE is set.\n" );
  230. if (wenhpif40.tskProp.flTsk & TSK_NOWARNTERMINATE)
  231. printf( " TSK_NOWARNTERMINATE is set.\n" );
  232. if (wenhpif40.tskProp.flTsk & TSK_NOSCREENSAVER)
  233. printf( " TSK_NOSCREENSAVER is set.\n" );
  234. printf( " flTskInit = 0x%04X\n", wenhpif40.tskProp.flTskInit );
  235. printf( " wReserved1 = 0x%04X\n", wenhpif40.tskProp.wReserved1 );
  236. printf( " wReserved2 = 0x%04X\n", wenhpif40.tskProp.wReserved2 );
  237. printf( " wReserved3 = 0x%04X\n", wenhpif40.tskProp.wReserved3 );
  238. printf( " wReserved4 = 0x%04X\n", wenhpif40.tskProp.wReserved4 );
  239. printf( " wIdleSensitivity = 0x%04X\n", wenhpif40.tskProp.wIdleSensitivity );
  240. printf( " PROPVID:\n" );
  241. printf( " flVid = 0x%04X\n", wenhpif40.vidProp.flVid );
  242. if (wenhpif40.vidProp.flVid & VID_TEXTEMULATE)
  243. printf( " VID_TEXTEMULATE is set.\n" );
  244. if (wenhpif40.vidProp.flVid & VID_RETAINMEMORY)
  245. printf( " VID_RETAINMEMORY is set.\n" );
  246. if (wenhpif40.vidProp.flVid & VID_FULLSCREEN)
  247. printf( " VID_FULLSCREEN is set.\n" );
  248. printf( " flVidInit = 0x%04X\n", wenhpif40.vidProp.flVidInit );
  249. printf( " wReserved1 = 0x%04X\n", wenhpif40.vidProp.wReserved1 );
  250. printf( " wReserved2 = 0x%04X\n", wenhpif40.vidProp.wReserved2 );
  251. printf( " wReserved3 = 0x%04X\n", wenhpif40.vidProp.wReserved3 );
  252. printf( " cScreenLines = 0x%04X\n", wenhpif40.vidProp.cScreenLines );
  253. printf( " PROPKBD:\n" );
  254. printf( " flKbd = 0x%04X\n", wenhpif40.kbdProp.flKbd );
  255. if (wenhpif40.kbdProp.flKbd & KBD_FASTPASTE)
  256. printf( " KBD_FASTPASTE is set.\n" );
  257. if (wenhpif40.kbdProp.flKbd & KBD_NOALTTAB)
  258. printf( " KBD_NOALTTAB is set.\n" );
  259. if (wenhpif40.kbdProp.flKbd & KBD_NOALTESC)
  260. printf( " KBD_NOALTESC is set.\n" );
  261. if (wenhpif40.kbdProp.flKbd & KBD_NOALTSPACE)
  262. printf( " KBD_NOALTSPACE is set.\n" );
  263. if (wenhpif40.kbdProp.flKbd & KBD_NOALTENTER)
  264. printf( " KBD_NOALTENTER is set.\n" );
  265. if (wenhpif40.kbdProp.flKbd & KBD_NOALTPRTSC)
  266. printf( " KBD_NOALTPRTSC is set.\n" );
  267. if (wenhpif40.kbdProp.flKbd & KBD_NOPRTSC)
  268. printf( " KBD_NOPRTSC is set.\n" );
  269. if (wenhpif40.kbdProp.flKbd & KBD_NOCTRLESC)
  270. printf( " KBD_NOCTRLESC is set.\n" );
  271. printf( " flKbdInit = 0x%04X\n", wenhpif40.kbdProp.flKbdInit );
  272. printf( " msAltDelay = 0x%04X\n", wenhpif40.kbdProp.msAltDelay );
  273. printf( " msAltPasteDelay = 0x%04X\n", wenhpif40.kbdProp.msAltPasteDelay );
  274. printf( " msPasteDelay = 0x%04X\n", wenhpif40.kbdProp.msPasteDelay );
  275. printf( " msPasteFullDelay = 0x%04X\n", wenhpif40.kbdProp.msPasteFullDelay );
  276. printf( " msPasteTimeout = 0x%04X\n", wenhpif40.kbdProp.msPasteTimeout );
  277. printf( " cPasteSkip = 0x%04X\n", wenhpif40.kbdProp.cPasteSkip );
  278. printf( " cPasteCRSkip = 0x%04X\n", wenhpif40.kbdProp.cPasteCRSkip );
  279. printf( " PROPMSE:\n" );
  280. printf( " flMse = 0x%04X\n", wenhpif40.mseProp.flMse );
  281. if (wenhpif40.mseProp.flMse & MSE_WINDOWENABLE)
  282. printf( " MSE_WINDOWENABLE is set.\n" );
  283. if (wenhpif40.mseProp.flMse & MSE_EXCLUSIVE)
  284. printf( " MSE_EXCLUSIVE is set.\n" );
  285. printf( " flMseInit = 0x%04X\n", wenhpif40.mseProp.flMseInit );
  286. printf( " PROPSND:\n" );
  287. printf( " flSnd = 0x%04X\n", wenhpif40.sndProp.flSnd );
  288. if (wenhpif40.sndProp.flSnd & SND_SPEAKERENABLE)
  289. printf( " SND_SPEAKERENABLE is set.\n" );
  290. printf( " flSndInit = 0x%04X\n", wenhpif40.sndProp.flSndInit );
  291. printf( " PROPFNT:\n" );
  292. printf( " flFnt = 0x%04X\n", wenhpif40.fntProp.flFnt );
  293. if (wenhpif40.fntProp.flFnt & FNT_RASTERFONTS)
  294. printf( " FNT_RASTERFONTS is set.\n" );
  295. if (wenhpif40.fntProp.flFnt & FNT_TTFONTS)
  296. printf( " FNT_TTFONTS is set.\n" );
  297. if (wenhpif40.fntProp.flFnt & FNT_AUTOSIZE)
  298. printf( " FNT_AUTOSIZE is set.\n" );
  299. if (wenhpif40.fntProp.flFnt & FNT_RASTER)
  300. printf( " FNT_RASTER is set.\n" );
  301. if (wenhpif40.fntProp.flFnt & FNT_TT)
  302. printf( " FNT_TT is set.\n" );
  303. printf( " flFntInit = 0x%04X\n", wenhpif40.fntProp.flFntInit );
  304. printf( " cxFont = 0x%04X (%d)\n", wenhpif40.fntProp.cxFont, wenhpif40.fntProp.cxFont );
  305. printf( " cyFont = 0x%04X (%d)\n", wenhpif40.fntProp.cyFont, wenhpif40.fntProp.cyFont );
  306. printf( " cxFontActual = 0x%04X (%d)\n", wenhpif40.fntProp.cxFontActual, wenhpif40.fntProp.cxFontActual );
  307. printf( " cyFontActual = 0x%04X (%d)\n", wenhpif40.fntProp.cyFontActual, wenhpif40.fntProp.cyFontActual );
  308. printf( " achRasterFaceName = %s\n", STRING(wenhpif40.fntProp.achRasterFaceName) );
  309. printf( " achTTFaceName = %s\n", STRING(wenhpif40.fntProp.achRasterFaceName) );
  310. printf( " wCurrentCP = 0x%04X\n", wenhpif40.fntProp.wCurrentCP );
  311. printf( " PROPWIN:\n" );
  312. printf( " flWin = 0x%04X\n", wenhpif40.winProp.flWin );
  313. if (wenhpif40.winProp.flWin & WIN_SAVESETTINGS)
  314. printf( " WIN_SAVESETTINGS is set.\n" );
  315. if (wenhpif40.winProp.flWin & WIN_TOOLBAR)
  316. printf( " WIN_TOOLBAR is set.\n" );
  317. printf( " flWinInit = 0x%04X\n", wenhpif40.winProp.flWinInit );
  318. printf( " cxCells = 0x%04X (%d)\n", wenhpif40.winProp.cxCells, wenhpif40.winProp.cxCells );
  319. printf( " cyCells = 0x%04X (%d)\n", wenhpif40.winProp.cyCells, wenhpif40.winProp.cyCells );
  320. printf( " cxClient = 0x%04X (%d)\n", wenhpif40.winProp.cxClient, wenhpif40.winProp.cxClient );
  321. printf( " cyClient = 0x%04X (%d)\n", wenhpif40.winProp.cyClient, wenhpif40.winProp.cyClient );
  322. printf( " cxWindow = 0x%04X (%d)\n", wenhpif40.winProp.cxWindow, wenhpif40.winProp.cxWindow );
  323. printf( " cyWindow = 0x%04X (%d)\n", wenhpif40.winProp.cyWindow, wenhpif40.winProp.cyWindow );
  324. printf( " wLength = 0x%04X\n", wenhpif40.winProp.wLength );
  325. printf( " wShowFlags = 0x%04X\n", wenhpif40.winProp.wShowFlags );
  326. printf( " wShowCmd = 0x%04X\n", wenhpif40.winProp.wShowCmd );
  327. printf( " xMinimize = 0x%04X (%d)\n", wenhpif40.winProp.xMinimize, wenhpif40.winProp.xMinimize );
  328. printf( " yMinimize = 0x%04X (%d)\n", wenhpif40.winProp.yMinimize, wenhpif40.winProp.yMinimize );
  329. printf( " xMaximize = 0x%04X (%d)\n", wenhpif40.winProp.xMaximize, wenhpif40.winProp.xMaximize );
  330. printf( " yMaximize = 0x%04X (%d)\n", wenhpif40.winProp.yMaximize, wenhpif40.winProp.yMaximize );
  331. printf( " rcNormal = (0x%04X, 0x%04X, 0x%04X, 0x%04X)\n",
  332. wenhpif40.winProp.rcNormal.left, wenhpif40.winProp.rcNormal.top,
  333. wenhpif40.winProp.rcNormal.right,wenhpif40.winProp.rcNormal.bottom
  334. );
  335. printf( " PROPENV:\n" );
  336. printf( " flEnv = 0x%04X\n", wenhpif40.envProp.flEnv );
  337. printf( " flEnvInit = 0x%04X\n", wenhpif40.envProp.flEnvInit );
  338. printf( " achBatchFile = %s\n", STRING(wenhpif40.envProp.achBatchFile) );
  339. printf( " cbEnvironemnt = 0x%04X\n", wenhpif40.envProp.cbEnvironment );
  340. printf( " wMaxDPMI = 0x%04X\n", wenhpif40.envProp.wMaxDPMI );
  341. }
  342. if (strcmp(pifexthdr.extsig, WNTHDRSIG40)==0) {
  343. WNTPIF40 wntpif40;
  344. _lread( hFile, &wntpif40, sizeof( wntpif40 ) );
  345. printf( " ==> Internal Revision %d <==\n", wntpif40.wInternalRevision );
  346. printf( " flWnt = 0x%08X\n", wntpif40.nt40Prop.flWnt );
  347. if (wntpif40.nt40Prop.flWnt & WNT_LET_SYS_POS)
  348. printf( " WNT_LET_SYS_POS is set.\n" );
  349. if (wntpif40.nt40Prop.flWnt & WNT_CONSOLE_PROPS)
  350. printf( " WNT_CONSOLE_PROPS is set.\n" );
  351. WideCharToMultiByte( CP_ACP, 0, wntpif40.nt40Prop.awchCmdLine, -1, szTemp, 512, NULL, NULL );
  352. printf( " awchCmdLine = %s\n", STRING(szTemp) );
  353. printf( " achSaveCmdLine = %s\n", STRING(wntpif40.nt40Prop.achSaveCmdLine) );
  354. WideCharToMultiByte( CP_ACP, 0, wntpif40.nt40Prop.awchOtherFile, -1, szTemp, 512, NULL, NULL );
  355. printf( " awchOtherFile = %s\n", STRING(szTemp) );
  356. printf( " achSaveOtherFile = %s\n", STRING(wntpif40.nt40Prop.achSaveOtherFile) );
  357. WideCharToMultiByte( CP_ACP, 0, wntpif40.nt40Prop.awchPIFFile, -1, szTemp, 512, NULL, NULL );
  358. printf( " awchPIFFile = %s\n", STRING(szTemp) );
  359. printf( " achSavePIFFile = %s\n", STRING(wntpif40.nt40Prop.achSavePIFFile) );
  360. WideCharToMultiByte( CP_ACP, 0, wntpif40.nt40Prop.awchTitle, -1, szTemp, 512, NULL, NULL );
  361. printf( " awchTitle = %s\n", STRING(szTemp) );
  362. printf( " achSaveTitle = %s\n", STRING(wntpif40.nt40Prop.achSaveTitle) );
  363. WideCharToMultiByte( CP_ACP, 0, wntpif40.nt40Prop.awchIconFile, -1, szTemp, 512, NULL, NULL );
  364. printf( " awchIconFIle = %s\n", STRING(szTemp) );
  365. printf( " achSaveIconFile = %s\n", STRING(wntpif40.nt40Prop.achSaveIconFile) );
  366. WideCharToMultiByte( CP_ACP, 0, wntpif40.nt40Prop.awchWorkDir, -1, szTemp, 512, NULL, NULL );
  367. printf( " awchWorkDir = %s\n", STRING(szTemp) );
  368. printf( " achSaveWorkDir = %s\n", STRING(wntpif40.nt40Prop.achSaveWorkDir) );
  369. WideCharToMultiByte( CP_ACP, 0, wntpif40.nt40Prop.awchBatchFile, -1, szTemp, 512, NULL, NULL );
  370. printf( " awchBatchFile = %s\n", STRING(szTemp) );
  371. printf( " achSaveBatchFile = %s\n", STRING(wntpif40.nt40Prop.achSaveBatchFile) );
  372. printf( " dwForeColor = 0x%08X\n", wntpif40.nt40Prop.dwForeColor );
  373. printf( " dwBackColor = 0x%08X\n", wntpif40.nt40Prop.dwBackColor );
  374. printf( " dwPopupForeColor = 0x%08X\n", wntpif40.nt40Prop.dwPopupForeColor );
  375. printf( " dwPopupBackColor = 0x%08X\n", wntpif40.nt40Prop.dwPopupBackColor );
  376. printf( " WinSize = (0x%04X, 0x%04X)\n", wntpif40.nt40Prop.WinSize.X, wntpif40.nt40Prop.WinSize.Y );
  377. printf( " BuffSize = (0x%04X, 0x%04X)\n", wntpif40.nt40Prop.BuffSize.X, wntpif40.nt40Prop.BuffSize.Y );
  378. printf( " WinPos = (0x%08X, 0x%08X)\n", wntpif40.nt40Prop.WinPos.x, wntpif40.nt40Prop.WinPos.y );
  379. printf( " dwCursorSize = 0x%08X\n", wntpif40.nt40Prop.dwCursorSize );
  380. printf( " dwCmdHistBufSize = 0x%08X\n", wntpif40.nt40Prop.dwCmdHistBufSize );
  381. printf( " dwNumCmdHist = 0x%08X\n", wntpif40.nt40Prop.dwNumCmdHist );
  382. }
  383. _llseek( hFile, pifexthdr.extnxthdrfloff, FILE_BEGIN );
  384. }
  385. OutOfHere:
  386. printf( "\n" );
  387. return(0);
  388. }