CDROM Storage Class Driver.zip

  • Jason_ZTD
    了解作者
  • C/C++
    开发工具
  • 243KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2018-06-25 11:09
    上传日期
Windows系统上的CDROM设备驱动程序
CDROM Storage Class Driver.zip
  • CDROM Storage Class Driver
  • C++
  • src
  • cdrom.htm
    5.6KB
  • cdrom.inf
    10.7KB
  • localwpp.ini
    919B
  • scratch.h
    6.2KB
  • cdrom.h
    49.7KB
  • sense.c
    96.2KB
  • mmc.c
    58.4KB
  • aacs.c
    52.5KB
  • cdrom.c
    134.9KB
  • init.c
    93.4KB
  • data.c
    17.9KB
  • guid.c
    274B
  • scratch.c
    52.4KB
  • ioctl.h
    24.2KB
  • zpodd.c
    23.7KB
  • pnppower.c
    17.4KB
  • cdromp.h
    15.4KB
  • cdrom.vcxproj
    18.7KB
  • cdrom.rc
    633B
  • mmc.h
    3.1KB
  • cdrom.vcxproj.Filters
    841B
  • ioctl.c
    294.9KB
  • common.c
    123.7KB
  • autorun.c
    104.5KB
  • cdrom.sln
    3.1KB
  • description
  • Combined.css
    0B
  • offline.js
    1.6KB
  • Brand.css
    69.9KB
  • Layout.css
    1.7KB
  • Galleries.css
    10.2KB
  • 19eccd10-9a4c-4ebc-a240-2680a581332eBrand.css
    5.8KB
  • dc96e5d0-205a-4f07-963c-0adecf31d9c1Combined.css
    0B
  • iframedescription.css
    3.3KB
  • description.html
    14.1KB
  • license.rtf
    4.6KB
