DDJ, December 1995: Examining the Windows 95 Layered File System by Mark Russinovich and Bryce Cogswell Listing Three typedef struct _DCB_COMMON { ULONG DCB_physical_dcb; // DCB for physical device ULONG DCB_expansion_length; // total length of IOP extension filled // Link fields follow PVOID DCB_ptr_cd; // pointer to calldown list ULONG DCB_next_dcb; // pointer to next DCB ULONG DCB_next_logical_dcb; // pointer to next logical dcb // for physical device BYTE DCB_drive_lttr_equiv; // drive number (A: = 0, etc.) // set up by iosserv during logical // device associate processing. BYTE DCB_unit_number; // either physical drive number // (sequential drive number or'd // with 80h) or unit number within // tsd. set up by iosbid for disk // physical dcb's. set up by tsdpart // for disk logical dcb's. set up by // tsdaer for cdrom physical dcb's. USHORT DCB_TSD_Flags; // Flags for TSD // Volume Tracking fields follow ULONG DCB_vrp_ptr; // pointer to VRP for this DCB ULONG DCB_dmd_flags; // demand bits of the topmost layer ULONG DCB_device_flags; // was BDD_Flags ULONG DCB_device_flags2; // second set of general purpose flags ULONG DCB_Partition_Start; // partition start sector ULONG DCB_track_table_ptr; // pointer for the track table buffer // for ioctls ULONG DCB_bds_ptr; // DOS BDS corresp. to this DCB // (logical DCB's only) ULONG DCB_Reserved1; // reserved ULONG DCB_Reserved2; // reserved BYTE DCB_apparent_blk_shift; // log of apparent_blk_size BYTE DCB_partition_type; // partition type USHORT DCB_sig; // padding and signature BYTE DCB_device_type; // Device Type ULONG DCB_Exclusive_VM; // exclusive access handle to device UCHAR DCB_disk_bpb_flags; // bpb flags see defines below UCHAR DCB_cAssoc; // count of logical drives // associated with this logical DCB UCHAR DCB_Sstor_Host; // indicates a sstor host volume USHORT DCB_user_drvlet; // the userdriveletter settings USHORT DCB_Reserved3; // reserved ULONG DCB_Reserved4; // reserved } DCB_COMMON, *PDCB_COMMON; typedef struct _DCB { DCB_COMMON DCB_cmn; ULONG DCB_max_xfer_len; // maximum transfer length // Actual geometry data follows ULONG DCB_actual_sector_cnt[2]; // number of sectors as seen below // the tsd. ULONG DCB_actual_blk_size; // actual block size of the device // as seen below the tsd. ULONG DCB_actual_head_cnt; // number of heads as seen below // the tsd. ULONG DCB_actual_cyl_cnt; // number of cylinders as seen // below the tsd. ULONG DCB_actual_spt; // number of sectors per track as // seen below the tsd. PVOID DCB_next_ddb_dcb; // link to next DCB on DDB chain PVOID DCB_dev_node; // pointer to dev node for this device BYTE DCB_bus_type; // Type of BUS BYTE DCB_bus_number; // channel (cable) within adapter UCHAR DCB_queue_freeze; // queue freeze depth counter UCHAR DCB_max_sg_elements;// max # s/g elements UCHAR DCB_io_pend_count; // number of requests pending for // this DCB (Vol Track Layer use) UCHAR DCB_lock_count; // depth counter for LOCK MEDIA // SCSI fields follow USHORT DCB_SCSI_VSD_FLAGS; // Flags for SRB builder BYTE DCB_scsi_target_id; // SCSI target ID BYTE DCB_scsi_lun; // SCSI logical unit number BYTE DCB_scsi_hba; // adapter number relative to port drv. BYTE DCB_max_sense_data_len; // Maximum sense Length USHORT DCB_srb_ext_size; // miniport srb extension length BYTE DCB_inquiry_flags[8]; // Device Inquiry Flags BYTE DCB_vendor_id[8]; // Vendor ID string BYTE DCB_product_id[16]; // Product ID string BYTE DCB_rev_level[4]; // Product revision level BYTE DCB_port_name[8]; UCHAR DCB_current_unit; // used to emulate mltpl log. devices // with a single physical device ULONG DCB_blocked_iop; // pointer to requests for an inactive // volume ULONG DCB_vol_unlock_timer; // unlock timer handle UCHAR DCB_access_timer; // measures time between accesses UCHAR DCB_Vol_Flags; // Flags for Volume Tracking BYTE DCB_q_algo; // queuing algorithm index BYTE DCB_unit_on_ctl; // relative device number on ctlr ULONG DCB_Port_Specific; // bytes for PORT DRIVER use ULONG DCB_spindown_timer; // timer for drive spin down DCB_BLOCKDEV DCB_bdd; } DCB, *PDCB; // define the device control block (dcb) for logical disk devices typedef struct _LOG_DCB { DCB_COMMON DCB_cmn; } LOG_DCB, *PLOG_DCB;