40#define FirstDriveLetter 'C'
41#define LastDriveLetter 'Z'
56GetConfigurationDataConversionTypeAllToTypeOne(
64GetConfigurationDataSynthesize(
68 _In_ size_t OutputBufferSize,
76RequestGetScsiPassThroughCdb(
82#pragma alloc_text(PAGE, DeviceIsPlayActive)
83#pragma alloc_text(PAGE, RequestHandleGetDvdRegion)
84#pragma alloc_text(PAGE, RequestHandleReadTOC)
85#pragma alloc_text(PAGE, RequestHandleReadTocEx)
86#pragma alloc_text(PAGE, RequestHandleGetConfiguration)
87#pragma alloc_text(PAGE, RequestHandleGetDriveGeometry)
88#pragma alloc_text(PAGE, RequestHandleDiskVerify)
89#pragma alloc_text(PAGE, RequestHandleCheckVerify)
90#pragma alloc_text(PAGE, RequestHandleFakePartitionInfo)
91#pragma alloc_text(PAGE, RequestHandleEjectionControl)
92#pragma alloc_text(PAGE, RequestHandleEnableStreaming)
93#pragma alloc_text(PAGE, RequestHandleSendOpcInformation)
94#pragma alloc_text(PAGE, RequestHandleGetPerformance)
95#pragma alloc_text(PAGE, RequestHandleMcnSyncFakeIoctl)
96#pragma alloc_text(PAGE, RequestHandleLoadEjectMedia)
97#pragma alloc_text(PAGE, RequestHandleReserveRelease)
98#pragma alloc_text(PAGE, RequestHandlePersistentReserve)
99#pragma alloc_text(PAGE, DeviceHandleRawRead)
100#pragma alloc_text(PAGE, DeviceHandlePlayAudioMsf)
101#pragma alloc_text(PAGE, DeviceHandleReadQChannel)
102#pragma alloc_text(PAGE, ReadQChannel)
103#pragma alloc_text(PAGE, DeviceHandlePauseAudio)
104#pragma alloc_text(PAGE, DeviceHandleResumeAudio)
105#pragma alloc_text(PAGE, DeviceHandleSeekAudioMsf)
106#pragma alloc_text(PAGE, DeviceHandleStopAudio)
107#pragma alloc_text(PAGE, DeviceHandleGetSetVolume)
108#pragma alloc_text(PAGE, DeviceHandleReadDvdStructure)
109#pragma alloc_text(PAGE, ReadDvdStructure)
110#pragma alloc_text(PAGE, DeviceHandleDvdEndSession)
111#pragma alloc_text(PAGE, DeviceHandleDvdStartSessionReadKey)
112#pragma alloc_text(PAGE, DvdStartSessionReadKey)
113#pragma alloc_text(PAGE, DeviceHandleDvdSendKey)
114#pragma alloc_text(PAGE, DvdSendKey)
115#pragma alloc_text(PAGE, DeviceHandleSetReadAhead)
116#pragma alloc_text(PAGE, DeviceHandleSetSpeed)
117#pragma alloc_text(PAGE, RequestHandleExclusiveAccessQueryLockState)
118#pragma alloc_text(PAGE, RequestHandleExclusiveAccessLockDevice)
119#pragma alloc_text(PAGE, RequestHandleExclusiveAccessUnlockDevice)
120#pragma alloc_text(PAGE, RequestHandleScsiPassThrough)
121#pragma alloc_text(PAGE, RequestGetScsiPassThroughCdb)
122#pragma alloc_text(PAGE, GetConfigurationDataConversionTypeAllToTypeOne)
123#pragma alloc_text(PAGE, GetConfigurationDataSynthesize)
154 ULONG sendOptionsFlags = 0;
157 WdfRequestFormatRequestUsingCurrentType(
Request);
215 size_t bytesRead = 0;
230 if (currentBuffer ==
NULL)
240 status = ReadQChannel(deviceExtension,
295 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
316 (outputBuffer !=
NULL))
320 cdData->CachedInquiryData,
360 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
364 ULONG sizeNeeded = 0;
390 (mediaTypes !=
NULL))
433 ((zpoddInfo ==
NULL) ||
446 status = DeviceSendSrbSynchronously(DeviceExtension->Device,
472 "RequestHandleGetMediaTypeEx: GET_MEDIA_TYPES status of TUR - %lx\n",
status));
487RequestHandleGetDvdRegion(
513 size_t bytesReturned = 0;
526 "RequestHandleGetDvdRegion: [%p] IOCTL_DVD_GET_REGION\n",
Request));
531 if (DeviceExtension->DeviceAdditionalData.DriveDeviceType !=
FILE_DEVICE_DVD)
549 keyLength =
max(keyLength,
559 if (readStructure ==
NULL)
571 status = ReadDvdStructure(DeviceExtension,
588 dvdRegion = outputBuffer;
600 status = DvdStartSessionReadKey(DeviceExtension,
635 "RequestHandleGetDvdRegion => rpcKey->RpcScheme != 1\n"));
641 if (readStructure !=
NULL)
676 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
706 if (inputBuffer !=
NULL)
752 "RequestValidateRawRead: Invalid TrackMode type %x for XA read\n",
758 endOffset += startingOffset.
QuadPart;
764 "RequestValidateRawRead: Invalid I/O parameters for XA "
765 "Read (zero sectors requested)\n"));
771 "RequestValidateRawRead: Invalid I/O parameters for XA "
772 "Read (TransferBytes Overflow)\n"));
778 "RequestValidateRawRead: Invalid I/O parameters for XA "
779 "Read (EndingOffset Overflow)\n"));
785 "RequestValidateRawRead: Invalid I/O parameters for XA "
786 "Read (Bad buffer size)\n"));
789 else if (endOffset > (
ULONGLONG)DeviceExtension->PartitionLength.QuadPart)
792 "RequestValidateRawRead: Invalid I/O parameters for XA "
793 "Read (Request Out of Bounds)\n"));
806 if (mdlBytes < transferBytes)
809 "RequestValidateRawRead: Invalid MDL %s, Irp %p\n",
821 DeviceExtension->AdapterDescriptor->AlignmentMask )
824 "RequestValidateRawRead: Invalid I/O parameters for "
825 "XA Read (Buffer %p not aligned with mask %x\n",
827 DeviceExtension->AdapterDescriptor->AlignmentMask));
842 bufferIsPageAligned =
TRUE;
845 if (bufferIsPageAligned)
857 "RequestValidateRawRead: The XA Read (type %x) would require %I64x bytes, "
858 "but the adapter can only handle %x bytes (for a%saligned buffer)\n",
862 (bufferIsPageAligned ?
" " :
"n un")
935 DeviceExtension->AdapterDescriptor->AlignmentMask)
1020 DeviceExtension->AdapterDescriptor->AlignmentMask)
1063 DeviceExtension->AdapterDescriptor->AlignmentMask)
1097 ULONG transferByteCount = 0;
1184 "RequestValidateDvdReadStructure - input buffer "
1185 "length too small (was %d should be %d)\n",
1195 "RequestValidateDvdReadStructure - output buffer "
1196 "cannot hold header information\n"));
1205 "RequestValidateDvdReadStructure - output buffer "
1210 DeviceExtension->AdapterDescriptor->AlignmentMask)
1214 else if (DeviceExtension->DeviceAdditionalData.DriveDeviceType !=
FILE_DEVICE_DVD)
1258 "RequestValidateDvdStartSession: DVD_START_SESSION - output "
1259 "buffer too small\n"));
1263 else if (DeviceExtension->DeviceAdditionalData.DriveDeviceType !=
FILE_DEVICE_DVD)
1321 "RequestValidateDvdSendKey: [%p] IOCTL_DVD_SEND_KEY - "
1322 "key is too small or does not match KeyLength\n",
1353 else if (DeviceExtension->DeviceAdditionalData.DriveDeviceType !=
FILE_DEVICE_DVD)
1405 DeviceExtension->AdapterDescriptor->AlignmentMask)
1414#if BUILD_WOW64_ENABLED && defined(_WIN64)
1416 if (WdfRequestIsFrom32BitProcess(
Request))
1418 PGET_CONFIGURATION_IOCTL_INPUT32 inputBuffer =
NULL;
1421 sizeof(GET_CONFIGURATION_IOCTL_INPUT32))
1439 if (inputBuffer->Feature > 0xffff)
1449 else if (inputBuffer->Reserved[0] || inputBuffer->Reserved[1])
1479 if (inputBuffer->
Feature > 0xffff)
1527 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
1529 ULONG requiredLength = 0;
1610 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
1641 if (*layerNumber > 255)
1675 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
1723 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
1783 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
1852 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
1921 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
1981 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
2050 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
2119 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
2189 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
2226 else if (inputBuffer->NumberOfSectors > 255)
2270 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_IOCTL,
"RequestValidateExclusiveAccess: IOCTL must be called at passive level.\n"));
2276 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_IOCTL,
"RequestValidateExclusiveAccess: Input buffer too small\n"));
2300 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_IOCTL,
"RequestValidateExclusiveAccess: Output buffer too small\n"));
2315 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_IOCTL,
"RequestValidateExclusiveAccess: Input buffer too small\n"));
2333 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_IOCTL,
"RequestValidateExclusiveAccess: Invalid request type\n"));
2344RequestHandleExclusiveAccessQueryLockState(
2376 &exclusiveLockState,
2405RequestHandleExclusiveAccessLockDevice(
2434 WDFFILEOBJECT fileObject =
NULL;
2436 ULONG nameLength = 0;
2440 fileObject = WdfRequestGetFileObject(
Request);
2442 if (fileObject ==
NULL)
2447 "RequestHandleExclusiveAccessLockDevice: FileObject is NULL, cannot grant exclusive access\n"));
2466 "RequestHandleExclusiveAccessLockDevice: Invalid characters in caller name\n"));
2480 "RequestHandleExclusiveAccessLockDevice: Not a valid null terminated string.\n"));
2499 "RequestHandleExclusiveAccessLockDevice: Unable to lock device, file system mounted\n"));
2510 "RequestHandleExclusiveAccessLockDevice: Entering exclusive mode! Device locked by file object %p\n", fileObject));
2520 &GUID_IO_CDROM_EXCLUSIVE_LOCK,
2529 if (logEntry !=
NULL)
2554 "RequestHandleExclusiveAccessLockDevice: Unable to lock device, device already locked.\n"));
2567RequestHandleExclusiveAccessUnlockDevice(
2591 WDFFILEOBJECT fileObject =
NULL;
2595 fileObject = WdfRequestGetFileObject(
Request);
2597 if (fileObject ==
NULL)
2603 "RequestHandleExclusiveAccessUnlockDevice: FileObject is NULL, cannot release exclusive access\n"));
2616 status = DeviceUnlockExclusive(deviceExtension, fileObject,
2619 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_IOCTL,
"RequestHandleExclusiveAccessUnlockDevice: Device unlocked\n"));
2678 *
DataLength = DeviceExtension->DeviceDescriptor->Size;
2684 CHAR* localDescriptorBuffer = (
CHAR*)DeviceExtension->DeviceDescriptor;
2695 DeviceExtension->DeviceDescriptor->Size);
2698 DeviceExtension->DeviceDescriptor,
2703 (DeviceExtension->DeviceDescriptor->VendorIdOffset != 0) &&
2704 (DeviceExtension->DeviceDescriptor->VendorIdOffset != 0xFFFFFFFF))
2708 (DeviceExtension->DeviceDescriptor->VendorIdOffset +
strlen(localDescriptorBuffer + DeviceExtension->DeviceDescriptor->VendorIdOffset)))
2710 outputDescriptor->VendorIdOffset = 0;
2715 (DeviceExtension->DeviceDescriptor->ProductIdOffset != 0) &&
2716 (DeviceExtension->DeviceDescriptor->ProductIdOffset != 0xFFFFFFFF))
2720 (DeviceExtension->DeviceDescriptor->ProductIdOffset +
strlen(localDescriptorBuffer + DeviceExtension->DeviceDescriptor->ProductIdOffset)))
2722 outputDescriptor->ProductIdOffset = 0;
2727 (DeviceExtension->DeviceDescriptor->ProductRevisionOffset != 0) &&
2728 (DeviceExtension->DeviceDescriptor->ProductRevisionOffset != 0xFFFFFFFF))
2732 (DeviceExtension->DeviceDescriptor->ProductRevisionOffset +
strlen(localDescriptorBuffer + DeviceExtension->DeviceDescriptor->ProductRevisionOffset)))
2734 outputDescriptor->ProductRevisionOffset = 0;
2739 (DeviceExtension->DeviceDescriptor->SerialNumberOffset != 0) &&
2740 (DeviceExtension->DeviceDescriptor->SerialNumberOffset != 0xFFFFFFFF))
2744 (DeviceExtension->DeviceDescriptor->SerialNumberOffset +
strlen(localDescriptorBuffer + DeviceExtension->DeviceDescriptor->SerialNumberOffset)))
2748 outputDescriptor->SerialNumberOffset = 0;
2767 *
DataLength = DeviceExtension->AdapterDescriptor->Size;
2782 DeviceExtension->AdapterDescriptor->Size);
2785 DeviceExtension->AdapterDescriptor,
2826 size_t outLength = 0;
2831 WdfRequestGetParameters(
Request, &requestParameters);
3008 WdfRequestGetParameters(
Request, &requestParameters);
3090 writeCache->NVCacheEnabled =
FALSE;
3117 writeCache->FlushCacheSupported =
TRUE;
3123 "RequestHandleQueryPropertyWriteCache: Synchronize cache failed with status 0x%X\n",
status));
3124 writeCache->FlushCacheSupported =
FALSE;
3134 if (modeData ==
NULL)
3137 "RequestHandleQueryPropertyWriteCache: Unable to allocate mode data buffer\n"));
3146 length = DeviceRetrieveModeSenseUsingScratch(deviceExtension,
3155 length = DeviceRetrieveModeSenseUsingScratch(deviceExtension,
3163 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_IOCTL,
"RequestHandleQueryPropertyWriteCache: Mode Sense failed\n"));
3179 pageData = ModeSenseFindSpecificPage((
PCHAR)modeData,
3185 if (pageData ==
NULL)
3187 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_IOCTL,
"RequestHandleQueryPropertyWriteCache: Unable to find caching mode page.\n"));
3217 length = DeviceRetrieveModeSenseUsingScratch(deviceExtension,
3226 length = DeviceRetrieveModeSenseUsingScratch(deviceExtension,
3234 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_IOCTL,
"RequestHandleQueryPropertyWriteCache: Mode Sense failed\n"));
3254 pageData = ModeSenseFindSpecificPage((
PCHAR)modeData,
3259 if (pageData ==
NULL)
3261 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_IOCTL,
"RequestHandleQueryPropertyWriteCache: Unable to find caching mode page.\n"));
3313 ULONG keyLength = 0;
3327 "DvdDeviceControl: EstablishDriveKey - challenge "
3328 "key buffer too small\n"));
3335 switch(keyParameters->
KeyType)
3386 "DvdDeviceControl: EstablishDriveKey - output "
3387 "buffer too small\n"));
3392 DeviceExtension->AdapterDescriptor->AlignmentMask)
3396 else if (DeviceExtension->DeviceAdditionalData.DriveDeviceType !=
FILE_DEVICE_DVD)
3451 "DvdDeviceControl: EndSession - input buffer too "
3489 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
3676 (
PVOID*)&writeSpeedRequest,
3695 &performanceRequest,
3753RequestGetScsiPassThroughCdb(
3774 ULONG inputBufferLength = 0;
3784 (
Irp->AssociatedIrp.SystemBuffer !=
NULL))
3787 inputBuffer =
Irp->AssociatedIrp.SystemBuffer;
3788 legacyPassThrough =
TRUE;
3793 legacyPassThrough =
FALSE;
3801#if BUILD_WOW64_ENABLED && defined(_WIN64)
3803 if (IoIs32bitProcess(
Irp))
3805 if (legacyPassThrough)
3807 if (inputBufferLength >=
sizeof(SCSI_PASS_THROUGH32))
3809 cdb = (
PCDB)((PSCSI_PASS_THROUGH32)inputBuffer)->
Cdb;
3814 if (inputBufferLength >=
sizeof(SCSI_PASS_THROUGH32_EX))
3816 cdb = (
PCDB)((PSCSI_PASS_THROUGH32_EX)inputBuffer)->
Cdb;
3826 if (legacyPassThrough)
3848RequestHandleScsiPassThrough(
3892 if ((zpoddInfo !=
NULL) &&
3894 (zpoddInfo->
Load == 0))
3896 cdb = RequestGetScsiPassThroughCdb(
irp);
3898 if ((cdb !=
NULL) &&
3907 WdfRequestFormatRequestUsingCurrentType(
Request);
3925 (isSoftEject !=
FALSE))
3928 "RequestHandleScsiPassThrough: soft eject detected, device marked as active\n"));
3930 DeviceMarkActive(deviceExtension,
TRUE,
FALSE);
3969 if (!DeviceExtension->MountedDeviceInterfaceName.Buffer)
3991 uniqueId->
UniqueIdLength = DeviceExtension->MountedDeviceInterfaceName.Length;
3994 (
sizeof(
USHORT) + DeviceExtension->MountedDeviceInterfaceName.Length))
4004 DeviceExtension->MountedDeviceInterfaceName.Buffer,
4045 NT_ASSERT(DeviceExtension->DeviceName.Buffer);
4064 name->NameLength = DeviceExtension->DeviceName.Length;
4067 (
sizeof(
USHORT) + DeviceExtension->DeviceName.Length))
4077 DeviceExtension->DeviceName.Buffer,
4117 WCHAR driveLetterNameBuffer[10] = {0};
4134 DeviceExtension->DeviceName.Length +
sizeof(
WCHAR),
4136 if (valueName ==
NULL)
4145 DeviceExtension->DeviceName.Buffer,
4146 DeviceExtension->DeviceName.Length);
4147 valueName[DeviceExtension->DeviceName.Length/
sizeof(
WCHAR)] = 0;
4149 driveLetterName.
Buffer = driveLetterNameBuffer;
4150 driveLetterName.
MaximumLength =
sizeof(driveLetterNameBuffer);
4151 driveLetterName.
Length = 0;
4154 queryTable[0].
Name = valueName;
4159 L"\\Registry\\Machine\\System\\DISK",
4165 if ((driveLetterName.
Length == 4) &&
4166 (driveLetterName.
Buffer[0] ==
'%') &&
4167 (driveLetterName.
Buffer[1] ==
':'))
4169 driveLetterName.
Buffer[0] = 0xFF;
4171 else if ((driveLetterName.
Length != 4) ||
4174 (driveLetterName.
Buffer[1] !=
':'))
4206 L"\\Registry\\Machine\\System\\DISK",
4210 suggestedName->
Name[12] = driveLetterName.
Buffer[0];
4211 suggestedName->
Name[13] =
':';
4221RequestHandleReadTOC(
4254 if (DeviceIsPlayActive(DeviceExtension->Device))
4270 size_t transferSize;
4293 cdb.
READ_TOC.AllocationLength[0] = (
UCHAR)(transferSize >> 8);
4294 cdb.
READ_TOC.AllocationLength[1] = (
UCHAR)(transferSize & 0xFF);
4300 *
DataLength = DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength;
4302 DeviceExtension->ScratchContext.ScratchBuffer,
4314RequestHandleReadTocEx(
4347 if (DeviceIsPlayActive(DeviceExtension->Device))
4371 size_t transferSize;
4383 cdb.
READ_TOC.AllocationLength[0] = (
UCHAR)(transferSize >> 8);
4384 cdb.
READ_TOC.AllocationLength[1] = (
UCHAR)(transferSize & 0xFF);
4397 *
DataLength = DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength;
4399 DeviceExtension->ScratchContext.ScratchBuffer,
4413GetConfigurationDataConversionTypeAllToTypeOne(
4443 ULONG totalLength = 0;
4444 ULONG featureLength = 0;
4445 ULONG headerLength = 0;
4478 if (thisFeature == RequestedFeature)
4488 headerLength = totalLength -
4500GetConfigurationDataSynthesize(
4504 _In_ size_t OutputBufferSize,
4534 ULONG validLength = 0;
4535 ULONG featureLength = 0;
4536 ULONG headerLength = 0;
4538 ULONG bytesRemaining = 0;
4541 size_t copyLength = 0;
4542 size_t transferedLength = 0;
4543 size_t requiredLength = 0;
4565 validLength =
min(validLength, InputBufferSize);
4574 transferedLength = copyLength;
4622 if (shouldCopy !=
FALSE)
4624 copyLength =
min(featureLength, bytesRemaining);
4625 copyLength =
min(copyLength, OutputBufferSize - transferedLength);
4631 transferedLength += copyLength;
4632 requiredLength += featureLength;
4635 buffer +=
min(featureLength, bytesRemaining);
4636 bytesRemaining -=
min(featureLength, bytesRemaining);
4657RequestHandleGetConfiguration(
4683 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
4686 size_t transferByteCount = 0;
4719 if ((zpoddInfo !=
NULL) &&
4722 inZeroPowerState =
TRUE;
4725 if ((inZeroPowerState ==
FALSE) ||
4741 transferByteCount =
max(transferByteCount,
4765 "DeviceHandleGetConfiguration: Changing TYPE_ONE Get Config to TYPE_ALL\n"));
4781 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_IOCTL,
"DeviceHandleGetConfiguration: No get config header!\n"));
4793 GetConfigurationDataConversionTypeAllToTypeOne(inputBuffer->
Feature, DeviceExtension->ScratchContext.ScratchSrb,
DataLength);
4799 *
DataLength = DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength;
4806 DeviceExtension->ScratchContext.ScratchBuffer,
4833RequestHandleGetDriveGeometry(
4879 status = MediaReadCapacity(DeviceExtension->Device);
4890 lengthInfo->
Length = DeviceExtension->PartitionLength;
4899 *geometry = DeviceExtension->DiskGeometry;
4908 geometryEx->
DiskSize = DeviceExtension->PartitionLength;
4909 geometryEx->
Geometry = DeviceExtension->DiskGeometry;
4920 readCapacity->BlockLength = DeviceExtension->DiskGeometry.BytesPerSector;
4921 if (readCapacity->BlockLength > 0)
4923 readCapacity->NumberOfBlocks.QuadPart = DeviceExtension->PartitionLength.QuadPart/readCapacity->BlockLength;
4927 readCapacity->NumberOfBlocks.QuadPart = 0;
4930 readCapacity->DiskLength = DeviceExtension->PartitionLength;
4948RequestHandleDiskVerify(
4974 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
5000 byteOffset.
QuadPart = DeviceExtension->StartingOffset.QuadPart +
5004 if (((DeviceExtension->StartingOffset.QuadPart + verifyInfo->
StartingOffset.
QuadPart) < DeviceExtension->StartingOffset.QuadPart) ||
5012 ULONG transferSize = 0;
5013 ULONG timeoutValue = 0;
5021 sectorOffset = (
ULONG)(byteOffset.
QuadPart >> DeviceExtension->SectorShift);
5049 status = ScratchBuffer_ExecuteCdbEx(DeviceExtension,
Request, transferSize,
FALSE, &cdb, 10, timeoutValue);
5062RequestHandleCheckVerify(
5096 ULONG transferSize = 0;
5118 if (outputBuffer !=
NULL)
5120 *outputBuffer = DeviceExtension->MediaChangeCount;
5140RequestHandleFakePartitionInfo(
5217 NT_ASSERT(!
"Invalid ioctl should not have reached this point\n");
5228 layout->PartitionCount = 1;
5235 PDRIVE_LAYOUT_INFORMATION_EX layoutEx;
5236 layoutEx = (PDRIVE_LAYOUT_INFORMATION_EX)outputBuffer;
5238 layoutEx->PartitionCount = 1;
5239 layoutEx->Mbr.Signature = 1;
5240 outputBuffer = (
PVOID)(layoutEx->PartitionEntry);
5319 deviceNumber->
DeviceType = DeviceExtension->DeviceObject->DeviceType;
5320 deviceNumber->
DeviceNumber = DeviceExtension->DeviceNumber;
5376 *
info = DeviceExtension->PrivateFdoData->HotplugInfo;
5439 if (
info->Size != DeviceExtension->PrivateFdoData->HotplugInfo.Size)
5444 if (
info->MediaRemovable != DeviceExtension->PrivateFdoData->HotplugInfo.MediaRemovable)
5449 if (
info->MediaHotplug != DeviceExtension->PrivateFdoData->HotplugInfo.MediaHotplug)
5454 if (
info->WriteCacheEnableOverride != DeviceExtension->PrivateFdoData->HotplugInfo.WriteCacheEnableOverride)
5462 DeviceExtension->PrivateFdoData->HotplugInfo.DeviceHotplug =
info->DeviceHotplug;
5465 DeviceSetParameter(DeviceExtension,
5476RequestHandleEventNotification(
5510 info = DeviceExtension->MediaChangeDetectionInfo;
5514 if ((!DeviceExtension->IsInitialized) || (
info ==
NULL))
5541 }
else if ((eventBuffer->
Events &
5552 if (
info->MediaChangeDetectionDisableCount != 0)
5555 "RequestHandleEventNotification: device %p has detection disabled \n",
5556 DeviceExtension->DeviceObject));
5566 if (requestInUse != 0)
5587RequestHandleEjectionControl(
5635 status = PerformEjectionControl(DeviceExtension,
5649RequestHandleEnableStreaming(
5679 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
5682 WDFFILEOBJECT fileObject =
NULL;
5690 BOOLEAN streamingReadSupported, streamingWriteSupported;
5704 fileObject = WdfRequestGetFileObject(
Request);
5705 if (fileObject !=
NULL) {
5706 fileObjectContext = FileObjectGetContext(fileObject);
5710 if (fileObjectContext ==
NULL)
5713 "RequestHandleEnableStreaming: cannot find file object context\n"));
5722 enforceStreamingRead =
FALSE;
5723 enforceStreamingWrite =
FALSE;
5727 enforceStreamingRead =
TRUE;
5728 enforceStreamingWrite =
FALSE;
5732 enforceStreamingRead =
FALSE;
5733 enforceStreamingWrite =
TRUE;
5737 enforceStreamingRead =
TRUE;
5738 enforceStreamingWrite =
TRUE;
5743 if ((enforceStreamingRead && !streamingReadSupported) ||
5744 (enforceStreamingWrite && !streamingWriteSupported))
5747 "RequestHandleEnableStreaming: requested Streaming mode is not supported\n"));
5763RequestHandleSendOpcInformation(
5795 (
PVOID*)&inputBuffer,
5824RequestHandleGetPerformance(
5863 (
PVOID*)&inputBuffer,
5876 USHORT descriptorSize = 0;
5877 USHORT descriptorCount = 0;
5878 size_t transferSize = 0;
5933 descriptorCount /= descriptorSize;
5945 transferSize += DeviceExtension->AdapterDescriptor->AlignmentMask;
5946 transferSize &= ~DeviceExtension->AdapterDescriptor->AlignmentMask;
5963 DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength);
5965 DeviceExtension->ScratchContext.ScratchBuffer,
5978RequestHandleMcnSyncFakeIoctl(
6015 status = RequestSetupMcnRequest(DeviceExtension,
6016 info->Gesn.Supported);
6020 shouldRetry =
FALSE;
6025 requestSent = RequestSendMcnRequest(DeviceExtension);
6029 shouldRetry = RequestPostWorkMcnRequest(DeviceExtension);
6033 shouldRetry =
FALSE;
6040 DeviceSendDelayedMediaChangeNotifications(DeviceExtension);
6075 if (!useStreaming) {
6079 UCHAR currentStackLocationFlags = 0;
6085 if (!useStreaming) {
6091 WDFFILEOBJECT fileObject;
6094 fileObject = WdfRequestGetFileObject(
Request);
6096 if (fileObject !=
NULL) {
6097 fileObjectContext = FileObjectGetContext(fileObject);
6102 useStreaming =
TRUE;
6107 useStreaming =
TRUE;
6112 return useStreaming;
6141 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
6145 size_t transferByteCount = 0;
6179 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_RW,
"RequestValidateReadWrite: Access Denied! Device in exclusive mode.\n"));
6199 if (!DeviceExtension->DiskGeometry.BytesPerSector)
6201 DeviceExtension->DiskGeometry.BytesPerSector = 2048;
6204 if (!DeviceExtension->SectorShift)
6206 DeviceExtension->SectorShift = 11;
6210 if (
TEST_FLAG(startingOffset, DeviceExtension->DiskGeometry.BytesPerSector - 1) ||
6211 TEST_FLAG(transferByteCount, DeviceExtension->DiskGeometry.BytesPerSector - 1))
6245 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_RW,
"RequestValidateReadWrite: Write request to read-only media\n"));
6259 if ((startingOffset >= DeviceExtension->PartitionLength.QuadPart) ||
6262 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_RW,
"RequestValidateReadWrite: Request is out of bounds\n"));
6268 ULONGLONG bytesRemaining = DeviceExtension->PartitionLength.QuadPart - startingOffset;
6270 if ((
ULONGLONG)transferByteCount > bytesRemaining)
6272 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_RW,
"RequestValidateReadWrite: Request is out of bounds\n"));
6281 if (((transferByteCount >> DeviceExtension->SectorShift) % cdData->
Mmc.
Blocking) != 0)
6284 "RequestValidateReadWrite: Number of blocks is not a multiple of the blocking size (%x)\n",
6295 "RequestValidateReadWrite: Starting block is not a multiple of the blocking size (%x)\n",
6309 "RequestValidateReadWrite: Unknown validation schema (%x)\n",
6335 "RequestValidateReadWrite: Streaming reads are not supported.\n"));
6342 "RequestValidateReadWrite: Streaming writes are not supported.\n"));
6377 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
6379 size_t transferByteCount = 0;
6401 if (transferByteCount == 0)
6412 currentStack->
Parameters.
Read.ByteOffset.QuadPart += (DeviceExtension->StartingOffset.QuadPart);
6429 ULONG packetsCount = 0;
6445 packetsCount = entireXferLen /
maxLength;
6452 originalRequestContext = RequestGetContext(
Request);
6457 readWriteContext = &DeviceExtension->ScratchContext.ScratchReadWriteContext;
6458 requestContext = RequestGetContext(DeviceExtension->ScratchContext.ScratchRequest);
6492RequestHandleLoadEjectMedia(
6532 if(DeviceExtension->ProtectedLockCount != 0)
6534 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_IOCTL,
"RequestHandleLoadEjectMedia: call to eject protected locked "
6535 "device - failure\n"));
6557 if ((zpoddInfo !=
NULL) &&
6559 (zpoddInfo->
Load == 0))
6569 status = DeviceSendSrbSynchronously(DeviceExtension->Device,
6576 if (zpoddInfo !=
NULL)
6582 WdfWaitLockRelease(DeviceExtension->EjectSynchronizationLock);
6591RequestHandleReserveRelease(
6620 ULONG ioctlCode = 0;
6663 status = DeviceSendSrbSynchronously(DeviceExtension->Device,
6750 (
PVOID*)&reserveCommand,
6760 else if ((
ULONG_PTR)reserveCommand & DeviceExtension->AdapterDescriptor->AlignmentMask)
6780 switch (reserveCommand->
PR_IN.ServiceAction)
6808 switch (reserveCommand->
PR_OUT.ServiceAction)
6855RequestHandlePersistentReserve(
6895 (
PVOID*)&reserveCommand,
6917 size_t dataBufLen = 0;
6926 &(reserveCommand->
PR_IN.AllocationLength));
6929 writeToDevice =
FALSE;
6943 reserveCommand->
PR_OUT.ParameterList,
6947 writeToDevice =
TRUE;
6953 status = DeviceSendSrbSynchronously(DeviceExtension->Device,
6966#if (NTDDI_VERSION >= NTDDI_WIN8)
6969RequestHandleAreVolumesReady(
7001 if (DeviceExtension->IsVolumeOnlinePending ==
FALSE)
7012 DeviceExtension->ManualVolumeReadyQueue
7021 completeRequest =
FALSE;
7025 if (completeRequest)
7035RequestHandleVolumeOnline(
7069 DeviceExtension->IsVolumeOnlinePending =
FALSE;
7074 status = WdfIoQueueRetrieveNextRequest(DeviceExtension->ManualVolumeReadyQueue,
7087 WdfRequestFormatRequestUsingCurrentType(
Request);
7091 irp->AssociatedIrp.SystemBuffer = &DeviceExtension->DeviceNumber;
7099 DeviceExtension->IoTarget,
7138 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
7141 ULONG startingSector;
7159 (
VOID) MediaReadCapacity(DeviceExtension->Device);
7182 if ((
ULONG_PTR)outputVirtAddr & DeviceExtension->AdapterDescriptor->AlignmentMask)
7184 NT_ASSERT(!((
ULONG_PTR)outputVirtAddr & DeviceExtension->AdapterDescriptor->AlignmentMask));
7217 "Request to read C2 & Subcode rejected. "
7218 "Is C2 supported: %d Is Subcode supported: %d\n",
7230 "Request to read C2 rejected because drive does not "
7231 "report support for C2 pointers\n"
7242 "Request to read subcode rejected because drive does "
7243 "not report support for reading the subcode data\n"
7262 size_t transferByteCount;
7264 ULONG timesAlreadyRetried = 0;
7279 cdb->
READ_CD.IncludeUserData = 1;
7281 cdb->
READ_CD.IncludeSyncData = 1;
7287 cdb->
READ_CD.IncludeUserData = 1;
7289 cdb->
READ_CD.IncludeSyncData = 1;
7295 cdb->
READ_CD.IncludeUserData = 1;
7297 cdb->
READ_CD.IncludeSyncData = 1;
7302 cdb->
READ_CD.ExpectedSectorType = 0;
7303 cdb->
READ_CD.IncludeUserData = 1;
7305 cdb->
READ_CD.IncludeSyncData = 1;
7307 cdb->
READ_CD.SubChannelSelection = 1;
7312 cdb->
READ_CD.ExpectedSectorType = 0;
7313 cdb->
READ_CD.IncludeUserData = 1;
7315 cdb->
READ_CD.IncludeSyncData = 1;
7321 cdb->
READ_CD.ExpectedSectorType = 0;
7322 cdb->
READ_CD.IncludeUserData = 1;
7324 cdb->
READ_CD.IncludeSyncData = 1;
7325 cdb->
READ_CD.SubChannelSelection = 1;
7334 ScratchBuffer_SetupSrb(DeviceExtension,
Request, (
ULONG)transferByteCount,
TRUE);
7337 PIRP scratchIrp = WdfRequestWdmGetIrp(DeviceExtension->ScratchContext.ScratchRequest);
7338 scratchIrp->MdlAddress =
irp->MdlAddress;
7353 cdb->
READ_CD.StartingLBA[3] = (
UCHAR) (startingSector & 0xFF);
7354 cdb->
READ_CD.StartingLBA[2] = (
UCHAR) ((startingSector >> 8));
7355 cdb->
READ_CD.StartingLBA[1] = (
UCHAR) ((startingSector >> 16));
7356 cdb->
READ_CD.StartingLBA[0] = (
UCHAR) ((startingSector >> 24));
7361 (DeviceExtension->ScratchContext.ScratchSrb->InternalStatus ==
STATUS_CANCELLED))
7363 shouldRetry =
FALSE;
7369 timesAlreadyRetried,
7371 &retryIn100nsUnits);
7375 t.QuadPart = -retryIn100nsUnits;
7376 timesAlreadyRetried++;
7397DeviceHandlePlayAudioMsf(
7431 (
PVOID*)&inputBuffer,
7437 ULONG transferSize = 0;
7454 status = ScratchBuffer_ExecuteCdb(DeviceExtension,
Request, transferSize,
FALSE, &cdb, 10);
7471DeviceHandleReadQChannel(
7519 status = ReadQChannel(DeviceExtension,
7565 ULONG transferByteCount = 0;
7578 switch( inputBuffer->
Format )
7616 cdb.
SUBCHANNEL.AllocationLength[0] = (
UCHAR) (transferByteCount >> 8);
7617 cdb.
SUBCHANNEL.AllocationLength[1] = (
UCHAR) (transferByteCount & 0xFF);
7627 switch( inputBuffer->
Format )
7663 if (OutputBufferLength < DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength)
7671 DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength);
7673 *
DataLength = DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength;
7685DeviceHandlePauseAudio(
7716 ULONG transferSize = 0;
7726 status = ScratchBuffer_ExecuteCdb(DeviceExtension,
Request, transferSize,
FALSE, &cdb, 10);
7743DeviceHandleResumeAudio(
7774 ULONG transferSize = 0;
7784 status = ScratchBuffer_ExecuteCdb(DeviceExtension,
Request, transferSize,
FALSE, &cdb, 10);
7801DeviceHandleSeekAudioMsf(
7835 (
PVOID*)&inputBuffer,
7840 ULONG transferSize = 0;
7842 ULONG logicalBlockAddress;
7844 logicalBlockAddress =
MSF_TO_LBA(inputBuffer->
M, inputBuffer->
S, inputBuffer->
F);
7851 cdb.
SEEK.LogicalBlockAddress[0] = ((
PFOUR_BYTE)&logicalBlockAddress)->Byte3;
7852 cdb.
SEEK.LogicalBlockAddress[1] = ((
PFOUR_BYTE)&logicalBlockAddress)->Byte2;
7853 cdb.
SEEK.LogicalBlockAddress[2] = ((
PFOUR_BYTE)&logicalBlockAddress)->Byte1;
7854 cdb.
SEEK.LogicalBlockAddress[3] = ((
PFOUR_BYTE)&logicalBlockAddress)->Byte0;
7856 status = ScratchBuffer_ExecuteCdb(DeviceExtension,
Request, transferSize,
FALSE, &cdb, 10);
7873DeviceHandleStopAudio(
7887 ULONG transferSize = 0;
7899 status = ScratchBuffer_ExecuteCdb(DeviceExtension,
Request, transferSize,
FALSE, &cdb, 6);
7916DeviceHandleGetSetVolume(
7962 status = ScratchBuffer_ExecuteCdb(DeviceExtension,
Request, transferSize,
TRUE, &cdb, 10);
7970 ULONG bytesTransferred;
7974 (
PVOID*)&volumeControl,
7978 audioOutput = ModeSenseFindSpecificPage((
PCHAR)DeviceExtension->ScratchContext.ScratchSrb->DataBuffer,
7979 DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength,
7984 bytesTransferred = (
ULONG)((
PCHAR)audioOutput - (
PCHAR)DeviceExtension->ScratchContext.ScratchSrb->DataBuffer) +
7987 if ((audioOutput !=
NULL) &&
7988 (DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength >= bytesTransferred))
8012 ULONG i,bytesTransferred,headerLength;
8016 (
PVOID*)&volumeControl,
8021 audioInput = ModeSenseFindSpecificPage((
PCHAR)DeviceExtension->ScratchContext.ScratchSrb->DataBuffer,
8022 DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength,
8027 if(audioInput ==
NULL)
8030 "Mode Sense Page %d not found\n",
8044 bytesTransferred =
sizeof(
AUDIO_OUTPUT) + headerLength;
8048 audioOutput = (
PAUDIO_OUTPUT)((
PCHAR)DeviceExtension->ScratchContext.ScratchBuffer + headerLength);
8067 status = ScratchBuffer_ExecuteCdb(DeviceExtension,
Request, bytesTransferred,
FALSE, &cdb, 10);
8083DeviceHandleReadDvdStructure(
8131 status = ReadDvdStructure(DeviceExtension,
8190 if (DeviceExtension->DeviceAdditionalData.DriveDeviceType !=
FILE_DEVICE_DVD)
8197 blockNumber = (
ULONG)(
request->BlockByteOffset.QuadPart >> DeviceExtension->SectorShift);
8217 "READ_DVD_STRUCTURE format %x = %s (%x bytes)\n",
8226 "READ_DVD_STRUCTURE format %x = %s (%x bytes)\n",
8228 READ_DVD_STRUCTURE_FORMAT_STRINGS[(
UCHAR)
request->Format],
8248 "DvdDCCompletion - READ_STRUCTURE: descriptor format of %d\n",
request->Format));
8251 DeviceExtension->ScratchContext.ScratchSrb->DataBuffer,
8252 DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength);
8257 "DvdDCCompletion - READ_STRUCTURE:\n"
8259 "\tDvdDCCompletion - READ_STRUCTURE: data at %p\n"
8260 "\tDataBuffer was at %p\n"
8261 "\tDataTransferLength was %lx\n",
8264 DeviceExtension->ScratchContext.ScratchSrb->DataBuffer,
8265 DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength));
8288 layer->StartingDataSector));
8295 layer->EndDataSector));
8302 layer->EndLayerZeroSector));
8312 "IOCTL_DVD_READ_STRUCTURE: data transfer length of %d\n",
8313 DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength));
8316 *
DataLength = DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength;
8326DeviceHandleDvdEndSession(
8365 ULONG transferSize = 0;
8377 currentSession = *sessionId;
8378 limitSession = *sessionId;
8391 status = ScratchBuffer_ExecuteCdb(DeviceExtension,
Request, transferSize,
FALSE, &cdb, 12);
8405DeviceHandleDvdStartSessionReadKey(
8449 (
PVOID*)&keyParameters,
8455 status = DvdStartSessionReadKey(DeviceExtension,
8470DvdStartSessionReadKey(
8505 ULONG keyLength = 0;
8507 ULONG allocationLength;
8521 if (keyParameters ==
NULL)
8529 DeviceExtension->DeviceAdditionalData.Mmc.IsCssDvd)
8531 DevicePickDvdRegion(DeviceExtension->Device);
8546 if(keyHeader ==
NULL)
8550 "DvdDeviceControl - READ_KEY: unable to allocate context\n"));
8569 status = ReadDvdStructure(DeviceExtension,
8597 "StartSessionReadKey Failed with status %x, %xI64 (%x) bytes\n",
8629 keyParameters =
NULL;
8638 allocationLength = keyLength;
8656 ULONG logicalBlockAddress;
8659 DeviceExtension->SectorShift);
8661 fourByte = (
PFOUR_BYTE)&(logicalBlockAddress);
8672 "DvdStartSessionReadKey => sending irp %p (%s)\n",
8680 "DvdStartSessionReadKey => sending irp %p (%s)\n",
8692 PCDVD_KEY_HEADER keyHeader = DeviceExtension->ScratchContext.ScratchSrb->DataBuffer;
8694 ULONG transferLength;
8696 tempStatus = RtlULongSub(DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength,
8716 "DvdDeviceControlCompletion: [%p] - READ_KEY with "
8717 "transfer length of (%d or %d) bytes\n",
8720 DeviceExtension->ScratchContext.ScratchSrb->DataTransferLength - 2));
8726 keyHeader->
Data + 1,
8727 transferLength - 1);
8729 copyProtectKey->
KeyData[transferLength - 1] = 0;
8744 copyProtectKey->
KeyLength += transferLength;
8759 PCDVD_KEY_HEADER keyHeader = DeviceExtension->ScratchContext.ScratchSrb->DataBuffer;
8762 *sessionId = keyData->
AGID;
8778DeviceHandleDvdSendKey(
8818 status = DvdSendKey(DeviceExtension,
8861 ULONG keyLength = 0;
8893 keyLength =
min(keyLength, DeviceExtension->ScratchContext.ScratchBufferSize);
8909 keyBuffer = (
PCDVD_KEY_HEADER)DeviceExtension->ScratchContext.ScratchBuffer;
8946DeviceHandleSetReadAhead(
8985 ULONG transferSize = 0;
8997 DeviceExtension->SectorShift);
9008 DeviceExtension->SectorShift);
9015 status = ScratchBuffer_ExecuteCdb(DeviceExtension,
Request, transferSize,
FALSE, &cdb, 12);
9031DeviceHandleSetSpeed(
9057 PCDROM_DATA cdData = &(DeviceExtension->DeviceAdditionalData);
9066 (
PVOID*)&inputBuffer,
9071 ULONG transferSize = 0;
9095 perfDescriptor = DeviceExtension->ScratchContext.ScratchBuffer;
9116 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_IOCTL,
"DeviceHandleSetSpeed: Restore default speed on media change set to %s\n",
9120 status = ScratchBuffer_ExecuteCdb(DeviceExtension,
Request, transferSize,
FALSE, &cdb, 12);
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
ACPI_SIZE strlen(const char *String)
VOID RequestSetupMcnSyncIrp(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension)
_In_ PSCSI_REQUEST_BLOCK Srb
FORCEINLINE BOOLEAN ValidChar(UCHAR Ch)
#define FREE_POOL(_PoolPtr)
#define CDROM_HACK_BAD_TYPE_ONE_GET_CONFIG
#define FORM2_MODE2_SECTOR
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)
#define CDROM_TAG_PLAY_ACTIVE
#define DEV_POWER_PROTECTED
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID _In_ ULONG _In_ BOOLEAN _In_opt_ WDFREQUEST OriginalRequest
FORCEINLINE BOOLEAN IsVolumeMounted(_In_ PDEVICE_OBJECT DeviceObject)
#define CDROM_TEST_UNIT_READY_TIMEOUT
NTSTATUS RequestSend(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDFIOTARGET IoTarget, _In_ ULONG Flags, _Out_opt_ PBOOLEAN RequestSent)
NTSTATUS RequestDuidGetDeviceIdProperty(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
FORCEINLINE UCHAR RequestGetCurrentStackLocationFlags(_In_ WDFREQUEST Request)
#define EXCLUSIVE_OWNER(_CdData, _FileObject)
_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 RequestDummyCompletionRoutine
#define MAX_COPY_PROTECT_AGID
VOID RequestCompletion(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ NTSTATUS Status, _In_ ULONG_PTR Information)
#define CDROM_TAG_MODE_DATA
#define TEST_FLAG(Flags, Bit)
NTSTATUS RequestDuidGetDeviceProperty(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
#define EXCLUSIVE_MODE(_CdData)
#define CDROM_GET_PERFORMANCE_TIMEOUT
VOID DeviceSendNotification(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ const GUID *Guid, _In_ ULONG ExtraDataSize, _In_opt_ PVOID ExtraData)
#define SET_FLAG(Flags, Bit)
#define CDROM_TAG_STRINGS
#define YELLOW_MODE2_SECTOR
FORCEINLINE ULONG TimeOutValueGetCapValue(_In_ ULONG TimeOutValue, _In_ ULONG Times)
#define COOKED_SECTOR_SIZE
#define FDO_HACK_NO_RESERVE6
#define FDO_HACK_NO_STREAMING
#define MODE_PAGE_DATA_SIZE
#define CDROM_VOLUME_VERIFY_CHECKED
#define CLASSP_REG_REMOVAL_POLICY_VALUE_NAME
#define CLASSP_REG_SUBKEY_NAME
#define SCSIOP_MODE_SENSE10
struct _CDVD_KEY_HEADER * PCDVD_KEY_HEADER
#define SCSIOP_PLAY_AUDIO_MSF
#define SCSIOP_READ_SUB_CHANNEL
#define MODE_DSP_FUA_SUPPORTED
#define SCSIOP_GET_CONFIGURATION
#define SCSIOP_TEST_UNIT_READY
#define SCSIOP_RELEASE_UNIT
#define SCSIOP_GET_PERFORMANCE
#define SCSIOP_SET_READ_AHEAD
#define MODE_SENSE_CHANGEABLE_VALUES
struct _MODE_PARAMETER_HEADER10 MODE_PARAMETER_HEADER10
#define SCSIOP_PAUSE_RESUME
#define MODE_PAGE_CACHING
struct _CDVD_REPORT_AGID_DATA * PCDVD_REPORT_AGID_DATA
#define SCSIOP_RESERVE_UNIT
#define MODE_SENSE_CURRENT_VALUES
#define SCSIOP_REPORT_KEY
#define SCSIOP_READ_DVD_STRUCTURE
#define SCSIOP_START_STOP_UNIT
#define SCSIOP_SET_CD_SPEED
#define SCSIOP_SET_STREAMING
#define SCSIOP_MODE_SELECT10
struct _CDVD_KEY_HEADER CDVD_KEY_HEADER
#define SCSIOP_SYNCHRONIZE_CACHE
#define IOCTL_CDROM_CURRENT_POSITION
#define DVD_TITLE_KEY_LENGTH
#define DVD_BUS_KEY_LENGTH
#define IOCTL_DVD_SEND_KEY
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
#define IOCTL_CDROM_MEDIA_CATALOG
#define DVD_CHALLENGE_KEY_LENGTH
#define DVD_DISK_KEY_LENGTH
#define IOCTL_CDROM_TRACK_ISRC
#define IOCTL_DVD_READ_KEY
#define DVD_RPC_KEY_LENGTH
#define STATUS_INVALID_HANDLE
#define STATUS_NOT_SUPPORTED
static PDB_INFORMATION information
#define NT_SUCCESS(StatCode)
static const WCHAR Cleanup[]
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)
static BOOLEAN ValidPersistentReserveScope(UCHAR Scope)
NTSTATUS RequestValidateAacsReadMediaId(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDF_REQUEST_PARAMETERS RequestParameters, _Out_ size_t *DataLength)
static BOOLEAN ValidPersistentReserveType(UCHAR Type)
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)
BOOLEAN RequestIsRealtimeStreaming(_In_ WDFREQUEST Request, _In_ BOOLEAN IsReadRequest)
_In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_PARAMETERS RequestParameters
NTSTATUS RequestHandleUnknownIoctl(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request)
struct _DVD_DESCRIPTOR_HEADER * PDVD_DESCRIPTOR_HEADER
struct _DVD_RPC_KEY * PDVD_RPC_KEY
struct _DVD_LAYER_DESCRIPTOR * PDVD_LAYER_DESCRIPTOR
struct _DVD_COPYRIGHT_DESCRIPTOR * PDVD_COPYRIGHT_DESCRIPTOR
#define SCSI_REQUEST_BLOCK_SIZE
#define SRB_FUNCTION_EXECUTE_SCSI
#define SRB_STATUS_ABORTED
#define SRB_SIMPLE_TAG_REQUEST
#define SRB_FLAGS_QUEUE_ACTION_ENABLE
#define _IRQL_requires_max_(irql)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeGetCurrentIrql()
#define KeDelayExecutionThread(mode, foo, t)
#define IOCTL_DISK_GET_DRIVE_GEOMETRY_EX
#define IOCTL_DISK_GET_PARTITION_INFO_EX
#define IOCTL_DISK_GET_DRIVE_LAYOUT_EX
GLuint GLsizei GLsizei * length
GLenum GLuint GLint GLint layer
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
NTSYSAPI NTSTATUS WINAPI RtlDeleteRegistryValue(ULONG, PCWSTR, PCWSTR)
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
#define InterlockedCompareExchangePointer
#define InterlockedCompareExchange
#define MEDIA_CURRENTLY_MOUNTED
_Outptr_result_bytebuffer_all_ BytesReturned PGET_CONFIGURATION_HEADER _Out_ PULONG FEATURE_NUMBER const StartingFeature
struct _MOUNTDEV_NAME MOUNTDEV_NAME
struct _GET_LENGTH_INFORMATION * PGET_LENGTH_INFORMATION
struct _MOUNTDEV_UNIQUE_ID MOUNTDEV_UNIQUE_ID
struct _STORAGE_HOTPLUG_INFO STORAGE_HOTPLUG_INFO
struct _GET_LENGTH_INFORMATION GET_LENGTH_INFORMATION
struct _PARTITION_INFORMATION_EX PARTITION_INFORMATION_EX
#define IOCTL_DISK_GET_LENGTH_INFO
struct _PARTITION_INFORMATION_EX * PPARTITION_INFORMATION_EX
struct _MOUNTDEV_SUGGESTED_LINK_NAME MOUNTDEV_SUGGESTED_LINK_NAME
#define _In_reads_bytes_(s)
#define _Out_writes_bytes_(s)
#define RTL_REGISTRY_ABSOLUTE
#define RTL_QUERY_REGISTRY_REQUIRED
#define RTL_QUERY_REGISTRY_DIRECT
#define Int64ShrlMod32(a, b)
#define RTL_SIZEOF_THROUGH_FIELD(type, field)
#define UNREFERENCED_PARAMETER(P)
struct _CDROM_EXCEPTION_PERFORMANCE_DESCRIPTOR CDROM_EXCEPTION_PERFORMANCE_DESCRIPTOR
#define CD_RAW_SECTOR_WITH_C2_AND_SUBCODE_SIZE
struct _VOLUME_CONTROL VOLUME_CONTROL
#define AUDIO_STATUS_IN_PROGRESS
#define CDROM_READ_TOC_EX_FORMAT_SESSION
#define CDROM_LOCK_IGNORE_VOLUME
@ CdromNominalPerformance
@ CdromEntirePerformanceList
@ CdromPerformanceExceptionsOnly
struct _CDROM_NOMINAL_PERFORMANCE_DESCRIPTOR CDROM_NOMINAL_PERFORMANCE_DESCRIPTOR
#define CDROM_EXCLUSIVE_CALLER_LENGTH
#define IOCTL_CDROM_GET_LAST_SESSION
#define IOCTL_CDROM_GET_DRIVE_GEOMETRY_EX
struct _CDROM_PERFORMANCE_HEADER CDROM_PERFORMANCE_HEADER
struct _CDROM_SET_STREAMING * PCDROM_SET_STREAMING
struct _CDROM_EXCLUSIVE_LOCK_STATE CDROM_EXCLUSIVE_LOCK_STATE
#define CDROM_READ_TOC_EX_FORMAT_FULL_TOC
@ ExclusiveAccessQueryState
@ ExclusiveAccessLockDevice
@ ExclusiveAccessUnlockDevice
struct __RAW_READ_INFO RAW_READ_INFO
#define IOCTL_CDROM_GET_VOLUME
struct _SUB_Q_MEDIA_CATALOG_NUMBER SUB_Q_MEDIA_CATALOG_NUMBER
#define CDROM_READ_TOC_EX_FORMAT_PMA
@ Cdrom10Nominal20Exceptions
@ CdromStreamingEnableForWriteOnly
@ CdromStreamingEnableForReadOnly
@ CdromStreamingEnableForReadWrite
#define CD_RAW_SECTOR_WITH_C2_SIZE
@ CdromPerformanceRequest
struct _CDROM_WRITE_SPEED_DESCRIPTOR CDROM_WRITE_SPEED_DESCRIPTOR
struct _CDROM_SET_STREAMING CDROM_SET_STREAMING
#define CDROM_READ_TOC_EX_FORMAT_TOC
#define CDROM_READ_TOC_EX_FORMAT_ATIP
#define IOCTL_CDROM_GET_DRIVE_GEOMETRY
struct _SUB_Q_CURRENT_POSITION SUB_Q_CURRENT_POSITION
struct _CDROM_TOC_SESSION_DATA CDROM_TOC_SESSION_DATA
enum _CDROM_SPEED_REQUEST CDROM_SPEED_REQUEST
#define IOCTL_CDROM_EXCLUSIVE_ACCESS
#define CDROM_NO_MEDIA_NOTIFICATIONS
union _SUB_Q_CHANNEL_DATA * PSUB_Q_CHANNEL_DATA
struct _CDROM_TOC CDROM_TOC
#define CD_RAW_SECTOR_WITH_SUBCODE_SIZE
#define MINIMUM_CDROM_READ_TOC_EX_SIZE
struct _CDROM_SUB_Q_DATA_FORMAT * PCDROM_SUB_Q_DATA_FORMAT
struct _CDROM_SET_SPEED CDROM_SET_SPEED
#define CDROM_READ_TOC_EX_FORMAT_CDTEXT
struct __RAW_READ_INFO * PRAW_READ_INFO
struct _SUB_Q_TRACK_ISRC SUB_Q_TRACK_ISRC
struct _DRIVE_LAYOUT_INFORMATION * PDRIVE_LAYOUT_INFORMATION
#define IOCTL_DISK_VOLUMES_ARE_READY
struct _DISK_GEOMETRY DISK_GEOMETRY
#define IOCTL_DISK_GET_DRIVE_LAYOUT
struct _PARTITION_INFORMATION PARTITION_INFORMATION
#define IOCTL_DISK_GET_PARTITION_INFO
struct _PARTITION_INFORMATION * PPARTITION_INFORMATION
struct _DISK_GEOMETRY * PDISK_GEOMETRY
struct _FEATURE_HEADER * PFEATURE_HEADER
#define SCSI_GET_CONFIGURATION_REQUEST_TYPE_ONE
#define SCSI_GET_CONFIGURATION_REQUEST_TYPE_ALL
#define SCSI_GET_CONFIGURATION_REQUEST_TYPE_CURRENT
enum _FEATURE_NUMBER FEATURE_NUMBER
struct _GET_CONFIGURATION_HEADER * PGET_CONFIGURATION_HEADER
@ FeatureRestrictedOverwrite
@ FeatureIncrementalStreamingWritable
@ FeatureDefectManagement
@ FeatureRigidRestrictedOverwrite
struct _GET_CONFIGURATION_HEADER GET_CONFIGURATION_HEADER
struct _FEATURE_HEADER FEATURE_HEADER
@ WriteThroughNotSupported
* PSTORAGE_DESCRIPTOR_HEADER
STORAGE_DESCRIPTOR_HEADER
#define STORAGE_EVENT_NOTIFICATION_VERSION_V1
struct _STORAGE_DEVICE_NUMBER STORAGE_DEVICE_NUMBER
* PSTORAGE_WRITE_CACHE_PROPERTY
@ WriteCacheChangeUnknown
@ WriteCacheNotChangeable
#define IOCTL_STORAGE_CHECK_VERIFY
#define IOCTL_STORAGE_READ_CAPACITY
@ WriteCacheTypeWriteBack
#define IOCTL_STORAGE_PERSISTENT_RESERVE_IN
* PSTORAGE_DEVICE_DESCRIPTOR
#define IOCTL_STORAGE_RESERVE
#define STORAGE_EVENT_MEDIA_STATUS
@ WriteCacheEnableUnknown
STORAGE_DEVICE_DESCRIPTOR
struct _DEVICE_MEDIA_INFO DEVICE_MEDIA_INFO
STORAGE_WRITE_CACHE_PROPERTY
#define IOCTL_STORAGE_EJECT_MEDIA
#define IOCTL_STORAGE_EJECTION_CONTROL
#define STORAGE_EVENT_DEVICE_OPERATION
#define STORAGE_EVENT_DEVICE_STATUS
* PSTORAGE_ADAPTER_DESCRIPTOR
struct _GET_MEDIA_TYPES GET_MEDIA_TYPES
#define IO_CDROM_EXCLUSIVE_LOCK
VOID NTAPI IoWriteErrorLogEntry(IN PVOID ElEntry)
PVOID NTAPI IoAllocateErrorLogEntry(IN PVOID IoObject, IN UCHAR EntrySize)
#define STATUS_INTERNAL_ERROR
#define STATUS_INVALID_BUFFER_SIZE
#define STATUS_INVALID_PARAMETER_2
#define STATUS_INVALID_LEVEL
#define STATUS_INVALID_PARAMETER_1
#define STATUS_INVALID_PARAMETER_3
#define STATUS_INVALID_PARAMETER_5
struct _DVD_COPY_PROTECT_KEY DVD_COPY_PROTECT_KEY
struct DVD_READ_STRUCTURE * PDVD_READ_STRUCTURE
struct _AACS_SERIAL_NUMBER AACS_SERIAL_NUMBER
struct _AACS_BINDING_NONCE AACS_BINDING_NONCE
struct _AACS_MEDIA_ID AACS_MEDIA_ID
#define DVD_END_ALL_SESSIONS
struct _AACS_VOLUME_ID AACS_VOLUME_ID
struct _AACS_CERTIFICATE AACS_CERTIFICATE
struct _AACS_CHALLENGE_KEY AACS_CHALLENGE_KEY
struct _DVD_REGION DVD_REGION
struct _DVD_COPY_PROTECT_KEY * PDVD_COPY_PROTECT_KEY
#define IRP_MJ_DEVICE_CONTROL
struct _DISK_GEOMETRY_EX * PDISK_GEOMETRY_EX
VOID ScratchBuffer_ResetItems(_Inout_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ BOOLEAN ResetRequestHistory)
NTSTATUS ScratchBuffer_SendSrb(_Inout_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ BOOLEAN SynchronousSrb, _When_(SynchronousSrb, _Pre_null_) _When_(!SynchronousSrb, _In_opt_) PSRB_HISTORY_ITEM *SrbHistoryItem)
NTSTATUS ScratchBuffer_PerformNextReadWrite(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ BOOLEAN FirstTry)
FORCEINLINE VOID ScratchBuffer_EndUse(_Inout_ PCDROM_DEVICE_EXTENSION DeviceExtension)
_In_opt_ WDFREQUEST _In_ ULONG _In_ BOOLEAN _In_ PCDB Cdb
#define ScratchBuffer_BeginUse(context)
#define IOCTL_SCSI_PASS_THROUGH
#define IOCTL_SCSI_PASS_THROUGH_DIRECT
#define SCSIOP_RELEASE_UNIT10
#define CDROM_AUDIO_CONTROL_PAGE
#define RESERVATION_ACTION_REGISTER
#define RESERVATION_SCOPE_ELEMENT
#define RESERVATION_SCOPE_LU
#define RESERVATION_ACTION_RESERVE
#define SCSIOP_SEND_OPC_INFORMATION
#define RESERVATION_ACTION_RELEASE
struct _PERFORMANCE_DESCRIPTOR PERFORMANCE_DESCRIPTOR
#define RESERVATION_ACTION_REGISTER_IGNORE_EXISTING
#define SCSIOP_RESERVE_UNIT10
#define RESERVATION_TYPE_WRITE_EXCLUSIVE
#define RESERVATION_ACTION_READ_KEYS
#define RESERVATION_ACTION_PREEMPT_ABORT
#define RESERVATION_ACTION_CLEAR
#define CDB_SUBCHANNEL_BLOCK
#define REVERSE_BYTES_SHORT(Destination, Source)
struct _AUDIO_OUTPUT AUDIO_OUTPUT
struct _READ_DVD_STRUCTURES_HEADER READ_DVD_STRUCTURES_HEADER
#define REVERSE_SHORT(Short)
#define SCSIOP_PERSISTENT_RESERVE_IN
#define DVD_INVALIDATE_AGID
#define RESERVATION_ACTION_PREEMPT
#define LOADING_MECHANISM_TRAY
struct _PRO_PARAMETER_LIST PRO_PARAMETER_LIST
#define RESERVATION_TYPE_EXCLUSIVE_REGISTRANTS
#define REVERSE_BYTES(Destination, Source)
#define SCSIOP_PERSISTENT_RESERVE_OUT
#define MODE_SELECT_IMMEDIATE
#define RESERVATION_TYPE_EXCLUSIVE
struct _AUDIO_OUTPUT * PAUDIO_OUTPUT
#define REVERSE_LONG(Long)
#define RESERVATION_ACTION_READ_RESERVATIONS
#define RESERVATION_TYPE_WRITE_EXCLUSIVE_REGISTRANTS
#define IOCTL_SCSI_PASS_THROUGH_DIRECT_EX
#define IOCTL_SCSI_PASS_THROUGH_EX
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
FORCEINLINE DUID_MATCH_STATUS CompareStorageDuids(_In_ PSTORAGE_DEVICE_UNIQUE_IDENTIFIER Duid1, _In_ PSTORAGE_DEVICE_UNIQUE_IDENTIFIER Duid2)
struct _STORAGE_DEVICE_UNIQUE_IDENTIFIER STORAGE_DEVICE_UNIQUE_IDENTIFIER
#define DUID_INCLUDE_SOFTWARE_IDS
#define DUID_HARDWARE_IDS_ONLY
#define TRACE_LEVEL_WARNING
#define TRACE_LEVEL_VERBOSE
#define TRACE_LEVEL_ERROR
#define TRACE_LEVEL_INFORMATION
LARGE_INTEGER BlockByteOffset
DVD_STRUCTURE_FORMAT Format
PORT_OUTPUT PortOutput[4]
DEVICE_TYPE DriveDeviceType
ULONG MaxPageAlignedTransferBytes
ULONG MaxUnalignedTransferBytes
ULONG CachedInquiryDataByteCount
UCHAR CallerName[CDROM_EXCLUSIVE_CALLER_LENGTH]
WDFFILEOBJECT ExclusiveOwner
PDEVICE_OBJECT DeviceObject
PZERO_POWER_ODD_INFO ZeroPowerODDInfo
CDROM_DATA DeviceAdditionalData
EXCLUSIVE_ACCESS_REQUEST_TYPE RequestType
UCHAR CallerName[CDROM_EXCLUSIVE_CALLER_LENGTH]
UCHAR CallerName[CDROM_EXCLUSIVE_CALLER_LENGTH]
CDROM_EXCLUSIVE_ACCESS Access
FEATURE_NUMBER ValidationSchema
BOOLEAN StreamingReadSupported
BOOLEAN StreamingWriteSupported
WDFREQUEST OriginalRequest
PCDROM_DEVICE_EXTENSION DeviceExtension
BOOLEAN ReadWriteIsCompleted
BOOLEAN ReadWriteRetryInitialized
LARGE_INTEGER StartingOffset
WRITE_ROTATION RotationControl
CDROM_SPEED_REQUEST RequestType
CDROM_OPC_INFO_TYPE RequestType
STREAMING_CONTROL_REQUEST_TYPE RequestType
CDROM_PERFORMANCE_REQUEST_TYPE RequestType
UCHAR CopyrightProtectionType
UCHAR RegionManagementInformation
union _DVD_COPY_PROTECT_KEY::@3245 Parameters
LARGE_INTEGER TitleOffset
UCHAR UserResetsAvailable
BOOLEAN EnforceStreamingRead
BOOLEAN EnforceStreamingWrite
struct _IO_STACK_LOCATION::@4104::@4108 Read
struct _IO_STACK_LOCATION::@4104::@4109 Write
union _IO_STACK_LOCATION::@1611 Parameters
struct _IO_STACK_LOCATION::@1611::@1612 DeviceIoControl
BOOLEAN UseOnlyIfThereAreNoOtherLinks
struct _PERSISTENT_RESERVE_COMMAND::@3258::@3259 PR_IN
struct _PERSISTENT_RESERVE_COMMAND::@3258::@3260 PR_OUT
STORAGE_QUERY_TYPE QueryType
UCHAR AdditionalParameters[1]
STORAGE_PROPERTY_ID PropertyId
LARGE_INTEGER TriggerAddress
LARGE_INTEGER TargetAddress
UCHAR TrackRelativeAddress[4]
union _WDF_REQUEST_PARAMETERS::@4007 Parameters
struct _WDF_REQUEST_PARAMETERS::@4007::@4011 DeviceIoControl
struct _WDF_REQUEST_PARAMETERS::@4007::@4009 Read
struct _WDF_REQUEST_PARAMETERS::@4007::@4010 Write
ULONG GetConfigurationBufferSize
BOOLEAN MonitorStartStopUnit
PGET_CONFIGURATION_HEADER GetConfigurationBuffer
TRACK_MODE_TYPE TrackMode
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define STATUS_IO_DEVICE_ERROR
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_MEDIA_WRITE_PROTECTED
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_INVALID_USER_BUFFER
#define STATUS_INVALID_DEVICE_STATE
#define STATUS_INFO_LENGTH_MISMATCH
#define STATUS_DEVICE_BUSY
#define STATUS_VERIFY_REQUIRED
#define STATUS_INSUFFICIENT_RESOURCES
struct _CDB::_CDB10 CDB10
struct _CDB::_PERSISTENT_RESERVE_OUT PERSISTENT_RESERVE_OUT
struct _CDB::_PERSISTENT_RESERVE_IN PERSISTENT_RESERVE_IN
struct _CDB::_SUBCHANNEL SUBCHANNEL
struct _CDB::_CDB6GENERIC CDB6GENERIC
struct _CDB::_READ_DVD_STRUCTURE READ_DVD_STRUCTURE
struct _CDB::_MODE_SENSE10 MODE_SENSE10
struct _CDB::_SEND_OPC_INFORMATION SEND_OPC_INFORMATION
struct _CDB::_READ_CD READ_CD
struct _CDB::_SET_READ_AHEAD SET_READ_AHEAD
struct _CDB::_SEND_KEY SEND_KEY
struct _CDB::_GET_CONFIGURATION GET_CONFIGURATION
struct _CDB::_START_STOP START_STOP
struct _CDB::_SET_CD_SPEED SET_CD_SPEED
struct _CDB::_REPORT_KEY REPORT_KEY
struct _CDB::_MODE_SELECT10 MODE_SELECT10
struct _CDB::_PAUSE_RESUME PAUSE_RESUME
struct _CDB::_PLAY_AUDIO_MSF PLAY_AUDIO_MSF
struct _CDB::_GET_PERFORMANCE GET_PERFORMANCE
struct _CDB::_SET_STREAMING SET_STREAMING
struct _CDB::_READ_TOC READ_TOC
SUB_Q_MEDIA_CATALOG_NUMBER MediaCatalog
SUB_Q_TRACK_ISRC TrackIsrc
SUB_Q_CURRENT_POSITION CurrentPosition
_Must_inspect_result_ _In_ WDFDEVICE Device
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFQUEUE _In_ _Strict_type_match_ WDF_REQUEST_TYPE RequestType
_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_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
@ WDF_REQUEST_SEND_OPTION_SYNCHRONOUS
FORCEINLINE VOID WDF_REQUEST_PARAMETERS_INIT(_Out_ PWDF_REQUEST_PARAMETERS Parameters)
_Must_inspect_result_ FORCEINLINE NTSTATUS WdfWaitLockAcquire(_In_ _Requires_lock_not_held_(_Curr_) WDFWAITLOCK Lock, _In_opt_ PLONGLONG Timeout)
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
#define SL_OVERRIDE_VERIFY_VOLUME
#define SL_REALTIME_STREAM
@ RemovalPolicyExpectSurpriseRemoval
@ RemovalPolicyExpectOrderlyRemoval
#define MmGetMdlByteCount(_Mdl)
#define MmGetMdlVirtualAddress(_Mdl)
#define RTL_QUERY_REGISTRY_TYPECHECK
#define RTL_QUERY_REGISTRY_TYPECHECK_SHIFT