内容介绍
/*-- Copyright (C) Microsoft Corporation. All rights reserved. Module Name: ioctl.c Abstract: Include all funtions for processing IOCTLs Environment: kernel mode only Notes: Revision History: --*/ #include "stddef.h" #include "string.h" #include "ntddk.h" #include "ntddstor.h" #include "cdrom.h" #include "ioctl.h" #include "scratch.h" #include "mmc.h" #ifdef DEBUG_USE_WPP #include "ioctl.tmh" #endif #define FirstDriveLetter 'C' #define LastDriveLetter 'Z' #if DBG LPCSTR READ_DVD_STRUCTURE_FORMAT_STRINGS[DvdMaxDescriptor+1] = { "Physical", "Copyright", "DiskKey", "BCA", "Manufacturer", "Unknown" }; #endif // DBG _IRQL_requires_max_(APC_LEVEL) VOID GetConfigurationDataConversionTypeAllToTypeOne( _In_ FEATURE_NUMBER RequestedFeature, _In_ PSCSI_REQUEST_BLOCK Srb, _Out_ size_t * DataLength ); _IRQL_requires_max_(APC_LEVEL) VOID GetConfigurationDataSynthesize( _In_reads_bytes_(InputBufferSize) PVOID InputBuffer, _In_ ULONG InputBufferSize, _Out_writes_bytes_(OutputBufferSize) PVOID OutputBuffer, _In_ size_t OutputBufferSize, _In_ FEATURE_NUMBER StartingFeature, _In_ ULONG RequestType, _Out_ size_t * DataLength ); _IRQL_requires_max_(APC_LEVEL) PCDB RequestGetScsiPassThroughCdb( _In_ PIRP Irp ); #ifdef ALLOC_PRAGMA #pragma alloc_text(PAGE, DeviceIsPlayActive) #pragma alloc_text(PAGE, RequestHandleGetDvdRegion) #pragma alloc_text(PAGE, RequestHandleReadTOC) #pragma alloc_text(PAGE, RequestHandleReadTocEx) #pragma alloc_text(PAGE, RequestHandleGetConfiguration) #pragma alloc_text(PAGE, RequestHandleGetDriveGeometry) #pragma alloc_text(PAGE, RequestHandleDiskVerify) #pragma alloc_text(PAGE, RequestHandleCheckVerify) #pragma alloc_text(PAGE, RequestHandleFakePartitionInfo) #pragma alloc_text(PAGE, RequestHandleEjectionControl) #pragma alloc_text(PAGE, RequestHandleEnableStreaming) #pragma alloc_text(PAGE, RequestHandleSendOpcInformation) #pragma alloc_text(PAGE, RequestHandleGetPerformance) #pragma alloc_text(PAGE, RequestHandleMcnSyncFakeIoctl) #pragma alloc_text(PAGE, RequestHandleLoadEjectMedia) #pragma alloc_text(PAGE, RequestHandleReserveRelease) #pragma alloc_text(PAGE, RequestHandlePersistentReserve) #pragma alloc_text(PAGE, DeviceHandleRawRead) #pragma alloc_text(PAGE, DeviceHandlePlayAudioMsf) #pragma alloc_text(PAGE, DeviceHandleReadQChannel) #pragma alloc_text(PAGE, ReadQChannel) #pragma alloc_text(PAGE, DeviceHandlePauseAudio) #pragma alloc_text(PAGE, DeviceHandleResumeAudio) #pragma alloc_text(PAGE, DeviceHandleSeekAudioMsf) #pragma alloc_text(PAGE, DeviceHandleStopAudio) #pragma alloc_text(PAGE, DeviceHandleGetSetVolume) #pragma alloc_text(PAGE, DeviceHandleReadDvdStructure) #pragma alloc_text(PAGE, ReadDvdStructure) #pragma alloc_text(PAGE, DeviceHandleDvdEndSession) #pragma alloc_text(PAGE, DeviceHandleDvdStartSessionReadKey) #pragma alloc_text(PAGE, DvdStartSessionReadKey) #pragma alloc_text(PAGE, DeviceHandleDvdSendKey) #pragma alloc_text(PAGE, DvdSendKey) #pragma alloc_text(PAGE, DeviceHandleSetReadAhead) #pragma alloc_text(PAGE, DeviceHandleSetSpeed) #pragma alloc_text(PAGE, RequestHandleExclusiveAccessQueryLockState) #pragma alloc_text(PAGE, RequestHandleExclusiveAccessLockDevice) #pragma alloc_text(PAGE, RequestHandleExclusiveAccessUnlockDevice) #pragma alloc_text(PAGE, RequestHandleScsiPassThrough) #pragma alloc_text(PAGE, RequestGetScsiPassThroughCdb) #pragma alloc_text(PAGE, GetConfigurationDataConversionTypeAllToTypeOne) #pragma alloc_text(PAGE, GetConfigurationDataSynthesize) #endif NTSTATUS RequestHandleUnknownIoctl( _In_ WDFDEVICE Device, _In_ WDFREQUEST Request ) /*++ Routine Description: All unknown IOCTLs will be forward to lower level driver. Arguments: Device - device object Request - request to be handled Return Value: NTSTATUS --*/ { NTSTATUS status = STATUS_UNSUCCESSFUL; PCDROM_DEVICE_EXTENSION deviceExtension = DeviceGetExtension(Device); PCDROM_REQUEST_CONTEXT requestContext = RequestGetContext(Request); BOOLEAN syncRequired = requestContext->SyncRequired; ULONG sendOptionsFlags = 0; BOOLEAN requestSent = FALSE; WdfRequestFormatRequestUsingCurrentType(Request); if (syncRequired) { sendOptionsFlags = WDF_REQUEST_SEND_OPTION_SYNCHRONOUS; } else { WdfRequestSetCompletionRoutine(Request, RequestDummyCompletionRoutine, NULL); } status = RequestSend(deviceExtension, Request, deviceExtension->IoTarget, sendOptionsFlags, &requestSent); if (requestSent) { if (syncRequired) { // the request needs to be completed here. RequestCompletion(deviceExtension, Request, status, WdfRequestGetInformation(Request)); } } else { // failed to send the request to IoTarget RequestCompletion(deviceExtension, Request, status, WdfRequestGetInformation(Request)); } return status; } _IRQL_requires_max_(APC_LEVEL) BOOLEAN DeviceIsPlayActive( _In_ WDFDEVICE Device ) /*++ Routine Description: This routine determines if the cd is currently playing music. Arguments: Device - Device object. Return Value: BOOLEAN - TRUE if the device is playing music. --*/ { NTSTATUS status = STATUS_SUCCESS; PCDROM_DEVICE_EXTENSION deviceExtension = DeviceGetExtension(Device); PSUB_Q_CURRENT_POSITION currentBuffer; size_t bytesRead = 0; PAGED_CODE (); // if we don't think it is playing audio, don't bother checking. if (!deviceExtension->DeviceAdditionalData.PlayActive) { return FALSE; } // Allocate the required memory NT_ASSERT(sizeof(SUB_Q_CURRENT_POSITION) >= sizeof(CDROM_SUB_Q_DATA_FORMAT)); currentBuffer = ExAllocatePoolWithTag(NonPagedPoolNxCacheAligned, sizeof(SUB_Q_CURRENT_POSITION), CDROM_TAG_PLAY_ACTIVE); if (currentBuffer == NULL) { return FALSE; } // set the options in the output buffer format ((PCDROM_SUB_Q_DATA_FORMAT) currentBuffer)->Format = IOCTL_CDROM_CURRENT_POSITION; ((PCDROM_SUB_Q_DATA_FORMAT) currentBuffer)->Track = 0; // Send SCSI command to read Q Channel information. status = ReadQChannel(deviceExtension, NULL, currentBuffer, sizeof(CDROM_SUB_Q_DATA_FORMAT), currentBuffer, sizeof(SUB_Q_CURRENT_POSITION), &bytesRead); if (!NT_SUCCESS(status)) { ExFreePool(currentBuffer); return FALSE; } // update the playactive flag appropriately if (currentBuffer->Header.AudioStatus == AUDIO_STATUS_IN_PROGRESS) { deviceExtension->DeviceAdditionalData.PlayActive = TRUE; } else { deviceExtension->DeviceAdditionalData.PlayActive = FALSE; } ExFreePool(currentBuffer); return deviceExtension->DeviceAdditionalData.PlayActive; } NTSTATUS RequestHandleGetInquiryData( _In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request,
评论
    相关推荐
    • qpopper2.53.tar.Z
      pop3 server
    • imap-4.7.tar.Z
      被广泛使用的email服务器 /IMAPD/POPD
    • 53308459Add_Dlt_TabCtrl.rar
      Tab分页的删除和添加,实现分页动态的管理。
    • ns-allinone-2.33.tar.gz
      ns2.33这是目前比较新的ns2版本,欢迎下载
    • NetVideoActiveX23.rar
      海康威视 网络监控插件 带有例子 和开发的dll文件,非常易用
    • UR054g_(R01).zip
      法国inventel的ur054g(r01)v1.1的无线网卡驱动。
    • eat.rar
      外卖叫餐系统,采用ACCESS数据库,有完整天的后台管理系统
    • KSTVTUNE.ZIP
      装摄像头驱动需要用到的文件。Microsoft DirectX 9 SDK
    • Skin++.rar
      知名的Skin++界面库,内含所有库文件和大量皮肤文件.该库使用方便,可以减少您美化程序的痛苦.本版是破解版,没有注册提示.但只供学习研究使用哦,不要用在商业用途.
    • DLL函数查看器V2.0.rar
      DLL函数查看器V2.0 可以看看dll里导出地函数