24#define SECTOR_SIZE (2048)
27#define RAW_SECTOR_SIZE (2352)
28#define SECTOR_MASK (SECTOR_SIZE - 1)
29#define INVERSE_SECTOR_MASK ~(SECTOR_SIZE - 1)
32#define SECTOR_SHIFT (11)
35#define XA_SECTOR_SIZE (2352)
48#define FIRST_VD_SECTOR (16)
51#define ESC_SEQ_LEN (3)
55#define VD_TERMINATOR (255)
57#define VD_SECONDARY (2)
59#define VOLUME_ID_LENGTH (32)
65#define CD_SECTOR_SIZE (2048)
67#define ISO_VOL_ID "CD001"
68#define HSG_VOL_ID "CDROM"
70#define ISO_ATTR_MULTI 0x0080
71#define ISO_ATTR_DIRECTORY 0x0002
73#define MIN_DIR_REC_SIZE (sizeof( RAW_DIR_REC ) - MAX_FILE_ID_LENGTH)
75#define RVD_STD_ID( r, i ) (i ? r->StandardId : \
76 ((PRAW_HSG_VD) r)->StandardId )
78#define RVD_DESC_TYPE( r, i ) (i ? r->DescType : \
79 ((PRAW_HSG_VD) r)->DescType )
81#define RVD_VERSION( r, i ) (i ? r->Version : \
82 ((PRAW_HSG_VD) r)->Version )
84#define RVD_LB_SIZE( r, i ) (i ? r->LogicalBlkSzI : \
85 ((PRAW_HSG_VD) r)->LogicalBlkSzI )
87#define RVD_VOL_SIZE( r, i ) (i ? r->VolSpaceI : \
88 ((PRAW_HSG_VD) r)->VolSpaceI )
90#define RVD_ROOT_DE( r, i ) (i ? r->RootDe : \
91 ((PRAW_HSG_VD) r)->RootDe )
93#define DE_FILE_FLAGS( iso, de ) (iso ? de->FlagsISO : de->FlagsHSG)
99#define TOC_DATA_TRACK (0x04)
100#define TOC_LAST_TRACK (0xaa)
116#define LEN_ROOT_DE (34)
123#define MAX_FILE_ID_LENGTH (255)
259#define CdRvdId(R,F) ( \
260 FlagOn( (F), VCB_STATE_HSG ) ? \
261 ((PRAW_HSG_VD) (R))->StandardId : \
262 ((PRAW_ISO_VD) (R))->StandardId \
265#define CdRvdVersion(R,F) ( \
266 FlagOn( (F), VCB_STATE_HSG ) ? \
267 ((PRAW_HSG_VD) (R))->Version : \
268 ((PRAW_ISO_VD) (R))->Version \
271#define CdRvdDescType(R,F) ( \
272 FlagOn( (F), VCB_STATE_HSG ) ? \
273 ((PRAW_HSG_VD) (R))->DescType : \
274 ((PRAW_ISO_VD) (R))->DescType \
277#define CdRvdEsc(R,F) ( \
278 FlagOn( (F), VCB_STATE_HSG ) ? \
279 ((PRAW_HSG_VD) (R))->CharSet : \
280 ((PRAW_ISO_VD) (R))->CharSet \
283#define CdRvdVolId(R,F) ( \
284 FlagOn( (F), VCB_STATE_HSG ) ? \
285 ((PRAW_HSG_VD) (R))->VolumeId : \
286 ((PRAW_ISO_VD) (R))->VolumeId \
289#define CdRvdBlkSz(R,F) ( \
290 FlagOn( (F), VCB_STATE_HSG ) ? \
291 ((PRAW_HSG_VD) (R))->LogicalBlkSzI :\
292 ((PRAW_ISO_VD) (R))->LogicalBlkSzI \
295#define CdRvdPtLoc(R,F) ( \
296 FlagOn( (F), VCB_STATE_HSG ) ? \
297 ((PRAW_HSG_VD) (R))->PathTabLocI[0]:\
298 ((PRAW_ISO_VD) (R))->PathTabLocI[0] \
301#define CdRvdPtSz(R,F) ( \
302 FlagOn( (F), VCB_STATE_HSG ) ? \
303 ((PRAW_HSG_VD) (R))->PathTableSzI : \
304 ((PRAW_ISO_VD) (R))->PathTableSzI \
307#define CdRvdDirent(R,F) ( \
308 FlagOn( (F), VCB_STATE_HSG ) ? \
309 ((PRAW_HSG_VD) (R))->RootDe : \
310 ((PRAW_ISO_VD) (R))->RootDe \
313#define CdRvdVolSz(R,F) ( \
314 FlagOn( (F), VCB_STATE_HSG ) ? \
315 ((PRAW_HSG_VD) (R))->VolSpaceI : \
316 ((PRAW_ISO_VD) (R))->VolSpaceI \
353#define CD_ATTRIBUTE_HIDDEN (0x01)
354#define CD_ATTRIBUTE_DIRECTORY (0x02)
355#define CD_ATTRIBUTE_ASSOC (0x04)
356#define CD_ATTRIBUTE_MULTI (0x80)
358#define CD_BASE_YEAR (1900)
360#define MIN_RAW_DIRENT_LEN (FIELD_OFFSET( RAW_DIRENT, FileId ) + 1)
362#define BYTE_COUNT_8_DOT_3 (24)
364#define SHORT_NAME_SHIFT (5)
370#define CdRawDirentFlags(IC,RD) ( \
371 FlagOn( (IC)->Vcb->VcbState, VCB_STATE_HSG) ? \
392#define GMT_OFFSET_TO_NT ((LONGLONG) 15 * 60 * 1000 * 1000 * 10)
394#define CdConvertCdTimeToNtTime(IC,CD,NT) { \
395 TIME_FIELDS _TimeField; \
397 _TimeField.Year = (CSHORT) *((PCHAR) CD) + CD_BASE_YEAR; \
398 _TimeField.Month = (CSHORT) *(Add2Ptr( CD, 1, PCHAR )); \
399 _TimeField .Day = (CSHORT) *(Add2Ptr( CD, 2, PCHAR )); \
400 _TimeField.Hour = (CSHORT) *(Add2Ptr( CD, 3, PCHAR )); \
401 _TimeField.Minute = (CSHORT) *(Add2Ptr( CD, 4, PCHAR )); \
402 _TimeField.Second = (CSHORT) *(Add2Ptr( CD, 5, PCHAR )); \
403 _TimeField.Milliseconds = (CSHORT) 0; \
404 RtlTimeFieldsToTime( &_TimeField, NT ); \
405 if (!FlagOn((IC)->Vcb->VcbState, VCB_STATE_HSG) && \
406 ((GmtOffset = *(Add2Ptr( CD, 6, PCHAR ))) != 0 ) && \
407 (GmtOffset >= -48 && GmtOffset <= 52)) { \
408 (NT)->QuadPart += -GmtOffset * GMT_OFFSET_TO_NT; \
443#define MIN_RAW_PATH_ENTRY_LEN (FIELD_OFFSET( RAW_PATH_ENTRY, DirId ) + 1)
455#define CdRawPathIdLen(IC, RP) ( \
456 FlagOn( (IC)->Vcb->VcbState, VCB_STATE_HSG ) ? \
457 ((PRAW_PATH_HSG) (RP))->DirIdLen : \
461#define CdRawPathXar(IC, RP) ( \
462 FlagOn( (IC)->Vcb->VcbState, VCB_STATE_HSG ) ? \
463 ((PRAW_PATH_HSG) (RP))->XarLen : \
467#define CdRawPathLoc(IC, RP) ( \
468 FlagOn( (IC)->Vcb->VcbState, VCB_STATE_HSG ) ? \
469 ((PRAW_PATH_HSG) (RP))->DirLoc : \
516#define SYSTEM_USE_XA_FORM1 (0x0008)
517#define SYSTEM_USE_XA_FORM2 (0x0010)
518#define SYSTEM_USE_XA_DA (0x0040)
520#define SYSTEM_XA_SIGNATURE (0x4158)
enum _XA_EXTENT_TYPE XA_EXTENT_TYPE
struct _RAW_PATH_ISO RAW_PATH_ISO
RAW_PATH_ISO * PRAW_PATH_ENTRY
#define MAX_FILE_ID_LENGTH
RAW_DIRENT * PRAW_DIR_REC
RAW_PATH_HSG * PRAW_PATH_HSG
RAW_JOLIET_VD * PRAW_JOLIET_VD
SYSTEM_USE_XA * PSYSTEM_USE_XA
struct _SYSTEM_USE_XA SYSTEM_USE_XA
struct _RAW_PATH_HSG RAW_PATH_HSG
struct _RAW_DIRENT RAW_DIRENT
XA_EXTENT_TYPE * PXA_EXTENT_TYPE
RAW_PATH_ISO * PRAW_PATH_ISO
struct _RAW_JOLIET_VD RAW_JOLIET_VD
RAW_PATH_ISO RAW_PATH_ENTRY
struct _RAW_ISO_VD RAW_ISO_VD
struct _RAW_HSG_VD RAW_HSG_VD
UCHAR FileId[MAX_FILE_ID_LENGTH]
UCHAR RootDe[LEN_ROOT_DE]
UCHAR RootDe[LEN_ROOT_DE]
UCHAR RootDe[LEN_ROOT_DE]
UCHAR DirId[MAX_FILE_ID_LENGTH]
UCHAR DirId[MAX_FILE_ID_LENGTH]
_Reserved_ PVOID Reserved