31#pragma warning(disable:4201)
32#pragma warning(disable:4214)
33#pragma warning(disable:4152)
48 #define DEBUG_COMP_ID DPFLTR_CDROM_ID
56#define WPP_GUID_CDROM (A4196372, C3C4, 42d5, 87BF, 7EDB2E9BCC27)
57#ifndef WPP_CONTROL_GUIDS
58 #define WPP_CONTROL_GUIDS WPP_CONTROL_GUIDS_NORMAL_FLAGS(WPP_GUID_CDROM)
66#undef MdlMappingNoExecute
67#define MdlMappingNoExecute 0
68#define NonPagedPoolNx NonPagedPool
69#define NonPagedPoolNxCacheAligned NonPagedPoolCacheAligned
70#undef POOL_NX_ALLOCATION
71#define POOL_NX_ALLOCATION 0
88#define CDROM_HACK_DEC_RRD (0x00000001)
89#define CDROM_HACK_FUJITSU_FMCD_10x (0x00000002)
91#define CDROM_HACK_HITACHI_GD_2000 (0x00000008)
92#define CDROM_HACK_TOSHIBA_SD_W1101 (0x00000010)
96#define CDROM_HACK_BAD_GET_CONFIG_SUPPORT (0x00000100)
99#define CDROM_HACK_BAD_TYPE_ONE_GET_CONFIG (0x00000800)
100#define CDROM_HACK_BAD_VENDOR_PROFILES (0x00001000)
101#define CDROM_HACK_MSFT_VIRTUAL_ODD (0x00002000)
102#define CDROM_HACK_LOCKED_PAGES (0x80000000)
104#define CDROM_HACK_VALID_FLAGS (0x00003fff)
105#define CDROM_HACK_INVALID_FLAGS (~CDROM_HACK_VALID_FLAGS)
115#define WRITE_RETRY_DELAY_CD_1x ((LONGLONG)4266667)
116#define WRITE_RETRY_DELAY_CD_4x ((LONGLONG)1066667)
117#define WRITE_RETRY_DELAY_CD_10x ((LONGLONG) 426667)
118#define WRITE_RETRY_DELAY_DVD_1x ((LONGLONG) 473373)
119#define WRITE_RETRY_DELAY_DVD_4x ((LONGLONG) 118343)
120#define WRITE_RETRY_DELAY_DVD_16x ((LONGLONG) 29586)
121#define WRITE_RETRY_DELAY_HDDVD_1x ((LONGLONG) 143498)
124#define MAXIMUM_RETRIES 4
126#define CDROM_GET_CONFIGURATION_TIMEOUT (0x4)
127#define CDROM_READ_DISC_INFORMATION_TIMEOUT (0x4)
128#define CDROM_TEST_UNIT_READY_TIMEOUT (0x14)
129#define CDROM_GET_PERFORMANCE_TIMEOUT (0x14)
130#define CDROM_READ_CAPACITY_TIMEOUT (0x14)
132#define START_UNIT_TIMEOUT (60 * 4)
135#define MEDIA_CHANGE_TIMEOUT_TIME 300
139#define DEV_SAFE_START_UNIT 0x00000004
143#define DEV_POWER_PROTECTED 0x00000010
149#define CDROM_SPECIAL_DISABLE_SPIN_DOWN 0x00000001
157#define CDROM_SPECIAL_DISABLE_WRITE_CACHE 0x00000010
162#define SRB_CLASS_FLAGS_LOW_PRIORITY 0x10000000
165#define SRB_CLASS_FLAGS_PAGING 0x40000000
176#define CDROM_INTERPRET_SENSE_INFO2_MAXIMUM_HISTORY_COUNT 30000
181#define IOCTL_MCN_SYNC_FAKE_IOCTL IOCTL_DISK_UPDATE_DRIVE_SIZE
237#define CDROM_FLAG_WINPE_MODE 0x00000001
241#define CdromMmcUpdateComplete 0
242#define CdromMmcUpdateRequired 1
243#define CdromMmcUpdateStarted 2
589#if (NTDDI_VERSION >= NTDDI_WIN8)
680#define SCSI_CDROM_TIMEOUT 10
681#define SCSI_CHANGER_BONUS_TIMEOUT 10
688#define SCSI_CDROM_OPC_TIMEOUT 260
690#define HITACHI_MODE_DATA_SIZE 12
691#define MODE_DATA_SIZE 64
693#define RAW_SECTOR_SIZE 2352
694#define COOKED_SECTOR_SIZE 2048
696#define CDROM_SRB_LIST_SIZE 4
698#define PLAY_ACTIVE(x) (x->DeviceAdditionalData.PlayActive)
700#define MSF_TO_LBA(Minutes,Seconds,Frames) \
701 (ULONG)((60 * 75 * (Minutes)) + (75 * (Seconds)) + ((Frames) - 150))
706#define CD_DA_SECTOR 1
707#define YELLOW_MODE1_SECTOR 2
708#define YELLOW_MODE2_SECTOR 3
709#define FORM2_MODE1_SECTOR 4
710#define FORM2_MODE2_SECTOR 5
712#define MAX_COPY_PROTECT_AGID 4
715 #undef ExAllocatePool
716 #define ExAllocatePool #assert(FALSE)
724#define CDROM_TAG_AUTORUN_DISABLE 'ACcS'
725#define CDROM_TAG_MEDIA_CHANGE_DETECTION 'aCcS'
727#define CDROM_TAG_SCRATCH 'BCcS'
728#define CDROM_TAG_GET_CONFIG 'CCcS'
729#define CDROM_TAG_COMPLETION_CONTEXT 'cCcS'
730#define CDROM_TAG_DESCRIPTOR 'DCcS'
731#define CDROM_TAG_DISC_INFO 'dCcS'
732#define CDROM_TAG_SYNC_EVENT 'eCcS'
733#define CDROM_TAG_FEATURE 'FCcS'
734#define CDROM_TAG_GESN 'GCcS'
735#define CDROM_TAG_SENSE_INFO 'ICcS'
736#define CDROM_TAG_INQUIRY 'iCcS'
737#define CDROM_TAG_MODE_DATA 'MCcS'
738#define CDROM_TAG_STREAM 'OCCS'
739#define CDROM_TAG_NOTIFICATION 'oCcS'
740#define CDROM_TAG_PLAY_ACTIVE 'pCcS'
741#define CDROM_TAG_REGISTRY 'rCcS'
742#define CDROM_TAG_SRB 'SCcS'
743#define CDROM_TAG_STRINGS 'sCcS'
744#define CDROM_TAG_UPDATE_CAP 'UCcS'
745#define CDROM_TAG_ZERO_POWER_ODD 'ZCcS'
747#define DVD_TAG_READ_KEY 'uCcS'
748#define DVD_TAG_RPC2_CHECK 'VCcS'
749#define DVD_TAG_DVD_REGION 'vCcS'
750#define DVD_TAG_SECURITY 'XCcS'
754#define CDROM_SUBKEY_NAME (L"CdRom")
755#define CDROM_READ_CD_NAME (L"ReadCD")
756#define CDROM_NON_MMC_DRIVE_NAME (L"NonMmc")
757#define CDROM_TYPE_ONE_GET_CONFIG_NAME (L"NoTypeOneGetConfig")
758#define CDROM_NON_MMC_VENDOR_SPECIFIC_PROFILE (L"NonMmcVendorSpecificProfile")
760#define DVD_DEFAULT_REGION (L"DefaultDvdRegion")
761#define DVD_MAX_REGION 8
764#define AACS_MKB_PACK_SIZE 0x8000
782#define FREE_POOL(_PoolPtr) \
783 if (_PoolPtr != NULL) { \
784 ExFreePool(_PoolPtr); \
788#define EXCLUSIVE_MODE(_CdData) (_CdData->ExclusiveOwner != NULL)
789#define EXCLUSIVE_OWNER(_CdData, _FileObject) (_CdData->ExclusiveOwner == _FileObject)
791#define IS_SCSIOP_READ(opCode) \
792 ((opCode == SCSIOP_READ6) || \
793 (opCode == SCSIOP_READ) || \
794 (opCode == SCSIOP_READ12) || \
795 (opCode == SCSIOP_READ16))
797#define IS_SCSIOP_WRITE(opCode) \
798 ((opCode == SCSIOP_WRITE6) || \
799 (opCode == SCSIOP_WRITE) || \
800 (opCode == SCSIOP_WRITE12) || \
801 (opCode == SCSIOP_WRITE16))
803#define IS_SCSIOP_READWRITE(opCode) (IS_SCSIOP_READ(opCode) || IS_SCSIOP_WRITE(opCode))
806#define SET_FLAG(Flags, Bit) ((Flags) |= (Bit))
807#define CLEAR_FLAG(Flags, Bit) ((Flags) &= ~(Bit))
808#define TEST_FLAG(Flags, Bit) (((Flags) & (Bit)) != 0)
814 if (((
Ch >=
'0') && (
Ch <=
'9')) ||
815 (((
Ch|0x20) >=
'a') && ((
Ch|0x20) <=
'z')) ||
924DeviceReleaseMcnResources(
930DeviceRetrieveDescriptor(
938DeviceRetrieveHackFlagsFromRegistry(
976DeviceGetTimeOutValueFromRegistry();
980ScanForSpecialHandler(
987DeviceSendSrbSynchronously(
1061DeviceCacheDeviceInquiryData(
1067DeviceCacheGetConfigurationData(
1073DeviceFindFeaturePage(
1081DevicePrintAllFeaturePages(
1088DeviceSetRawReadInfo(
1100MediaReadCapacityDataInterpret(
1107DeviceInitReleaseQueueContext(
1113DeviceInitPowerContext(
1119DeviceCreateWellKnownName(
1137DeviceRegisterInterface(
1144DeviceSendPowerDownProcessRequest(
1152DeviceScanForSpecial(
1160DeviceInitializeHotplugInfo(
1184DeviceInitializeMediaChangeDetection(
1197DeviceSendDelayedMediaChangeNotifications(
1209DeviceCleanupProtectedLocks(
1216DeviceCleanupDisableMcn(
1223DeviceUnlockExclusive(
1231RequestProcessSerializedIoctl(
1244DeviceSendRequestSynchronously(
1270DeviceEnableMediaChangeDetection(
1278DeviceDisableMediaChangeDetection(
1313DeviceRetrieveModeSenseUsingScratch(
1323ModeSenseFindSpecificPage(
1332PerformEjectionControl(
1341DeviceDisableMainTimer(
1347DeviceEnableMainTimer(
1360RequestSetupMcnRequest(
1367RequestSendMcnRequest(
1373RequestPostWorkMcnRequest(
1379PowerContextReuseRequest(
1385PowerContextBeginUse(
1401DeviceInitializeZPODD(
1407DeviceReleaseZPODDResources(
1419DeviceZPODDIsInHomePosition(
1435DvdStartSessionReadKey(
1482 #define SIZEOF_ARRAY(ar) (sizeof(ar)/sizeof((ar)[0]))
1487#define UNIT_100NS_PER_SECOND (10*1000*1000)
1488#define SECONDS_TO_100NS_UNITS(x) (((LONGLONG)x) * UNIT_100NS_PER_SECOND)
1493#define SET_FLAG(Flags, Bit) ((Flags) |= (Bit))
1494#define CLEAR_FLAG(Flags, Bit) ((Flags) &= ~(Bit))
1495#define TEST_FLAG(Flags, Bit) (((Flags) & (Bit)) != 0)
1518#pragma prefast(push)
1519#pragma prefast(disable: 28175, "there is no other way to check if there is volume mounted")
1528ConvertSectorsPerSecondTo100nsUnitsFor64kWrite(
1564 return currentStack->
Flags;
1580 value = TimeOutValue;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
char * strchr(const char *String, int ch)
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER Handler
EVT_WDF_IO_QUEUE_IO_DEFAULT CreateQueueEvtIoDefault
_In_ PSCSI_REQUEST_BLOCK Srb
_In_opt_ PWSTR _In_ PWSTR ParameterName
NTSTATUS RequestSynchronizeProcessWithSerialQueue(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request)
EVT_WDF_TIMER DeviceMainTimerTickHandler
NTSTATUS RequestIsIoctlBlockedByExclusiveAccess(_In_ WDFREQUEST Request, _Out_ PBOOLEAN IsBlocked)
_In_ size_t _In_ UCHAR _In_ BOOLEAN Use6Byte
struct _CDROM_POWER_CONTEXT CDROM_POWER_CONTEXT
NTSTATUS DeviceErrorHandlerForMmc(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb, _Inout_ PNTSTATUS Status, _Inout_ PBOOLEAN Retry)
struct _CDROM_DATA * PCDROM_DATA
struct _CDROM_DEVICE_EXTENSION * PCDROM_DEVICE_EXTENSION
FORCEINLINE BOOLEAN PORT_ALLOCATED_SENSE(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
_In_ WDFFILEOBJECT _In_ BOOLEAN IgnorePreviousMediaChanges
BOOLEAN DeviceIsMmcUpdateRequired(_In_ WDFDEVICE Device)
struct _CDROM_READ_WRITE_CONTEXT CDROM_READ_WRITE_CONTEXT
VOID(* PCDROM_SCAN_FOR_SPECIAL_HANDLER)(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ ULONG_PTR Data)
FORCEINLINE BOOLEAN ValidChar(UCHAR Ch)
_In_ size_t _In_ UCHAR PageMode
struct _CDROM_IOCTL_CONTEXT * PCDROM_IOCTL_CONTEXT
FORCEINLINE ULONG CountOfSetBitsULong64(ULONG64 _X)
VOID DeviceReleaseQueue(_In_ WDFDEVICE Device)
struct _CDROM_POWER_CONTEXT * PCDROM_POWER_CONTEXT
BOOLEAN RequestSenseInfoInterpretForScratchBuffer(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ ULONG RetriedCount, _Out_ NTSTATUS *Status, _Out_ _Deref_out_range_(0, MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) LONGLONG *RetryIntervalIn100ns)
FORCEINLINE VOID FREE_PORT_ALLOCATED_SENSE_BUFFER(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
EVT_WDFDEVICE_WDM_IRP_PREPROCESS RequestProcessSetPower
struct _COMPLETION_CONTEXT COMPLETION_CONTEXT
FORCEINLINE ULONG CountOfSetBitsULong32(ULONG32 _X)
SYNC_HANDLER * PSYNC_HANDLER
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID BufferAddress
EVT_WDF_WORKITEM IoctlWorkItemRoutine
_In_ BOOLEAN _In_ BOOLEAN SetIdleTimeout
EVT_WDF_WORKITEM ReadWriteWorkItemRoutine
POWER_SETTING_CALLBACK DevicePowerSettingCallback
_In_ PSTORAGE_PROPERTY_ID PropertyId
VOID RequestSetupMcnSyncIrp(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension)
EVT_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP DeviceEvtSelfManagedIoCleanup
DRIVER_INITIALIZE DriverEntry
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID _In_ ULONG _In_ BOOLEAN _In_opt_ WDFREQUEST OriginalRequest
FORCEINLINE BOOLEAN IsVolumeMounted(_In_ PDEVICE_OBJECT DeviceObject)
EVT_WDF_FILE_CLOSE DeviceEvtFileClose
_In_ PFILE_OBJECT_CONTEXT FileObjectContext
NTSTATUS RequestSetContextFields(_In_ WDFREQUEST Request, _In_ PSYNC_HANDLER Handler)
EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL SequentialQueueEvtIoDeviceControl
_In_opt_ PWSTR _In_ PWSTR _Inout_ PULONG ParameterValue
struct _CDROM_MMC_EXTENSION * PCDROM_MMC_EXTENSION
VOID RequestProcessInternalDeviceControl(_In_ WDFREQUEST Request, _In_ PCDROM_DEVICE_EXTENSION DeviceExtension)
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID _In_ ULONG _In_ BOOLEAN WriteToDevice
EVT_WDF_OBJECT_CONTEXT_CLEANUP DeviceEvtCleanup
struct _CDROM_SCRATCH_READ_WRITE_CONTEXT CDROM_SCRATCH_READ_WRITE_CONTEXT
struct _CDROM_SCRATCH_READ_WRITE_CONTEXT * PCDROM_SCRATCH_READ_WRITE_CONTEXT
EVT_WDF_DEVICE_D0_ENTRY DeviceEvtD0Entry
NTSTATUS RequestSend(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDFIOTARGET IoTarget, _In_ ULONG Flags, _Out_opt_ PBOOLEAN RequestSent)
FORCEINLINE ULONG SectorsPerSecond
CDROM_SCAN_FOR_SPECIAL_INFO CdromHackItems[]
NTSTATUS RequestDuidGetDeviceIdProperty(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
EVT_WDF_OBJECT_CONTEXT_CLEANUP RequestEvtCleanup
NTSTATUS SYNC_HANDLER(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request)
FORCEINLINE UCHAR RequestGetCurrentStackLocationFlags(_In_ WDFREQUEST Request)
_In_ CDROM_SCAN_FOR_SPECIAL_INFO DeviceList[]
EVT_WDF_DEVICE_SELF_MANAGED_IO_INIT DeviceEvtSelfManagedIoInit
struct _COMPLETION_CONTEXT * PCOMPLETION_CONTEXT
enum CDROM_DEVICE_INTERFACES * PCDROM_DEVICE_INTERFACES
_In_ PREAD_CAPACITY_DATA ReadCapacityBuffer
FORCEINLINE ULONG CountOfSetBitsULong(ULONG _X)
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
EVT_WDF_REQUEST_COMPLETION_ROUTINE DeviceAsynchronousCompletion
EVT_WDF_DRIVER_DEVICE_ADD DriverEvtDeviceAdd
EVT_WDF_REQUEST_COMPLETION_ROUTINE RequestDummyCompletionRoutine
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
struct _CDROM_POWER_OPTIONS * PCDROM_POWER_OPTIONS
_In_ ULONG _In_ UCHAR PageCode
_In_opt_ PWSTR SubkeyName
struct _CDROM_DRIVER_EXTENSION * PCDROM_DRIVER_EXTENSION
VOID RequestCompletion(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ NTSTATUS Status, _In_ ULONG_PTR Information)
VOID DeviceSetMediaChangeStateEx(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ MEDIA_CHANGE_DETECTION_STATE NewState, _Inout_opt_ PMEDIA_CHANGE_DETECTION_STATE OldState)
EVT_WDF_IO_IN_CALLER_CONTEXT DeviceEvtIoInCallerContext
BOOLEAN RequestSenseInfoInterpret(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ PSCSI_REQUEST_BLOCK Srb, _In_ ULONG RetriedCount, _Out_ NTSTATUS *Status, _Out_opt_ _Deref_out_range_(0, MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) LONGLONG *RetryIntervalIn100ns)
EVT_WDF_DEVICE_SURPRISE_REMOVAL DeviceEvtSurpriseRemoval
VOID DevicePerfIncrementErrorCount(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension)
_In_ ULONG const _In_ FEATURE_NUMBER const Feature
EVT_WDF_REQUEST_COMPLETION_ROUTINE DeviceReleaseQueueCompletion
_In_z_ PCHAR TargetString
FORCEINLINE ULONG CountOfSetBitsUlongPtr(ULONG_PTR _X)
NTSTATUS DeviceZPODDGetPowerupReason(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _Out_ PSTORAGE_IDLE_POWERUP_REASON PowerupReason)
VOID RequestSetSentTime(_In_ WDFREQUEST Request)
IO_COMPLETION_ROUTINE RequestAsynchronousIrpCompletion
EVT_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE SequentialQueueEvtCanceledOnQueue
#define TEST_FLAG(Flags, Bit)
#define CLEAR_FLAG(Flags, Bit)
struct _CDROM_READ_WRITE_CONTEXT * PCDROM_READ_WRITE_CONTEXT
_In_ WDFREQUEST _In_ BOOLEAN RequestFormated
NTSTATUS RequestDuidGetDeviceProperty(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
#define SCSI_CDROM_OPC_TIMEOUT
EVT_WDF_OBJECT_CONTEXT_CLEANUP DriverEvtCleanup
VOID NTAPI SequentialQueueEvtIoReadWrite(_In_ WDFQUEUE Queue, _In_ WDFREQUEST Request, _In_ size_t Length)
VOID RequestSetReceivedTime(_In_ WDFREQUEST Request)
FORCEINLINE ULONG CountOfSetBitsUChar(UCHAR _X)
struct _ERROR_RECOVERY_DATA ERROR_RECOVERY_DATA
_In_ WDFREQUEST _In_ MEDIA_LOCK_TYPE LockType
struct _CDROM_POWER_OPTIONS CDROM_POWER_OPTIONS
struct _CDROM_REQUEST_CONTEXT * PCDROM_REQUEST_CONTEXT
struct _CDROM_IOCTL_CONTEXT CDROM_IOCTL_CONTEXT
@ PowerDownDeviceUnlocked
@ PowerDownDeviceQuiesced
VOID DeviceSendNotification(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ const GUID *Guid, _In_ ULONG ExtraDataSize, _In_opt_ PVOID ExtraData)
struct _CDROM_DEVICE_EXTENSION CDROM_DEVICE_EXTENSION
struct _ERROR_RECOVERY_DATA * PERROR_RECOVERY_DATA
VOID DeviceSendIoctlAsynchronously(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ ULONG IoControlCode, _In_ PDEVICE_OBJECT TargetDeviceObject)
_In_ ULONG _In_ UCHAR _In_ UCHAR PageControl
VOID(* PCDROM_ERROR_HANDLER)(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb, _Inout_ PNTSTATUS Status, _Inout_ PBOOLEAN Retry)
EVT_WDFDEVICE_WDM_IRP_PREPROCESS RequestProcessShutdownFlush
struct _CDROM_MMC_EXTENSION CDROM_MMC_EXTENSION
NTSTATUS DeviceErrorHandlerForHitachiGD2000(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb, _Inout_ PNTSTATUS Status, _Inout_ PBOOLEAN Retry)
VOID RequestClearSendTime(_In_ WDFREQUEST Request)
struct _CDROM_REQUEST_CONTEXT CDROM_REQUEST_CONTEXT
EVT_WDF_DEVICE_D0_EXIT DeviceEvtD0Exit
struct _CDROM_DRIVER_EXTENSION CDROM_DRIVER_EXTENSION
FORCEINLINE ULONG TimeOutValueGetCapValue(_In_ ULONG TimeOutValue, _In_ ULONG Times)
struct _CDROM_DATA CDROM_DATA
VOID DeviceSendStartUnit(_In_ WDFDEVICE Device)
EVT_WDF_WORKITEM DeviceRestoreDefaultSpeed
#define MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS
enum _MEDIA_CHANGE_DETECTION_STATE * PMEDIA_CHANGE_DETECTION_STATE
enum _MEDIA_CHANGE_DETECTION_STATE MEDIA_CHANGE_DETECTION_STATE
_In_ PSCSI_REQUEST_BLOCK _Out_ NTSTATUS _Inout_ BOOLEAN * Retry
_In_ const GUID _In_ ULONG ExtraDataSize
_In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_PARAMETERS RequestParameters
#define SRB_FLAGS_FREE_SENSE_BUFFER
#define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE
#define _IRQL_requires_max_(irql)
IN OUT PVCB IN PDEVICE_OBJECT TargetDeviceObject
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define _In_reads_bytes_(s)
#define _Deref_out_range_(l, h)
#define _Field_size_bytes_(s)
#define _Ret_range_(l, h)
#define UNREFERENCED_PARAMETER(P)
#define CDROM_EXCLUSIVE_CALLER_LENGTH
enum _FEATURE_NUMBER FEATURE_NUMBER
_In_ ULONG _In_ ULONG _In_ ULONG Length
* PSTORAGE_DESCRIPTOR_HEADER
* PSTORAGE_DEVICE_DESCRIPTOR
enum _STORAGE_PROPERTY_ID * PSTORAGE_PROPERTY_ID
* PSTORAGE_ADAPTER_DESCRIPTOR
BOOLEAN NTAPI PsIsThreadTerminating(IN PETHREAD Thread)
_Field_size_bytes_(CachedInquiryDataByteCount) PINQUIRYDATA CachedInquiryData
UNICODE_STRING WellKnownName
DEVICE_TYPE DriveDeviceType
ULONG MaxPageAlignedTransferBytes
ULONG MaxUnalignedTransferBytes
PCDROM_ERROR_HANDLER ErrorHandler
LONGLONG ReadWriteRetryDelay100nsUnits
ULONG CachedInquiryDataByteCount
WDFFILEOBJECT ExclusiveOwner
CDROM_SCRATCH_CONTEXT ScratchContext
BOOLEAN ReleaseQueueInProgress
PSTORAGE_ADAPTER_DESCRIPTOR AdapterDescriptor
ULONG ScanForSpecialFlags
PDEVICE_OBJECT DeviceObject
WDFWAITLOCK EjectSynchronizationLock
PZERO_POWER_ODD_INFO ZeroPowerODDInfo
WDFWORKITEM IoctlWorkItem
CDROM_READ_WRITE_CONTEXT ReadWriteWorkItemContext
WDFQUEUE ManualVolumeReadyQueue
WDFMEMORY ReleaseQueueInputMemory
BOOLEAN ReleaseQueueNeeded
PCDROM_PRIVATE_FDO_DATA PrivateFdoData
WDFWORKITEM ReadWriteWorkItem
WDFSPINLOCK ReleaseQueueSpinLock
LARGE_INTEGER StartingOffset
PSTORAGE_DEVICE_DESCRIPTOR DeviceDescriptor
KEVENT EjectSynchronizationEvent
UNICODE_STRING DeviceName
CDROM_POWER_CONTEXT PowerContext
CDROM_IOCTL_CONTEXT IoctlWorkItemContext
WDFREQUEST ReleaseQueueRequest
LARGE_INTEGER PartitionLength
DISK_GEOMETRY DiskGeometry
WDFWAITLOCK ShutdownFlushWaitLock
SCSI_REQUEST_BLOCK ReleaseQueueSrb
BOOLEAN PowerDownInProgress
BOOLEAN IsVolumeOnlinePending
PMEDIA_CHANGE_DETECTION_INFO MediaChangeDetectionInfo
FILE_OBJECT_CONTEXT KernelModeMcnContext
PCDROM_DRIVER_EXTENSION DriverExtension
UNICODE_STRING MountedDeviceInterfaceName
CDROM_DATA DeviceAdditionalData
PDEVICE_POWER_DESCRIPTOR PowerDescriptor
PDRIVER_OBJECT DriverObject
WDFREQUEST OriginalRequest
FEATURE_NUMBER ValidationSchema
SCSI_REQUEST_BLOCK CapabilitiesSrb
BOOLEAN StreamingReadSupported
ULONG CapabilitiesBufferSize
SENSE_DATA CapabilitiesSenseData
WDFREQUEST CapabilitiesRequest
_Field_size_bytes_(CapabilitiesBufferSize) PGET_CONFIGURATION_HEADER CapabilitiesBuffer
BOOLEAN StreamingWriteSupported
LARGE_INTEGER CompleteTime
LARGE_INTEGER Step1CompleteTime
LONGLONG RetryIntervalIn100ns
CDROM_POWER_OPTIONS Options
CDROM_POWER_UP_STATE PowerUp
CDROM_POWER_DOWN_STATE PowerDown
WDFREQUEST OriginalRequest
WDFREQUEST OriginalRequest
PCDROM_DEVICE_EXTENSION DeviceExtension
KSPIN_LOCK ReadWriteCancelSpinLock
LARGE_INTEGER TimeReceived
BOOLEAN ReadWriteIsCompleted
LARGE_INTEGER TimeSentDownLasttTime
BOOLEAN ReadWriteRetryInitialized
PSYNC_HANDLER SyncCallback
LARGE_INTEGER TimeSentDownFirstTime
BOOLEAN PartialMdlIsBuilt
_Field_range_(4 *1024, 64 *1024) ULONG ScratchBufferSize
PCSTR ScratchInUseFileName
ULONG ScratchInUseLineNumber
PSCSI_REQUEST_BLOCK ScratchSrb
CDROM_SCRATCH_READ_WRITE_CONTEXT ScratchReadWriteContext
WDFREQUEST ScratchRequest
PSRB_HISTORY ScratchHistory
PSRB_HISTORY_ITEM SrbHistoryItem
LARGE_INTEGER StartingOffset
MODE_READ_RECOVERY_PAGE ReadRecoveryPage
MODE_PARAMETER_BLOCK BlockDescriptor
MODE_PARAMETER_HEADER Header
UCHAR SenseInfoBufferLength
_Must_inspect_result_ _In_ WDFDEVICE Device
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
_In_ WDFREQUEST _In_ size_t OutputBufferLength
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Must_inspect_result_ _In_ WDFDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIOTARGET * IoTarget
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
#define WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(_contexttype, _castingfunction)
EVT_WDF_REQUEST_COMPLETION_ROUTINE * PFN_WDF_REQUEST_COMPLETION_ROUTINE
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
_Must_inspect_result_ _In_ ULONG Flags