26#define DEBUG_MAIN_SOURCE 1
54#pragma alloc_text(INIT, DriverEntry)
55#pragma alloc_text(INIT, BootEnvironmentIsWinPE)
57#pragma alloc_text(PAGE, DriverEvtCleanup)
58#pragma alloc_text(PAGE, DriverEvtDeviceAdd)
59#pragma alloc_text(PAGE, DeviceEvtCleanup)
60#pragma alloc_text(PAGE, DeviceEvtSelfManagedIoCleanup)
61#pragma alloc_text(PAGE, DeviceEvtD0Exit)
62#pragma alloc_text(PAGE, CreateQueueEvtIoDefault)
63#pragma alloc_text(PAGE, DeviceEvtFileClose)
64#pragma alloc_text(PAGE, DeviceCleanupProtectedLocks)
65#pragma alloc_text(PAGE, DeviceCleanupDisableMcn)
66#pragma alloc_text(PAGE, RequestProcessSerializedIoctl)
67#pragma alloc_text(PAGE, ReadWriteWorkItemRoutine)
68#pragma alloc_text(PAGE, IoctlWorkItemRoutine)
69#pragma alloc_text(PAGE, DeviceEvtSurpriseRemoval)
103 WDFDRIVER driverObject =
NULL;
111 "CDROM.SYS DriverObject %p loading\n",
130 "WdfDriverCreate failed. %x\n",
143 driverExtension->
Version = 0x01;
178 WDFKEY registryKey =
NULL;
195 WdfRegistryClose(registryKey);
225 "CDROM.SYS DriverObject %p cleanup. Will be unloaded soon\n",
277 ULONG deviceNumber = 0;
279 ULONG devicePropertySize = 0;
284 driverExtension = DriverGetExtension(
Driver);
311 WdfDeviceInitSetPnpPowerEventCallbacks(
DeviceInit, &pnpPowerCallbacks);
315 WdfDeviceInitSetIoInCallerContextCallback(
DeviceInit,
320 UCHAR minorFunctions[1];
332 "DriverEvtDeviceAdd: Assign IrpPreprocessCallback for IRP_MJ_POWER failed, "
333 "status: 0x%X\n",
status));
346 "DriverEvtDeviceAdd: Assign IrpPreprocessCallback for IRP_MJ_FLUSH_BUFFERS failed, "
347 "status: 0x%X\n",
status));
360 "DriverEvtDeviceAdd: Assign IrpPreprocessCallback for IRP_MJ_SHUTDOWN failed, "
361 "status: 0x%X\n",
status));
427 WdfDeviceInitSetRemoveLockOptions(
DeviceInit, &removeLockOptions);
430 lowerPdo = WdfFdoInitWdmGetPhysicalDevice(
DeviceInit);
449 if (wideDeviceName ==
NULL)
459 L"\\Device\\CdRom%d",
464 "DriverEvtDeviceAdd: Format device name failed with error: 0x%X\n",
status));
475 "DriverEvtDeviceAdd: WdfDeviceInitAssignName() failed with error: 0x%X\n",
status));
492 "DriverEvtDeviceAdd: Can not create a new device, status: 0x%X\n",
503 deviceExtension = DeviceGetExtension(
device);
505 deviceExtension->
Version = 0x01;
512 deviceExtension->
LowerPdo = lowerPdo;
515 deviceExtension->
DeviceName = unicodeDeviceName;
530 "DriverEvtDeviceAdd: Can not create a remote I/O target object, status: 0x%X\n",
536 WdfDeviceWdmGetAttachedDevice(deviceExtension->
Device));
539 &ioTargetOpenParams);
543 "DriverEvtDeviceAdd: Can not open a remote I/O target for the next-lower device, status: 0x%X\n",
546 WdfObjectDelete(deviceExtension->
IoTarget);
556 status = DeviceClaimRelease(deviceExtension,
FALSE);
565 deviceClaimed =
TRUE;
590#pragma prefast(disable: 28155, "a joint handler for read/write cannot be EVT_WDF_IO_QUEUE_IO_READ and EVT_WDF_IO_QUEUE_IO_WRITE simultaneously")
591#pragma prefast(disable: 28023, "a joint handler for read/write cannot be EVT_WDF_IO_QUEUE_IO_READ and EVT_WDF_IO_QUEUE_IO_WRITE simultaneously")
648 WdfDeviceSetAlignmentRequirement(deviceExtension->
Device,
671 deviceExtension->
TimeOutValue = DeviceGetTimeOutValueFromRegistry();
679 "DriverEvtDeviceAdd: device timeout is set to %x seconds",
683#if (NTDDI_VERSION >= NTDDI_WIN8)
704 status = WdfWaitLockCreate(&attributes,
713 status = DeviceInitReleaseQueueContext(deviceExtension);
718 status = DeviceInitPowerContext(deviceExtension);
724 status = DeviceCreateWellKnownName(deviceExtension);
731 &DEVPKEY_Device_SessionId,
734 sizeof(devicePropertySessionId),
735 &devicePropertySessionId,
737 &devicePropertyType);
773 "DriverEvtDeviceAdd: Cannot create shutdown/flush waitlock, status: 0x%X\n",
791 status = WdfWorkItemCreate(&workItemConfig,
799 "DriverEvtDeviceAdd: Cannot create read/write work item, status: 0x%X\n",
817 status = WdfWorkItemCreate(&workItemConfig,
825 "DriverEvtDeviceAdd: Cannot create ioctl work item, status: 0x%X\n",
837 if (deviceExtension !=
NULL)
843 if ((deviceExtension !=
NULL) && deviceClaimed)
845 DeviceClaimRelease(deviceExtension,
TRUE);
847 deviceClaimed =
FALSE;
880 "WDFDEVICE %p cleanup: The device is about to be destroyed.\n",
883 deviceExtension = DeviceGetExtension(
device);
928 "DeviceEvtSelfManagedIoCleanup: WDFDEVICE %p is being stopped.\n",
932 deviceExtension = DeviceGetExtension(
Device);
942 WdfIoTargetClose(deviceExtension->
IoTarget);
948 status = DeviceClaimRelease(deviceExtension,
TRUE);
958 DeviceDeallocateMmcResources(
Device);
959 ScratchBuffer_Deallocate(deviceExtension);
975 DeviceReleaseMcnResources(deviceExtension);
977 DeviceReleaseZPODDResources(deviceExtension);
1021 deviceExtension = DeviceGetExtension(
Device);
1028 if (zpoddInfo !=
NULL)
1043 "DeviceEvtD0Entry: Device has left zero power state due to eject button pressed\n"
1060 "DeviceEvtD0Entry: Device has left zero power state due to IO received\n"
1067 DeviceEnableMainTimer(deviceExtension);
1104 deviceExtension = DeviceGetExtension(
Device);
1115 DeviceDisableMainTimer(deviceExtension);
1128 #if (WINVER >= 0x0601)
1131 ULONG secondsRemaining = 0;
1134 watchdogTimeSupported = PoQueryWatchdogTime(deviceExtension->
LowerPdo, &secondsRemaining);
1142 status = PowerContextBeginUse(deviceExtension);
1150 status = DeviceSendPowerDownProcessRequest(deviceExtension,
NULL,
NULL);
1167 status = DeviceSendPowerDownProcessRequest(deviceExtension,
NULL,
NULL);
1179 status = DeviceSendPowerDownProcessRequest(deviceExtension,
NULL,
NULL);
1190 status = DeviceSendPowerDownProcessRequest(deviceExtension,
NULL,
NULL);
1198 PowerContextEndUse(deviceExtension);
1206 if (zpoddInfo !=
NULL)
1211 "Device has entered zero power state\n"
1247 deviceExtension = DeviceGetExtension(
Device);
1252 DeviceDisableMainTimer(deviceExtension);
1258 "Surprisely remove a WDFDEVICE %p\n",
Device));
1289 WDFFILEOBJECT fileObject = WdfRequestGetFileObject(
Request);
1297 if (fileObject ==
NULL) {
1300 "Error: received a file create request with file object set to NULL\n"));
1306 fileObjectContext = FileObjectGetContext(fileObject);
1359 status = DeviceCleanupProtectedLocks(deviceExtension, fileObjectContext);
1363 "Failed to cleanup protected locks for WDFDEVICE %p, %!STATUS!\n",
device,
status));
1367 status = DeviceCleanupDisableMcn(deviceExtension, fileObjectContext);
1371 "Failed to disable MCN for WDFDEVICE %p, %!STATUS!\n",
device,
status));
1381 "Failed to release exclusive lock for WDFDEVICE %p, %!STATUS!\n",
device,
status));
1391DeviceCleanupProtectedLocks(
1418 "CleanupProtectedLocks called for WDFDEVICE %p, WDFFILEOBJECT %p, locked %d times.\n",
1434 "FDO secured lock count = %d "
1435 "lock count = %d\n",
1436 DeviceExtension->ProtectedLockCount,
1437 DeviceExtension->LockCount));
1439 if ((DeviceExtension->ProtectedLockCount == 0) && (DeviceExtension->LockCount == 0))
1454 status = DeviceSendSrbSynchronously(DeviceExtension->Device,
1462 "Allow media removal (unlock) request to drive returned %!STATUS!\n",
1467 WdfWaitLockRelease(DeviceExtension->EjectSynchronizationLock);
1475DeviceCleanupDisableMcn(
1500 "CleanupDisableMcn called for WDFDEVICE %p, WDFFILEOBJECT %p, locked %d times.\n",
1527 ioctlCode = requestParameters->Parameters.DeviceIoControl.IoControlCode;
1529 functionCode = (ioctlCode & (~0xffffc003)) >> 2;
1538 if((functionCode >= 0x200) && (functionCode <= 0x300))
1543 "IOCTL code recalibrate, New ioctl code is %lx\n",
1547 requestParameters->Parameters.DeviceIoControl.IoControlCode = ioctlCode;
1588 WdfRequestGetParameters(
Request, &requestParameters);
1599 "Receiving IOCTL: %lx\n",
1605 "Receiving IOCTL: %lx\n",
1627 info->ANSignalPendingDueToExclusiveLock =
TRUE;
1631 "Access Denied! Device in exclusive mode.Failing Ioctl %lx\n",
1800#if (NTDDI_VERSION >= NTDDI_WIN8)
1830 UCHAR currentStackLocationFlags = 0;
1888 if ((zpoddInfo !=
NULL) &&
1891 inZeroPowerState =
TRUE;
1909 "RequestDispatchToSequentialQueue: Get drive geometryEx\n"));
1916 else if (inZeroPowerState !=
FALSE)
1933 "RequestDispatchToSequentialQueue: Get drive geometry\n"));
1940 else if (inZeroPowerState !=
FALSE)
1957 if (inZeroPowerState !=
FALSE)
1970 if (inZeroPowerState !=
FALSE)
1990 "RequestDispatchToSequentialQueue: Play audio MSF\n"));
2009 "RequestDispatchToSequentialQueue: Seek audio MSF\n"));
2028 "RequestDispatchToSequentialQueue: Pause audio\n"));
2038 "RequestDispatchToSequentialQueue: Resume audio\n"));
2056 "RequestDispatchToSequentialQueue: Get volume control\n"));
2076 "RequestDispatchToSequentialQueue: Set volume control\n"));
2095 "RequestDispatchToSequentialQueue: Stop audio\n"));
2106 "RequestDispatchToSequentialQueue: [%p] Check Verify\n",
Request));
2116 else if (inZeroPowerState !=
FALSE)
2140 "RequestDispatchToSequentialQueue: [%p] IOCTL_DVD_READ_STRUCTURE\n",
Request));
2151 "RequestDispatchToSequentialQueue: [%p] IOCTL_DVD_READ_KEY\n",
Request));
2162 "RequestDispatchToSequentialQueue: [%p] IOCTL_DVD_START_SESSION\n",
Request));
2174 "RequestDispatchToSequentialQueue: [%p] IOCTL_DVD_SEND_KEY\n",
Request));
2185 "RequestDispatchToSequentialQueue: [%p] SetReadAhead\n",
Request));
2211 ULONG requiredSize = 0;
2214 "RequestDispatchToSequentialQueue: Get drive layout\n"));
2235 ULONG requiredSize = 0;
2238 "RequestDispatchToSequentialQueue: Get drive layoutEx\n"));
2240 requiredSize =
FIELD_OFFSET(DRIVE_LAYOUT_INFORMATION_EX, PartitionEntry[1]);
2260 "RequestDispatchToSequentialQueue: Get Partition Info\n"));
2280 "RequestDispatchToSequentialQueue: Get Partition InfoEx\n"));
2300 "RequestDispatchToSequentialQueue: IOCTL_DISK_VERIFY to device %p through request %p\n",
2321 "RequestDispatchToSequentialQueue: Disk Get Length InfoEx\n"));
2329 else if (inZeroPowerState !=
FALSE)
2345 "RequestDispatchToSequentialQueue: [%p] IOCTL_CDROM_GET_CONFIGURATION\n",
Request));
2356 "RequestDispatchToSequentialQueue: [%p] IOCTL_CDROM_SET_SPEED\n",
Request));
2367 "RequestDispatchToSequentialQueue: [%p] IOCTL_DVD_END_SESSION\n",
Request));
2378 "RequestDispatchToSequentialQueue: [%p] IOCTL_AACS_END_SESSION\n",
Request));
2389 "AACS: Querying full MKB with bufferSize of %x bytes\n",
2402 "AACS: Requesting AGID\n"
2414 "AACS: Sending host certificate to drive\n"
2426 "AACS: Querying drive certificate\n"
2438 "AACS: Querying drive challenge key\n"
2450 "AACS: Sending drive challenge key\n"
2462 "AACS: Reading volume ID\n"
2474 "AACS: Reading Serial Number\n"
2486 "AACS: Reading media ID\n"
2501 "AACS: Generating new binding nonce\n"
2507 "AACS: Reading existing binding nonce\n"
2520 "RequestDispatchToSequentialQueue: [%p] IOCTL_CDROM_ENABLE_STREAMING\n",
Request));
2531 "RequestDispatchToSequentialQueue: [%p] IOCTL_CDROM_SEND_OPC_INFORMATION\n",
Request));
2542 "RequestDispatchToSequentialQueue: [%p] IOCTL_CDROM_GET_PERFORMANCE\n",
Request));
2629 else if (inZeroPowerState !=
FALSE)
2651#if (NTDDI_VERSION >= NTDDI_WIN8)
2683 UCHAR currentStackLocationFlags = 0;
2822 UCHAR currentStackLocationFlags = 0;
2892 if (WdfRequestIsFrom32BitProcess(
Request))
2948 requestCompleted =
TRUE;
2984 requestCompleted =
TRUE;
2997 requestCompleted =
TRUE;
3006 requestCompleted =
TRUE;
3049 requestCompleted =
TRUE;
3069 UCHAR currentStackLocationFlags = 0;
3193 DeviceExtension->IoTarget,
3249 WdfRequestGetParameters(
Request, &requestParameters);
3259 "Receiving WRITE, Length %Ix\n", (
ULONG)
Length));
3367 WDFREQUEST readWriteRequest =
NULL;
3378 WdfRequestGetParameters(readWriteRequest, &readWriteRequestParameters);
3385 (
VOID) DeviceUpdateMmcCapabilities(deviceExtension->
Device);
3445 WdfRequestGetParameters(
Request, &requestParameters);
3465 "DeviceEvtIoInCallerContext: Access Denied! Device in exclusive mode.Failing Ioctl %lx\n",
3535 DeviceUpdateMmcCapabilities(deviceExtension->
Device);
3544RequestProcessSerializedIoctl(
3574 WdfRequestGetParameters(
Request, &requestParameters);
3635 if (DeviceExtension->DeviceAdditionalData.Mmc.WriteAllowed &&
3812#if (NTDDI_VERSION >= NTDDI_WIN8)
3817 completeRequest =
FALSE;
3838 if (completeRequest)
3882 deviceExtension = DeviceGetExtension(
device);
3925 "RequestSynchronousProcessWithSerialQueue called at DISPATCH_LEVEL or above"));
3972 "Request %p on device object %p had a non-alert, non-success result from wait (%!HRESULT!)\n",
3985 "Sychronize Ioctl: request %p cancelled from device %p\n",
3991 "Sychronize Ioctl: request %p could not be cancelled from device %p\n",
3998 "SPURIOUS ALERT waiting for Request %p on device %p (%!STATUS!)\n",
4005 if (WdfRequestIsCanceled(
Request))
4019 WdfRequestGetParameters(
Request, &requestParameters);
4025 "Access Denied! Device in exclusive mode.Failing Ioctl %lx\n",
4032 "Ioctl %lx not blocked by cdrom being in exclusive mode\n",
4034 fCallSyncCallback =
TRUE;
4039 fCallSyncCallback =
TRUE;
4042 if (fCallSyncCallback)
4081 ULONG ioctlCode = 0;
4087 WdfRequestGetParameters(
Request, &requestParameters);
4090 if (IsBlocked ==
NULL)
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define InterlockedIncrement
VOID RequestSetupMcnSyncIrp(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension)
BOOLEAN RequestDispatchToSequentialQueue(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters)
NTSTATUS RequestSynchronizeProcessWithSerialQueue(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request)
BOOLEAN RequestDispatchUnknownRequests(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters)
NTSTATUS RequestIsIoctlBlockedByExclusiveAccess(_In_ WDFREQUEST Request, _Out_ PBOOLEAN IsBlocked)
BOOLEAN DeviceIsMmcUpdateRequired(_In_ WDFDEVICE Device)
VOID RequestProcessInternalDeviceControl(_In_ WDFREQUEST Request, _In_ PCDROM_DEVICE_EXTENSION DeviceExtension)
VOID NormalizeIoctl(_Inout_ PWDF_REQUEST_PARAMETERS requestParameters)
BOOLEAN RequestDispatchSyncWithSequentialQueue(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters)
VOID NTAPI SequentialQueueEvtIoReadWrite(_In_ WDFQUEUE Queue, _In_ WDFREQUEST Request, _In_ size_t Length)
BOOLEAN RequestDispatchProcessDirectly(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters)
BOOLEAN RequestDispatchSpecialIoctls(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters)
BOOLEAN BootEnvironmentIsWinPE(VOID)
EVT_WDF_IO_QUEUE_IO_DEFAULT CreateQueueEvtIoDefault
#define IOCTL_MCN_SYNC_FAKE_IOCTL
#define WRITE_RETRY_DELAY_DVD_1x
#define FREE_POOL(_PoolPtr)
#define CdromMmcUpdateRequired
EVT_WDFDEVICE_WDM_IRP_PREPROCESS RequestProcessSetPower
EVT_WDF_WORKITEM IoctlWorkItemRoutine
EVT_WDF_WORKITEM ReadWriteWorkItemRoutine
EVT_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP DeviceEvtSelfManagedIoCleanup
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
EVT_WDF_OBJECT_CONTEXT_CLEANUP DeviceEvtCleanup
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)
EVT_WDF_OBJECT_CONTEXT_CLEANUP RequestEvtCleanup
FORCEINLINE UCHAR RequestGetCurrentStackLocationFlags(_In_ WDFREQUEST Request)
EVT_WDF_DEVICE_SELF_MANAGED_IO_INIT DeviceEvtSelfManagedIoInit
#define EXCLUSIVE_OWNER(_CdData, _FileObject)
EVT_WDF_DRIVER_DEVICE_ADD DriverEvtDeviceAdd
EVT_WDF_REQUEST_COMPLETION_ROUTINE RequestDummyCompletionRoutine
#define SCSI_CDROM_TIMEOUT
VOID RequestCompletion(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ NTSTATUS Status, _In_ ULONG_PTR Information)
EVT_WDF_IO_IN_CALLER_CONTEXT DeviceEvtIoInCallerContext
EVT_WDF_DEVICE_SURPRISE_REMOVAL DeviceEvtSurpriseRemoval
NTSTATUS DeviceZPODDGetPowerupReason(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _Out_ PSTORAGE_IDLE_POWERUP_REASON PowerupReason)
EVT_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE SequentialQueueEvtCanceledOnQueue
#define TEST_FLAG(Flags, Bit)
#define EXCLUSIVE_MODE(_CdData)
EVT_WDF_OBJECT_CONTEXT_CLEANUP DriverEvtCleanup
VOID RequestSetReceivedTime(_In_ WDFREQUEST Request)
#define CDROM_SPECIAL_DISABLE_SPIN_DOWN
struct _CDROM_DEVICE_EXTENSION CDROM_DEVICE_EXTENSION
#define SET_FLAG(Flags, Bit)
#define CDROM_TAG_STRINGS
VOID DeviceSendIoctlAsynchronously(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ ULONG IoControlCode, _In_ PDEVICE_OBJECT TargetDeviceObject)
#define CDROM_FLAG_WINPE_MODE
EVT_WDFDEVICE_WDM_IRP_PREPROCESS RequestProcessShutdownFlush
EVT_WDF_DEVICE_D0_EXIT DeviceEvtD0Exit
#define WINPE_REG_KEY_NAME
#define CDROM_VOLUME_VERIFY_CHECKED
#define BECOMING_READY_RETRY_COUNT
#define SCSIOP_MEDIUM_REMOVAL
#define IOCTL_DVD_SEND_KEY
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
#define IOCTL_DVD_END_SESSION
#define IOCTL_STORAGE_SET_READ_AHEAD
#define IOCTL_DVD_SEND_KEY2
#define IOCTL_DVD_GET_REGION
#define IOCTL_DISK_VERIFY
#define IOCTL_DVD_READ_KEY
#define IOCTL_DVD_START_SESSION
#define IOCTL_DISK_IS_WRITABLE
#define IOCTL_DVD_READ_STRUCTURE
#define IOCTL_STORAGE_GET_MEDIA_TYPES_EX
#define STATUS_NOT_SUPPORTED
static PDB_INFORMATION information
#define DEVPROP_TYPE_EMPTY
#define NT_SUCCESS(StatCode)
DRIVER_INITIALIZE DriverEntry
#define IOCTL_VOLUME_POST_ONLINE
#define WPP_INIT_TRACING(a, b)
NTSTATUS RequestHandleGetHotPlugInfo(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateReadToc(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestHandleGetMediaTypeEx(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _Out_ size_t *DataLength)
NTSTATUS RequestHandleMountQuerySuggestedLinkName(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestHandleQueryPropertyWriteCache(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request)
NTSTATUS RequestValidateAacsGetChallengeKey(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestHandleGetInquiryData(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateSetSpeed(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestHandleSetHotPlugInfo(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateRawRead(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateSendOpcInformation(_In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestHandleGetDeviceNumber(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateAacsReadMediaKeyBlock(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateAacsReadVolumeId(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateGetPerformance(_In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateReadWrite(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters)
NTSTATUS RequestHandleMountQueryUniqueId(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestHandleQueryPropertyDeviceUniqueId(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request)
NTSTATUS RequestValidateAacsStartSession(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateDvdStartSession(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateAacsReadMediaId(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateGetLastSession(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateReadQChannel(_In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestHandleMountQueryDeviceName(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateGetConfiguration(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateReadTocEx(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateAacsSendCertificate(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateAacsSendChallengeKey(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateDvdEndSession(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateDvdReadStructure(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidatePersistentReserve(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateAacsEndSession(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateAacsGetCertificate(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateDvdSendKey(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestHandleQueryPropertyRetrieveCachedData(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestHandleReadWrite(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters)
NTSTATUS RequestValidateExclusiveAccess(_In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateDvdReadKey(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateAacsReadSerialNumber(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateAacsBindingNonce(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
NTSTATUS RequestValidateEnableStreaming(_In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
_In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_PARAMETERS RequestParameters
NTSTATUS RequestHandleUnknownIoctl(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request)
#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER
#define _IRQL_requires_max_(irql)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define PsGetCurrentThread()
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeSetEvent(pEvt, foo, foo2)
#define KeGetCurrentIrql()
LONG NTAPI KeReadStateEvent(IN PKEVENT Event)
#define IOCTL_DISK_GET_DRIVE_GEOMETRY_EX
#define IOCTL_DISK_GET_PARTITION_INFO_EX
#define IOCTL_DISK_GET_DRIVE_LAYOUT_EX
#define IOCTL_STORAGE_CHECK_VERIFY2
#define IOCTL_STORAGE_LOAD_MEDIA2
PCONFIGURATION_INFORMATION NTAPI IoGetConfigurationInformation(VOID)
Returns a pointer to the I/O manager's global configuration information structure.
#define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME
struct _GET_LENGTH_INFORMATION GET_LENGTH_INFORMATION
#define IOCTL_MOUNTDEV_QUERY_SUGGESTED_LINK_NAME
struct _PARTITION_INFORMATION_EX PARTITION_INFORMATION_EX
#define IOCTL_DISK_GET_LENGTH_INFO
#define IOCTL_MOUNTDEV_QUERY_UNIQUE_ID
#define IOCTL_STORAGE_GET_HOTPLUG_INFO
struct @1677::@1678 driver
#define CTL_CODE(DeviceType, Function, Method, Access)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define FILE_REMOVABLE_MEDIA
#define UNREFERENCED_PARAMETER(P)
#define IOCTL_CDROM_ENABLE_STREAMING
struct _VOLUME_CONTROL VOLUME_CONTROL
#define IOCTL_CDROM_GET_LAST_SESSION
#define IOCTL_CDROM_GET_DRIVE_GEOMETRY_EX
#define IOCTL_CDROM_SEEK_AUDIO_MSF
#define IOCTL_CDROM_READ_TOC_EX
@ ExclusiveAccessQueryState
@ ExclusiveAccessLockDevice
@ ExclusiveAccessUnlockDevice
#define IOCTL_CDROM_GET_VOLUME
#define IOCTL_CDROM_PAUSE_AUDIO
#define IOCTL_CDROM_SET_VOLUME
#define IOCTL_CDROM_STOP_AUDIO
#define IOCTL_CDROM_READ_Q_CHANNEL
#define IOCTL_CDROM_GET_DRIVE_GEOMETRY
#define IOCTL_CDROM_SET_SPEED
#define IOCTL_CDROM_GET_INQUIRY_DATA
#define IOCTL_CDROM_GET_CONFIGURATION
#define IOCTL_CDROM_PLAY_AUDIO_MSF
#define IOCTL_CDROM_EXCLUSIVE_ACCESS
#define IOCTL_CDROM_RESUME_AUDIO
#define IOCTL_CDROM_SEND_OPC_INFORMATION
#define IOCTL_CDROM_READ_TOC
#define IOCTL_CDROM_RAW_READ
#define IOCTL_CDROM_GET_PERFORMANCE
struct _DISK_GEOMETRY DISK_GEOMETRY
#define IOCTL_DISK_GET_DRIVE_LAYOUT
#define IOCTL_DISK_ARE_VOLUMES_READY
struct _PARTITION_INFORMATION PARTITION_INFORMATION
#define IOCTL_DISK_GET_PARTITION_INFO
@ FeatureDefectManagement
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define IOCTL_STORAGE_QUERY_PROPERTY
#define IOCTL_STORAGE_RELEASE
#define IOCTL_STORAGE_EVENT_NOTIFICATION
#define IOCTL_STORAGE_SET_HOTPLUG_INFO
#define IOCTL_STORAGE_GET_DEVICE_NUMBER
#define IOCTL_STORAGE_CHECK_VERIFY
#define IOCTL_STORAGE_READ_CAPACITY
@ StoragePowerupDeviceAttention
#define IOCTL_STORAGE_PERSISTENT_RESERVE_IN
#define IOCTL_STORAGE_PERSISTENT_RESERVE_OUT
#define IOCTL_STORAGE_LOAD_MEDIA
#define IOCTL_STORAGE_RESERVE
@ StorageDeviceUniqueIdProperty
@ StorageDeviceWriteCacheProperty
#define IOCTL_STORAGE_FIND_NEW_DEVICES
#define IOCTL_STORAGE_BASE
#define IOCTL_STORAGE_MCN_CONTROL
#define IOCTL_STORAGE_CHECK_PRIORITY_HINT_SUPPORT
#define IOCTL_STORAGE_EJECT_MEDIA
#define IOCTL_STORAGE_EJECTION_CONTROL
#define IOCTL_STORAGE_MEDIA_REMOVAL
#define IOCTL_VOLUME_ONLINE
BOOLEAN NTAPI IoCancelIrp(IN PIRP Irp)
NTSTATUS NTAPI IoDeleteSymbolicLink(IN PUNICODE_STRING SymbolicLinkName)
BOOLEAN NTAPI PsIsThreadTerminating(IN PETHREAD Thread)
#define STATUS_INTERNAL_ERROR
#define STATUS_INVALID_LEVEL
_Null_terminated_ wchar_t * NTSTRSAFE_PWSTR
NTSTRSAFEVAPI RtlStringCchPrintfW(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
VOID NTAPI IoInvalidateDeviceRelations(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_RELATION_TYPE Type)
#define IOCTL_AACS_READ_MEDIA_KEY_BLOCK
#define IOCTL_AACS_READ_MEDIA_KEY_BLOCK_SIZE
#define IOCTL_AACS_START_SESSION
#define IOCTL_AACS_READ_BINDING_NONCE
#define IOCTL_AACS_SEND_CHALLENGE_KEY
#define IOCTL_AACS_READ_VOLUME_ID
#define IOCTL_AACS_END_SESSION
#define IOCTL_AACS_GET_CHALLENGE_KEY
#define IOCTL_AACS_SEND_CERTIFICATE
#define IOCTL_AACS_GENERATE_BINDING_NONCE
#define IOCTL_AACS_GET_CERTIFICATE
#define IOCTL_AACS_READ_SERIAL_NUMBER
#define IOCTL_AACS_READ_MEDIA_ID
#define FILE_DEVICE_CD_ROM
#define DEVICE_TYPE_FROM_CTL_CODE(c)
#define IOCTL_SCSI_PASS_THROUGH
#define IOCTL_SCSI_GET_ADDRESS
#define IOCTL_SCSI_PASS_THROUGH_DIRECT
#define LOADING_MECHANISM_TRAY
#define IOCTL_SCSI_PASS_THROUGH_DIRECT_EX
#define IOCTL_SCSI_PASS_THROUGH_EX
#define STATUS_BUFFER_TOO_SMALL
#define TRACE_LEVEL_WARNING
#define TRACE_LEVEL_VERBOSE
#define TRACE_LEVEL_FATAL
#define TRACE_LEVEL_ERROR
#define TRACE_LEVEL_INFORMATION
UNICODE_STRING WellKnownName
LONGLONG ReadWriteRetryDelay100nsUnits
ULONG CachedInquiryDataByteCount
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
PCDROM_PRIVATE_FDO_DATA PrivateFdoData
WDFWORKITEM ReadWriteWorkItem
LARGE_INTEGER StartingOffset
PSTORAGE_DEVICE_DESCRIPTOR DeviceDescriptor
UNICODE_STRING DeviceName
CDROM_POWER_CONTEXT PowerContext
CDROM_IOCTL_CONTEXT IoctlWorkItemContext
LARGE_INTEGER PartitionLength
DISK_GEOMETRY DiskGeometry
WDFWAITLOCK ShutdownFlushWaitLock
BOOLEAN PowerDownInProgress
BOOLEAN IsVolumeOnlinePending
PMEDIA_CHANGE_DETECTION_INFO MediaChangeDetectionInfo
PCDROM_DRIVER_EXTENSION DriverExtension
CDROM_DATA DeviceAdditionalData
PDEVICE_POWER_DESCRIPTOR PowerDescriptor
PDRIVER_OBJECT DriverObject
EXCLUSIVE_ACCESS_REQUEST_TYPE RequestType
WDFREQUEST OriginalRequest
CDROM_POWER_OPTIONS Options
union _CDROM_POWER_CONTEXT::@1058 PowerChangeState
CDROM_POWER_DOWN_STATE PowerDown
WDFREQUEST OriginalRequest
PCDROM_DEVICE_EXTENSION DeviceExtension
PSYNC_HANDLER SyncCallback
ULONG AlignmentRequirement
BOOLEAN EnforceStreamingRead
BOOLEAN EnforceStreamingWrite
union _IO_STACK_LOCATION::@1579 Parameters
struct _IO_STACK_LOCATION::@3978::@4000 Scsi
STORAGE_POWERUP_REASON_TYPE PowerupReason
STORAGE_QUERY_TYPE QueryType
STORAGE_PROPERTY_ID PropertyId
WDF_TRI_STATE AutoForwardCleanupClose
WDF_FILEOBJECT_CLASS FileObjectClass
PFN_WDF_IO_QUEUE_IO_DEFAULT EvtIoDefault
PFN_WDF_IO_QUEUE_IO_DEVICE_CONTROL EvtIoDeviceControl
WDF_TRI_STATE PowerManaged
PFN_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE EvtIoCanceledOnQueue
PFN_WDF_IO_QUEUE_IO_READ EvtIoRead
PFN_WDF_IO_QUEUE_IO_WRITE EvtIoWrite
PFN_WDF_OBJECT_CONTEXT_CLEANUP EvtCleanupCallback
WDF_EXECUTION_LEVEL ExecutionLevel
WDF_SYNCHRONIZATION_SCOPE S