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.

477 lines
16 KiB

  1. #include "CdProcs.h"
  2. #include <stdio.h>
  3. #define doit(a,b) { printf("%s %04lx %4lx %s\n", #a, FIELD_OFFSET(a,b), sizeof(d.b), #b); }
  4. VOID
  5. __cdecl
  6. main (argc, argv)
  7. int argc;
  8. char *argv[];
  9. {
  10. printf("<Record> <offset> <size> <field>\n\n");
  11. {
  12. CD_MCB d;
  13. doit( CD_MCB, MaximumEntryCount );
  14. doit( CD_MCB, CurrentEntryCount );
  15. doit( CD_MCB, McbArray );
  16. }
  17. printf("\n");
  18. {
  19. CD_MCB_ENTRY d;
  20. doit( CD_MCB_ENTRY, DiskOffset );
  21. doit( CD_MCB_ENTRY, ByteCount );
  22. doit( CD_MCB_ENTRY, FileOffset );
  23. doit( CD_MCB_ENTRY, DataBlockByteCount );
  24. doit( CD_MCB_ENTRY, TotalBlockByteCount );
  25. }
  26. printf("\n");
  27. {
  28. CD_NAME d;
  29. doit( CD_NAME, FileName );
  30. doit( CD_NAME, VersionString );
  31. }
  32. printf("\n");
  33. {
  34. NAME_LINK d;
  35. doit( NAME_LINK, Links );
  36. doit( NAME_LINK, FileName );
  37. }
  38. printf("\n");
  39. {
  40. PREFIX_ENTRY d;
  41. doit( PREFIX_ENTRY, Fcb );
  42. doit( PREFIX_ENTRY, PrefixFlags );
  43. doit( PREFIX_ENTRY, ExactCaseName );
  44. doit( PREFIX_ENTRY, IgnoreCaseName );
  45. doit( PREFIX_ENTRY, FileNameBuffer );
  46. }
  47. printf("\n");
  48. {
  49. CD_DATA d;
  50. doit( CD_DATA, NodeTypeCode );
  51. doit( CD_DATA, NodeByteSize );
  52. doit( CD_DATA, DriverObject );
  53. doit( CD_DATA, VcbQueue );
  54. doit( CD_DATA, IrpContextDepth );
  55. doit( CD_DATA, IrpContextMaxDepth );
  56. doit( CD_DATA, IrpContextList );
  57. doit( CD_DATA, FileSystemDeviceObject );
  58. doit( CD_DATA, AsyncCloseQueue );
  59. doit( CD_DATA, AsyncCloseCount );
  60. doit( CD_DATA, FspCloseActive );
  61. doit( CD_DATA, ReduceDelayedClose );
  62. doit( CD_DATA, PadUshort );
  63. doit( CD_DATA, DelayedCloseQueue );
  64. doit( CD_DATA, DelayedCloseCount );
  65. doit( CD_DATA, MinDelayedCloseCount );
  66. doit( CD_DATA, MaxDelayedCloseCount );
  67. doit( CD_DATA, CdDataLockThread );
  68. doit( CD_DATA, CdDataMutex );
  69. doit( CD_DATA, DataResource );
  70. doit( CD_DATA, CacheManagerCallbacks );
  71. doit( CD_DATA, CacheManagerVolumeCallbacks );
  72. doit( CD_DATA, CloseItem );
  73. }
  74. printf("\n");
  75. {
  76. VCB d;
  77. doit( VCB, NodeTypeCode );
  78. doit( VCB, NodeByteSize );
  79. doit( VCB, Vpb );
  80. doit( VCB, TargetDeviceObject );
  81. doit( VCB, VolumeLockFileObject );
  82. doit( VCB, VcbLinks );
  83. doit( VCB, VcbState );
  84. doit( VCB, VcbCondition );
  85. doit( VCB, VcbCleanup );
  86. doit( VCB, VcbReference );
  87. doit( VCB, VcbUserReference );
  88. doit( VCB, VolumeDasdFcb );
  89. doit( VCB, RootIndexFcb );
  90. doit( VCB, PathTableFcb );
  91. doit( VCB, BaseSector );
  92. doit( VCB, VdSectorOffset );
  93. doit( VCB, PrimaryVdSectorOffset );
  94. doit( VCB, XASector );
  95. doit( VCB, XADiskOffset );
  96. doit( VCB, VcbResource );
  97. doit( VCB, FileResource );
  98. doit( VCB, VcbMutex );
  99. doit( VCB, VcbLockThread );
  100. doit( VCB, NotifySync );
  101. doit( VCB, DirNotifyList );
  102. doit( VCB, BlockSize );
  103. doit( VCB, BlockToSectorShift );
  104. doit( VCB, BlockToByteShift );
  105. doit( VCB, BlocksPerSector );
  106. doit( VCB, BlockMask );
  107. doit( VCB, BlockInverseMask );
  108. doit( VCB, FcbTable );
  109. doit( VCB, CdromToc );
  110. doit( VCB, TocLength );
  111. doit( VCB, TrackCount );
  112. doit( VCB, DiskFlags );
  113. doit( VCB, BlockFactor );
  114. }
  115. printf("\n");
  116. {
  117. VOLUME_DEVICE_OBJECT d;
  118. doit( VOLUME_DEVICE_OBJECT, DeviceObject );
  119. doit( VOLUME_DEVICE_OBJECT, PostedRequestCount );
  120. doit( VOLUME_DEVICE_OBJECT, OverflowQueueCount );
  121. doit( VOLUME_DEVICE_OBJECT, OverflowQueue );
  122. doit( VOLUME_DEVICE_OBJECT, OverflowQueueSpinLock );
  123. doit( VOLUME_DEVICE_OBJECT, Vcb );
  124. }
  125. printf("\n");
  126. {
  127. FCB_DATA d;
  128. doit( FCB_DATA, Oplock );
  129. doit( FCB_DATA, FileLock );
  130. }
  131. printf("\n");
  132. {
  133. FCB_INDEX d;
  134. doit( FCB_INDEX, FileObject );
  135. doit( FCB_INDEX, StreamOffset );
  136. doit( FCB_INDEX, FcbQueue );
  137. doit( FCB_INDEX, Ordinal );
  138. doit( FCB_INDEX, ChildPathTableOffset );
  139. doit( FCB_INDEX, ChildOrdinal );
  140. doit( FCB_INDEX, ExactCaseRoot );
  141. doit( FCB_INDEX, IgnoreCaseRoot );
  142. }
  143. printf("\n");
  144. {
  145. FCB_NONPAGED d;
  146. doit( FCB_NONPAGED, NodeTypeCode );
  147. doit( FCB_NONPAGED, NodeByteSize );
  148. doit( FCB_NONPAGED, SegmentObject );
  149. doit( FCB_NONPAGED, FcbResource );
  150. doit( FCB_NONPAGED, FcbMutex );
  151. }
  152. printf("\n");
  153. {
  154. FCB d;
  155. doit( FCB, Header );
  156. doit( FCB, Vcb );
  157. doit( FCB, ParentFcb );
  158. doit( FCB, FcbLinks );
  159. doit( FCB, FileId );
  160. doit( FCB, FcbCleanup );
  161. doit( FCB, FcbReference );
  162. doit( FCB, FcbUserReference );
  163. doit( FCB, FcbState );
  164. doit( FCB, FileAttributes );
  165. doit( FCB, XAAttributes );
  166. doit( FCB, XAFileNumber );
  167. doit( FCB, FcbLockThread );
  168. doit( FCB, FcbLockCount );
  169. doit( FCB, FcbNonpaged );
  170. doit( FCB, ShareAccess );
  171. doit( FCB, McbEntry );
  172. doit( FCB, Mcb );
  173. doit( FCB, ShortNamePrefix );
  174. doit( FCB, FileNamePrefix );
  175. doit( FCB, CreationTime );
  176. doit( FCB, FcbType );
  177. }
  178. printf("\n");
  179. {
  180. CCB d;
  181. doit( CCB, NodeTypeCode );
  182. doit( CCB, NodeByteSize );
  183. doit( CCB, Flags );
  184. doit( CCB, Fcb );
  185. doit( CCB, CurrentDirentOffset );
  186. doit( CCB, SearchExpression );
  187. }
  188. printf("\n");
  189. {
  190. IRP_CONTEXT d;
  191. doit( IRP_CONTEXT, NodeTypeCode );
  192. doit( IRP_CONTEXT, NodeByteSize );
  193. doit( IRP_CONTEXT, Irp );
  194. doit( IRP_CONTEXT, Vcb );
  195. doit( IRP_CONTEXT, ExceptionStatus );
  196. doit( IRP_CONTEXT, Flags );
  197. doit( IRP_CONTEXT, RealDevice );
  198. doit( IRP_CONTEXT, IoContext );
  199. doit( IRP_CONTEXT, TeardownFcb );
  200. doit( IRP_CONTEXT, TopLevel );
  201. doit( IRP_CONTEXT, MajorFunction );
  202. doit( IRP_CONTEXT, MinorFunction );
  203. doit( IRP_CONTEXT, ThreadContext );
  204. doit( IRP_CONTEXT, WorkQueueItem );
  205. }
  206. printf("\n");
  207. {
  208. IRP_CONTEXT_LITE d;
  209. doit( IRP_CONTEXT_LITE, NodeTypeCode );
  210. doit( IRP_CONTEXT_LITE, NodeByteSize );
  211. doit( IRP_CONTEXT_LITE, Fcb );
  212. doit( IRP_CONTEXT_LITE, DelayedCloseLinks );
  213. doit( IRP_CONTEXT_LITE, UserReference );
  214. doit( IRP_CONTEXT_LITE, RealDevice );
  215. }
  216. printf("\n");
  217. {
  218. CD_IO_CONTEXT d;
  219. doit( CD_IO_CONTEXT, IrpCount );
  220. doit( CD_IO_CONTEXT, MasterIrp );
  221. doit( CD_IO_CONTEXT, Status );
  222. doit( CD_IO_CONTEXT, AllocatedContext );
  223. doit( CD_IO_CONTEXT, Resource );
  224. doit( CD_IO_CONTEXT, ResourceThreadId );
  225. doit( CD_IO_CONTEXT, SyncEvent );
  226. }
  227. printf("\n");
  228. {
  229. THREAD_CONTEXT d;
  230. doit( THREAD_CONTEXT, Cdfs );
  231. doit( THREAD_CONTEXT, SavedTopLevelIrp );
  232. doit( THREAD_CONTEXT, TopLevelIrpContext );
  233. }
  234. printf("\n");
  235. {
  236. PATH_ENUM_CONTEXT d;
  237. doit( PATH_ENUM_CONTEXT, Data );
  238. doit( PATH_ENUM_CONTEXT, BaseOffset );
  239. doit( PATH_ENUM_CONTEXT, DataLength );
  240. doit( PATH_ENUM_CONTEXT, Bcb );
  241. doit( PATH_ENUM_CONTEXT, DataOffset );
  242. doit( PATH_ENUM_CONTEXT, AllocatedData );
  243. doit( PATH_ENUM_CONTEXT, LastDataBlock );
  244. }
  245. printf("\n");
  246. {
  247. PATH_ENTRY d;
  248. doit( PATH_ENTRY, Ordinal );
  249. doit( PATH_ENTRY, PathTableOffset );
  250. doit( PATH_ENTRY, DiskOffset );
  251. doit( PATH_ENTRY, PathEntryLength );
  252. doit( PATH_ENTRY, ParentOrdinal );
  253. doit( PATH_ENTRY, DirNameLen );
  254. doit( PATH_ENTRY, DirName );
  255. doit( PATH_ENTRY, Flags );
  256. doit( PATH_ENTRY, CdDirName );
  257. doit( PATH_ENTRY, CdCaseDirName );
  258. doit( PATH_ENTRY, NameBuffer );
  259. }
  260. printf("\n");
  261. {
  262. COMPOUND_PATH_ENTRY d;
  263. doit( COMPOUND_PATH_ENTRY, PathContext );
  264. doit( COMPOUND_PATH_ENTRY, PathEntry );
  265. }
  266. printf("\n");
  267. {
  268. DIRENT_ENUM_CONTEXT d;
  269. doit( DIRENT_ENUM_CONTEXT, Sector );
  270. doit( DIRENT_ENUM_CONTEXT, BaseOffset );
  271. doit( DIRENT_ENUM_CONTEXT, DataLength );
  272. doit( DIRENT_ENUM_CONTEXT, Bcb );
  273. doit( DIRENT_ENUM_CONTEXT, SectorOffset );
  274. doit( DIRENT_ENUM_CONTEXT, NextDirentOffset );
  275. }
  276. printf("\n");
  277. {
  278. DIRENT d;
  279. doit( DIRENT, DirentOffset );
  280. doit( DIRENT, DirentLength );
  281. doit( DIRENT, StartingOffset );
  282. doit( DIRENT, DataLength );
  283. doit( DIRENT, CdTime );
  284. doit( DIRENT, DirentFlags );
  285. doit( DIRENT, Flags );
  286. doit( DIRENT, FileUnitSize );
  287. doit( DIRENT, InterleaveGapSize );
  288. doit( DIRENT, SystemUseOffset );
  289. doit( DIRENT, XAAttributes );
  290. doit( DIRENT, XAFileNumber );
  291. doit( DIRENT, FileNameLen );
  292. doit( DIRENT, FileName );
  293. doit( DIRENT, CdFileName );
  294. doit( DIRENT, CdCaseFileName );
  295. doit( DIRENT, ExtentType );
  296. doit( DIRENT, NameBuffer );
  297. }
  298. printf("\n");
  299. {
  300. COMPOUND_DIRENT d;
  301. doit( COMPOUND_DIRENT, DirContext );
  302. doit( COMPOUND_DIRENT, Dirent );
  303. }
  304. printf("\n");
  305. {
  306. FILE_ENUM_CONTEXT d;
  307. doit( FILE_ENUM_CONTEXT, PriorDirent );
  308. doit( FILE_ENUM_CONTEXT, InitialDirent );
  309. doit( FILE_ENUM_CONTEXT, CurrentDirent );
  310. doit( FILE_ENUM_CONTEXT, Flags );
  311. doit( FILE_ENUM_CONTEXT, FileSize );
  312. doit( FILE_ENUM_CONTEXT, ShortName );
  313. doit( FILE_ENUM_CONTEXT, ShortNameBuffer );
  314. doit( FILE_ENUM_CONTEXT, Dirents );
  315. }
  316. printf("\n");
  317. {
  318. RIFF_HEADER d;
  319. doit( RIFF_HEADER, ChunkId );
  320. doit( RIFF_HEADER, ChunkSize );
  321. doit( RIFF_HEADER, SignatureCDXA );
  322. doit( RIFF_HEADER, SignatureFMT );
  323. doit( RIFF_HEADER, XAChunkSize );
  324. doit( RIFF_HEADER, OwnerId );
  325. doit( RIFF_HEADER, Attributes );
  326. doit( RIFF_HEADER, SignatureXA );
  327. doit( RIFF_HEADER, FileNumber );
  328. doit( RIFF_HEADER, Reserved );
  329. doit( RIFF_HEADER, SignatureData );
  330. doit( RIFF_HEADER, RawSectors );
  331. }
  332. printf("\n");
  333. {
  334. AUDIO_PLAY_HEADER d;
  335. doit( AUDIO_PLAY_HEADER, Chunk );
  336. doit( AUDIO_PLAY_HEADER, ChunkSize );
  337. doit( AUDIO_PLAY_HEADER, SignatureCDDA );
  338. doit( AUDIO_PLAY_HEADER, SignatureFMT );
  339. doit( AUDIO_PLAY_HEADER, FMTChunkSize );
  340. doit( AUDIO_PLAY_HEADER, FormatTag );
  341. doit( AUDIO_PLAY_HEADER, TrackNumber );
  342. doit( AUDIO_PLAY_HEADER, DiskID );
  343. doit( AUDIO_PLAY_HEADER, StartingSector );
  344. doit( AUDIO_PLAY_HEADER, SectorCount );
  345. doit( AUDIO_PLAY_HEADER, TrackAddress );
  346. doit( AUDIO_PLAY_HEADER, TrackLength );
  347. }
  348. printf("\n");
  349. {
  350. RAW_ISO_VD d;
  351. doit( RAW_ISO_VD, DescType );
  352. doit( RAW_ISO_VD, StandardId );
  353. doit( RAW_ISO_VD, Version );
  354. doit( RAW_ISO_VD, VolumeFlags );
  355. doit( RAW_ISO_VD, SystemId );
  356. doit( RAW_ISO_VD, VolumeId );
  357. doit( RAW_ISO_VD, Reserved );
  358. doit( RAW_ISO_VD, VolSpaceI );
  359. doit( RAW_ISO_VD, VolSpaceM );
  360. doit( RAW_ISO_VD, CharSet );
  361. doit( RAW_ISO_VD, VolSetSizeI );
  362. doit( RAW_ISO_VD, VolSetSizeM );
  363. doit( RAW_ISO_VD, VolSeqNumI );
  364. doit( RAW_ISO_VD, VolSeqNumM );
  365. doit( RAW_ISO_VD, LogicalBlkSzI );
  366. doit( RAW_ISO_VD, LogicalBlkSzM );
  367. doit( RAW_ISO_VD, PathTableSzI );
  368. doit( RAW_ISO_VD, PathTableSzM );
  369. doit( RAW_ISO_VD, PathTabLocI );
  370. doit( RAW_ISO_VD, PathTabLocM );
  371. doit( RAW_ISO_VD, RootDe );
  372. doit( RAW_ISO_VD, VolSetId );
  373. doit( RAW_ISO_VD, PublId );
  374. doit( RAW_ISO_VD, PreparerId );
  375. doit( RAW_ISO_VD, AppId );
  376. doit( RAW_ISO_VD, Copyright );
  377. doit( RAW_ISO_VD, Abstract );
  378. doit( RAW_ISO_VD, Bibliograph );
  379. doit( RAW_ISO_VD, CreateDate );
  380. doit( RAW_ISO_VD, ModDate );
  381. doit( RAW_ISO_VD, ExpireDate );
  382. doit( RAW_ISO_VD, EffectDate );
  383. doit( RAW_ISO_VD, FileStructVer );
  384. doit( RAW_ISO_VD, Reserved3 );
  385. doit( RAW_ISO_VD, ResApp );
  386. doit( RAW_ISO_VD, Reserved4 );
  387. }
  388. printf("\n");
  389. {
  390. RAW_HSG_VD d;
  391. doit( RAW_HSG_VD, BlkNumI );
  392. doit( RAW_HSG_VD, BlkNumM );
  393. doit( RAW_HSG_VD, DescType );
  394. doit( RAW_HSG_VD, StandardId );
  395. doit( RAW_HSG_VD, Version );
  396. doit( RAW_HSG_VD, VolumeFlags );
  397. doit( RAW_HSG_VD, SystemId );
  398. doit( RAW_HSG_VD, VolumeId );
  399. doit( RAW_HSG_VD, Reserved );
  400. doit( RAW_HSG_VD, VolSpaceI );
  401. doit( RAW_HSG_VD, VolSpaceM );
  402. doit( RAW_HSG_VD, CharSet );
  403. doit( RAW_HSG_VD, VolSetSizeI );
  404. doit( RAW_HSG_VD, VolSetSizeM );
  405. doit( RAW_HSG_VD, VolSeqNumI );
  406. doit( RAW_HSG_VD, VolSeqNumM );
  407. doit( RAW_HSG_VD, LogicalBlkSzI );
  408. doit( RAW_HSG_VD, LogicalBlkSzM );
  409. doit( RAW_HSG_VD, PathTableSzI );
  410. doit( RAW_HSG_VD, PathTableSzM );
  411. doit( RAW_HSG_VD, PathTabLocI );
  412. doit( RAW_HSG_VD, PathTabLocM );
  413. doit( RAW_HSG_VD, RootDe );
  414. doit( RAW_HSG_VD, VolSetId );
  415. doit( RAW_HSG_VD, PublId );
  416. doit( RAW_HSG_VD, PreparerId );
  417. doit( RAW_HSG_VD, AppId );
  418. doit( RAW_HSG_VD, Copyright );
  419. doit( RAW_HSG_VD, Abstract );
  420. doit( RAW_HSG_VD, CreateDate );
  421. doit( RAW_HSG_VD, ModDate );
  422. doit( RAW_HSG_VD, ExpireDate );
  423. doit( RAW_HSG_VD, EffectDate );
  424. doit( RAW_HSG_VD, FileStructVer );
  425. doit( RAW_HSG_VD, Reserved3 );
  426. doit( RAW_HSG_VD, ResApp );
  427. doit( RAW_HSG_VD, Reserved4 );
  428. }
  429. printf("\n");
  430. {
  431. RAW_DIRENT d;
  432. doit( RAW_DIRENT, DirLen );
  433. doit( RAW_DIRENT, XarLen );
  434. doit( RAW_DIRENT, FileLoc );
  435. doit( RAW_DIRENT, FileLocMot );
  436. doit( RAW_DIRENT, DataLen );
  437. doit( RAW_DIRENT, DataLenMot );
  438. doit( RAW_DIRENT, RecordTime );
  439. doit( RAW_DIRENT, FlagsHSG );
  440. doit( RAW_DIRENT, FlagsISO );
  441. doit( RAW_DIRENT, IntLeaveSize );
  442. doit( RAW_DIRENT, IntLeaveSkip );
  443. doit( RAW_DIRENT, Vssn );
  444. doit( RAW_DIRENT, VssnMot );
  445. doit( RAW_DIRENT, FileIdLen );
  446. doit( RAW_DIRENT, FileId );
  447. }
  448. printf("\n");
  449. {
  450. RAW_PATH_ISO d;
  451. doit( RAW_PATH_ISO, DirIdLen );
  452. doit( RAW_PATH_ISO, XarLen );
  453. doit( RAW_PATH_ISO, DirLoc );
  454. doit( RAW_PATH_ISO, ParentNum );
  455. doit( RAW_PATH_ISO, DirId );
  456. }
  457. printf("\n");
  458. {
  459. RAW_PATH_HSG d;
  460. doit( RAW_PATH_HSG, DirLoc );
  461. doit( RAW_PATH_HSG, XarLen );
  462. doit( RAW_PATH_HSG, DirIdLen );
  463. doit( RAW_PATH_HSG, ParentNum );
  464. doit( RAW_PATH_HSG, DirId );
  465. }
  466. printf("\n");
  467. {
  468. SYSTEM_USE_XA d;
  469. doit( SYSTEM_USE_XA, OwnerId );
  470. doit( SYSTEM_USE_XA, Attributes );
  471. doit( SYSTEM_USE_XA, Signature );
  472. doit( SYSTEM_USE_XA, FileNumber );
  473. doit( SYSTEM_USE_XA, Reserved );
  474. }
  475. }