ReactOS 0.4.16-dev-297-gc569aee
fieldoff.c File Reference
#include "cdprocs.h"
#include <stdio.h>
Include dependency graph for fieldoff.c:

Go to the source code of this file.

Macros

#define doit(a, b)   { printf("%s %04lx %4lx %s\n", #a, FIELD_OFFSET(a,b), sizeof(d.b), #b); }
 

Functions

VOID __cdecl main (int argc, argv)
 

Macro Definition Documentation

◆ doit

#define doit (   a,
  b 
)    { printf("%s %04lx %4lx %s\n", #a, FIELD_OFFSET(a,b), sizeof(d.b), #b); }

Definition at line 4 of file fieldoff.c.

Function Documentation

◆ main()

VOID __cdecl main ( int argc  ,
argv   
)

Definition at line 8 of file fieldoff.c.

11{
12 printf("<Record> <offset> <size> <field>\n\n");
13 {
14 CD_MCB d;
15 doit( CD_MCB, MaximumEntryCount );
16 doit( CD_MCB, CurrentEntryCount );
17 doit( CD_MCB, McbArray );
18 }
19 printf("\n");
20 {
25 doit( CD_MCB_ENTRY, DataBlockByteCount );
26 doit( CD_MCB_ENTRY, TotalBlockByteCount );
27 }
28 printf("\n");
29 {
30 CD_NAME d;
32 doit( CD_NAME, VersionString );
33 }
34 printf("\n");
35 {
37 doit( NAME_LINK, Links );
39 }
40 printf("\n");
41 {
44 doit( PREFIX_ENTRY, PrefixFlags );
45 doit( PREFIX_ENTRY, ExactCaseName );
46 doit( PREFIX_ENTRY, IgnoreCaseName );
48 }
49 printf("\n");
50 {
51 CD_DATA d;
52 doit( CD_DATA, NodeTypeCode );
53 doit( CD_DATA, NodeByteSize );
55 doit( CD_DATA, VcbQueue );
56 doit( CD_DATA, IrpContextDepth );
57 doit( CD_DATA, IrpContextMaxDepth );
58 doit( CD_DATA, IrpContextList );
59 doit( CD_DATA, FileSystemDeviceObject );
60 doit( CD_DATA, AsyncCloseQueue );
61 doit( CD_DATA, AsyncCloseCount );
62 doit( CD_DATA, FspCloseActive );
63 doit( CD_DATA, ReduceDelayedClose );
64 doit( CD_DATA, PadUshort );
65 doit( CD_DATA, DelayedCloseQueue );
66 doit( CD_DATA, DelayedCloseCount );
67 doit( CD_DATA, MinDelayedCloseCount );
68 doit( CD_DATA, MaxDelayedCloseCount );
69 doit( CD_DATA, CdDataLockThread );
70 doit( CD_DATA, CdDataMutex );
71 doit( CD_DATA, DataResource );
72 doit( CD_DATA, CacheManagerCallbacks );
73 doit( CD_DATA, CacheManagerVolumeCallbacks );
74 doit( CD_DATA, CloseItem );
75 }
76 printf("\n");
77 {
78 VCB d;
79 doit( VCB, NodeTypeCode );
80 doit( VCB, NodeByteSize );
81 doit( VCB, Vpb );
83 doit( VCB, VolumeLockFileObject );
84 doit( VCB, VcbLinks );
85 doit( VCB, VcbState );
86 doit( VCB, VcbCondition );
87 doit( VCB, VcbCleanup );
88 doit( VCB, VcbReference );
89 doit( VCB, VcbUserReference );
90 doit( VCB, VolumeDasdFcb );
91 doit( VCB, RootIndexFcb );
92 doit( VCB, PathTableFcb );
93 doit( VCB, BaseSector );
94 doit( VCB, VdSectorOffset );
95 doit( VCB, PrimaryVdSectorOffset );
96 doit( VCB, XASector );
97 doit( VCB, XADiskOffset );
98 doit( VCB, VcbResource );
99 doit( VCB, FileResource );
100 doit( VCB, VcbMutex );
101 doit( VCB, VcbLockThread );
102 doit( VCB, NotifySync );
103 doit( VCB, DirNotifyList );
104 doit( VCB, BlockSize );
105 doit( VCB, BlockToSectorShift );
106 doit( VCB, BlockToByteShift );
107 doit( VCB, BlocksPerSector );
108 doit( VCB, BlockMask );
109 doit( VCB, BlockInverseMask );
110 doit( VCB, FcbTable );
111 doit( VCB, CdromToc );
112 doit( VCB, TocLength );
113 doit( VCB, TrackCount );
114 doit( VCB, DiskFlags );
115 doit( VCB, BlockFactor );
116 }
117 printf("\n");
118 {
121 doit( VOLUME_DEVICE_OBJECT, PostedRequestCount );
122 doit( VOLUME_DEVICE_OBJECT, OverflowQueueCount );
123 doit( VOLUME_DEVICE_OBJECT, OverflowQueue );
124 doit( VOLUME_DEVICE_OBJECT, OverflowQueueSpinLock );
126 }
127 printf("\n");
128 {
129 FCB_DATA d;
130 doit( FCB_DATA, FileLock );
131 }
132 printf("\n");
133 {
134 FCB_INDEX d;
136 doit( FCB_INDEX, StreamOffset );
137 doit( FCB_INDEX, FcbQueue );
138 doit( FCB_INDEX, Ordinal );
139 doit( FCB_INDEX, ChildPathTableOffset );
140 doit( FCB_INDEX, ChildOrdinal );
141 doit( FCB_INDEX, ExactCaseRoot );
142 doit( FCB_INDEX, IgnoreCaseRoot );
143 }
144 printf("\n");
145 {
147 doit( FCB_NONPAGED, NodeTypeCode );
148 doit( FCB_NONPAGED, NodeByteSize );
149 doit( FCB_NONPAGED, SegmentObject );
150 doit( FCB_NONPAGED, FcbResource );
151 doit( FCB_NONPAGED, FcbMutex );
152 }
153 printf("\n");
154 {
155 FCB d;
156 doit( FCB, Header );
157 doit( FCB, Vcb );
158 doit( FCB, ParentFcb );
159 doit( FCB, FcbLinks );
160 doit( FCB, FileId );
161 doit( FCB, FcbCleanup );
162 doit( FCB, FcbReference );
163 doit( FCB, FcbUserReference );
164 doit( FCB, FcbState );
168 doit( FCB, FcbLockThread );
169 doit( FCB, FcbLockCount );
170 doit( FCB, FcbNonpaged );
171 doit( FCB, ShareAccess );
172 doit( FCB, McbEntry );
173 doit( FCB, Mcb );
174 doit( FCB, ShortNamePrefix );
175 doit( FCB, FileNamePrefix );
176 doit( FCB, CreationTime );
177 doit( FCB, FcbType );
178 }
179 printf("\n");
180 {
181 CCB d;
182 doit( CCB, NodeTypeCode );
183 doit( CCB, NodeByteSize );
184 doit( CCB, Flags );
185 doit( CCB, Fcb );
186 doit( CCB, CurrentDirentOffset );
187 doit( CCB, SearchExpression );
188 }
189 printf("\n");
190 {
192 doit( IRP_CONTEXT, NodeTypeCode );
193 doit( IRP_CONTEXT, NodeByteSize );
194 doit( IRP_CONTEXT, Irp );
195 doit( IRP_CONTEXT, Vcb );
196 doit( IRP_CONTEXT, ExceptionStatus );
198 doit( IRP_CONTEXT, RealDevice );
199 doit( IRP_CONTEXT, IoContext );
200 doit( IRP_CONTEXT, TeardownFcb );
204 doit( IRP_CONTEXT, ThreadContext );
205 doit( IRP_CONTEXT, WorkQueueItem );
206 }
207 printf("\n");
208 {
210 doit( IRP_CONTEXT_LITE, NodeTypeCode );
211 doit( IRP_CONTEXT_LITE, NodeByteSize );
213 doit( IRP_CONTEXT_LITE, DelayedCloseLinks );
214 doit( IRP_CONTEXT_LITE, UserReference );
215 doit( IRP_CONTEXT_LITE, RealDevice );
216 }
217 printf("\n");
218 {
220 doit( CD_IO_CONTEXT, IrpCount );
221 doit( CD_IO_CONTEXT, MasterIrp );
223 doit( CD_IO_CONTEXT, AllocatedContext );
226 doit( CD_IO_CONTEXT, SyncEvent );
227 }
228 printf("\n");
229 {
231 doit( THREAD_CONTEXT, Cdfs );
232 doit( THREAD_CONTEXT, SavedTopLevelIrp );
233 doit( THREAD_CONTEXT, TopLevelIrpContext );
234 }
235 printf("\n");
236 {
239 doit( PATH_ENUM_CONTEXT, BaseOffset );
242 doit( PATH_ENUM_CONTEXT, DataOffset );
243 doit( PATH_ENUM_CONTEXT, AllocatedData );
244 doit( PATH_ENUM_CONTEXT, LastDataBlock );
245 }
246 printf("\n");
247 {
249 doit( PATH_ENTRY, Ordinal );
250 doit( PATH_ENTRY, PathTableOffset );
252 doit( PATH_ENTRY, PathEntryLength );
253 doit( PATH_ENTRY, ParentOrdinal );
254 doit( PATH_ENTRY, DirNameLen );
257 doit( PATH_ENTRY, CdDirName );
258 doit( PATH_ENTRY, CdCaseDirName );
259 doit( PATH_ENTRY, NameBuffer );
260 }
261 printf("\n");
262 {
264 doit( COMPOUND_PATH_ENTRY, PathContext );
265 doit( COMPOUND_PATH_ENTRY, PathEntry );
266 }
267 printf("\n");
268 {
270 doit( DIRENT_ENUM_CONTEXT, Sector );
271 doit( DIRENT_ENUM_CONTEXT, BaseOffset );
275 doit( DIRENT_ENUM_CONTEXT, NextDirentOffset );
276 }
277 printf("\n");
278 {
279 DIRENT d;
284 doit( DIRENT, CdTime );
286 doit( DIRENT, Flags );
288 doit( DIRENT, InterleaveGapSize );
293 doit( DIRENT, FileName );
294 doit( DIRENT, CdFileName );
295 doit( DIRENT, CdCaseFileName );
297 doit( DIRENT, NameBuffer );
298 }
299 printf("\n");
300 {
304 }
305 printf("\n");
306 {
308 doit( FILE_ENUM_CONTEXT, PriorDirent );
309 doit( FILE_ENUM_CONTEXT, InitialDirent );
310 doit( FILE_ENUM_CONTEXT, CurrentDirent );
314 doit( FILE_ENUM_CONTEXT, ShortNameBuffer );
315 doit( FILE_ENUM_CONTEXT, Dirents );
316 }
317 printf("\n");
318 {
320 doit( RIFF_HEADER, ChunkId );
322 doit( RIFF_HEADER, SignatureCDXA );
323 doit( RIFF_HEADER, SignatureFMT );
324 doit( RIFF_HEADER, XAChunkSize );
327 doit( RIFF_HEADER, SignatureXA );
328 doit( RIFF_HEADER, FileNumber );
330 doit( RIFF_HEADER, SignatureData );
331 doit( RIFF_HEADER, RawSectors );
332 }
333 printf("\n");
334 {
336 doit( AUDIO_PLAY_HEADER, Chunk );
338 doit( AUDIO_PLAY_HEADER, SignatureCDDA );
339 doit( AUDIO_PLAY_HEADER, SignatureFMT );
340 doit( AUDIO_PLAY_HEADER, FMTChunkSize );
341 doit( AUDIO_PLAY_HEADER, FormatTag );
342 doit( AUDIO_PLAY_HEADER, TrackNumber );
343 doit( AUDIO_PLAY_HEADER, DiskID );
344 doit( AUDIO_PLAY_HEADER, StartingSector );
346 doit( AUDIO_PLAY_HEADER, TrackAddress );
347 doit( AUDIO_PLAY_HEADER, TrackLength );
348 }
349 printf("\n");
350 {
352 doit( RAW_ISO_VD, DescType );
353 doit( RAW_ISO_VD, StandardId );
355 doit( RAW_ISO_VD, VolumeFlags );
356 doit( RAW_ISO_VD, SystemId );
357 doit( RAW_ISO_VD, VolumeId );
359 doit( RAW_ISO_VD, VolSpaceI );
360 doit( RAW_ISO_VD, VolSpaceM );
362 doit( RAW_ISO_VD, VolSetSizeI );
363 doit( RAW_ISO_VD, VolSetSizeM );
364 doit( RAW_ISO_VD, VolSeqNumI );
365 doit( RAW_ISO_VD, VolSeqNumM );
366 doit( RAW_ISO_VD, LogicalBlkSzI );
367 doit( RAW_ISO_VD, LogicalBlkSzM );
368 doit( RAW_ISO_VD, PathTableSzI );
369 doit( RAW_ISO_VD, PathTableSzM );
370 doit( RAW_ISO_VD, PathTabLocI );
371 doit( RAW_ISO_VD, PathTabLocM );
372 doit( RAW_ISO_VD, RootDe );
373 doit( RAW_ISO_VD, VolSetId );
374 doit( RAW_ISO_VD, PublId );
375 doit( RAW_ISO_VD, PreparerId );
376 doit( RAW_ISO_VD, AppId );
377 doit( RAW_ISO_VD, Copyright );
378 doit( RAW_ISO_VD, Abstract );
379 doit( RAW_ISO_VD, Bibliograph );
380 doit( RAW_ISO_VD, CreateDate );
381 doit( RAW_ISO_VD, ModDate );
382 doit( RAW_ISO_VD, ExpireDate );
383 doit( RAW_ISO_VD, EffectDate );
384 doit( RAW_ISO_VD, FileStructVer );
386 doit( RAW_ISO_VD, ResApp );
388 }
389 printf("\n");
390 {
392 doit( RAW_HSG_VD, BlkNumI );
393 doit( RAW_HSG_VD, BlkNumM );
394 doit( RAW_HSG_VD, DescType );
395 doit( RAW_HSG_VD, StandardId );
397 doit( RAW_HSG_VD, VolumeFlags );
398 doit( RAW_HSG_VD, SystemId );
399 doit( RAW_HSG_VD, VolumeId );
401 doit( RAW_HSG_VD, VolSpaceI );
402 doit( RAW_HSG_VD, VolSpaceM );
404 doit( RAW_HSG_VD, VolSetSizeI );
405 doit( RAW_HSG_VD, VolSetSizeM );
406 doit( RAW_HSG_VD, VolSeqNumI );
407 doit( RAW_HSG_VD, VolSeqNumM );
408 doit( RAW_HSG_VD, LogicalBlkSzI );
409 doit( RAW_HSG_VD, LogicalBlkSzM );
410 doit( RAW_HSG_VD, PathTableSzI );
411 doit( RAW_HSG_VD, PathTableSzM );
412 doit( RAW_HSG_VD, PathTabLocI );
413 doit( RAW_HSG_VD, PathTabLocM );
414 doit( RAW_HSG_VD, RootDe );
415 doit( RAW_HSG_VD, VolSetId );
416 doit( RAW_HSG_VD, PublId );
417 doit( RAW_HSG_VD, PreparerId );
418 doit( RAW_HSG_VD, AppId );
419 doit( RAW_HSG_VD, Copyright );
420 doit( RAW_HSG_VD, Abstract );
421 doit( RAW_HSG_VD, CreateDate );
422 doit( RAW_HSG_VD, ModDate );
423 doit( RAW_HSG_VD, ExpireDate );
424 doit( RAW_HSG_VD, EffectDate );
425 doit( RAW_HSG_VD, FileStructVer );
427 doit( RAW_HSG_VD, ResApp );
429 }
430 printf("\n");
431 {
433 doit( RAW_DIRENT, DirLen );
434 doit( RAW_DIRENT, XarLen );
435 doit( RAW_DIRENT, FileLoc );
436 doit( RAW_DIRENT, FileLocMot );
437 doit( RAW_DIRENT, DataLen );
438 doit( RAW_DIRENT, DataLenMot );
439 doit( RAW_DIRENT, RecordTime );
440 doit( RAW_DIRENT, FlagsHSG );
441 doit( RAW_DIRENT, FlagsISO );
442 doit( RAW_DIRENT, IntLeaveSize );
443 doit( RAW_DIRENT, IntLeaveSkip );
444 doit( RAW_DIRENT, Vssn );
445 doit( RAW_DIRENT, VssnMot );
446 doit( RAW_DIRENT, FileIdLen );
447 doit( RAW_DIRENT, FileId );
448 }
449 printf("\n");
450 {
452 doit( RAW_PATH_ISO, DirIdLen );
453 doit( RAW_PATH_ISO, XarLen );
454 doit( RAW_PATH_ISO, DirLoc );
455 doit( RAW_PATH_ISO, ParentNum );
456 doit( RAW_PATH_ISO, DirId );
457 }
458 printf("\n");
459 {
461 doit( RAW_PATH_HSG, DirLoc );
462 doit( RAW_PATH_HSG, XarLen );
463 doit( RAW_PATH_HSG, DirIdLen );
464 doit( RAW_PATH_HSG, ParentNum );
465 doit( RAW_PATH_HSG, DirId );
466 }
467 printf("\n");
468 {
473 doit( SYSTEM_USE_XA, FileNumber );
475 }
476}
WCHAR FileNameBuffer[MAX_PATH]
Definition: framewnd.c:225
Dirent SystemUseOffset
Definition: dirsup.c:521
Dirent FileUnitSize
Definition: dirsup.c:484
Dirent XAFileNumber
Definition: dirsup.c:519
Dirent DirentOffset
Definition: dirsup.c:444
Dirent XAAttributes
Definition: dirsup.c:518
Dirent CdTime
Definition: dirsup.c:471
Dirent FileNameLen
Definition: dirsup.c:506
Dirent ExtentType
Definition: dirsup.c:520
Dirent DirentFlags
Definition: dirsup.c:477
Dirent DirentLength
Definition: dirsup.c:450
_In_ PFCB _In_ LONGLONG _Out_ PLONGLONG DiskOffset
Definition: cdprocs.h:161
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:160
_In_ PFCB ParentFcb
Definition: cdprocs.h:736
_In_ PFCB _In_ PDIRENT_ENUM_CONTEXT _Inout_ PDIRENT Dirent
Definition: cdprocs.h:427
_In_ PFCB _In_ PCD_NAME DirName
Definition: cdprocs.h:737
_In_ PFCB _In_ LONGLONG StartingOffset
Definition: cdprocs.h:291
_In_ PFCB Fcb
Definition: cdprocs.h:159
#define SectorOffset(L)
Definition: cdprocs.h:1622
_Acquires_exclusive_lock_ Resource _Acquires_shared_lock_ Resource _Inout_ PERESOURCE Resource
Definition: cdprocs.h:843
_In_ PFCB _In_ PDIRENT_ENUM_CONTEXT DirContext
Definition: cdprocs.h:425
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
Definition: cdrom.h:1444
Definition: Header.h:9
_In_ PIRP Irp
Definition: csq.h:116
static void CharSet(RTF_Info *info)
Definition: reader.c:2420
static const WCHAR Signature[]
Definition: parser.c:141
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK _In_ USHORT ShareAccess
Definition: create.c:4147
IN OUT PVCB IN PDEVICE_OBJECT TargetDeviceObject
Definition: fatprocs.h:1675
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:415
IN PFCB IN PCCB IN TYPE_OF_OPEN IN BOOLEAN IN BOOLEAN TopLevel
Definition: fatprocs.h:2418
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
Definition: fatprocs.h:1676
IN PDCB IN POEM_STRING IN PUNICODE_STRING IN OUT POEM_STRING ShortName
Definition: fatprocs.h:1307
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:349
#define doit(a, b)
Definition: fieldoff.c:4
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE _In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG FileAttributes
Definition: fltkernel.h:1236
#define printf
Definition: freeldr.h:97
_Must_inspect_result_ _In_opt_ PVOID OwnerId
Definition: fsrtlfuncs.h:907
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
Definition: fsrtlfuncs.h:108
Status
Definition: gdiplustypes.h:25
#define d
Definition: ke_i.h:81
ULONG SectorCount
Definition: part_xbox.c:31
#define Vcb
Definition: cdprocs.h:1415
@ Reserved3
Definition: sacdrv.h:1471
@ Reserved4
Definition: sacdrv.h:1472
Definition: cdstruc.h:1067
Definition: cdstruc.h:200
Definition: cdstruc.h:1525
Definition: cdstruc.h:902
Definition: cdstruc.h:1460
Definition: cdstruc.h:275
Definition: cdstruc.h:498
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_In_ UCHAR MajorFunction
Definition: wdfdevice.h:1697
_In_ UCHAR _In_ UCHAR MinorFunction
Definition: wdfdevice.h:1699
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_ ERESOURCE_THREAD ResourceThreadId
Definition: exfuncs.h:1052
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
Definition: iotypes.h:1099
_Inout_ PUCHAR _In_ PUCHAR _Out_ PUCHAR _Out_ PULONG ChunkSize
Definition: rtlfuncs.h:2294