Sample Code

Windows Driver Samples/ CDROM Storage Class Driver/ C++/ src/ cdrom.inf/

;
; Copyright (c) Microsoft Corporation.  All rights reserved.
;

[Version]
Signature = "$WINDOWS NT$"
Class     = CDROM
ClassGuid = {4D36E965-E325-11CE-BFC1-08002BE10318}
Provider  = %MSFT%
DriverVer = WILL_BE_FIXED_UP_BY_STAMPINF

[SourceDisksNames]
3426=windows cd

[SourceDisksFiles]
cdrom.sys         = 3426

[DestinationDirs]
cdrom_copyfiles   = 12

[cdrom_copyfiles]
cdrom.sys,,,0x100

[ControlFlags]
BasicDriverOk=*

[Manufacturer]
%MITSUMI%         = mitsumi_cdrom,NT$ARCH$
%GenManufacturer% = cdrom_device,NT$ARCH$

[mitsumi_cdrom.NT$ARCH$]
%Mitsumi_cdrom_devdesc%    = mitsumi_install,IDE\CdRomMITSUMI_CD-ROM________!A________________

[cdrom_device.NT$ARCH$]
;;
;; if none of the above matched, then only cdrom.sys is required for this drive
;;
%gencdrom_devdesc%         = cdrom_install,SCSI\WormPIONEER_CD-WO_DR-R504X__
%gencdrom_devdesc%         = cdrom_install,SCSI\WormSONY____CD-R___CDU920S__
%gencdrom_devdesc%         = cdrom_install,SCSI\WormSONY____CD-R___CDU948S__
%gencdrom_devdesc%         = cdrom_install,GenCdRom
%gencdrom_devdesc%         = cdrom_install_NoSlumber,IDE\TSSTcorp_CDDVDW_TS-L633B________________AC01____
%gencdrom_devdesc%         = cdrom_install_ISO_drive,SCSI\CdRomMsft____Virtual_DVD-ROM_

;;
;; Use to add filter drivers for the device
;;

[mitsumi_addreg]
HKR,,"FriendlyName",,%Mitsumi_Generic_FriendlyName%

;;
;; Give ISO drives a more friendly name
;;

[ISO_addreg]
HKR,,"FriendlyName",,%ISO_Generic_FriendlyName%

;;
;; The AutoRunAlwaysDisable key is only for use when the hardware cannot
;; accepts  TEST_UNIT_READY  commands.  Disabling 'AutoRun' or including
;; devices in this list will prevent removable media services from being
;; able to properly handle these devices.
;;

[autorun_addreg]
HKLM,"System\CurrentControlSet\Services\cdrom","AutoRun",0x00010003,1
HKLM,"System\CurrentControlSet\Services\cdrom","AutoRunAlwaysDisable", 0x00010008, "NEC     MBR-7   "
HKLM,"System\CurrentControlSet\Services\cdrom","AutoRunAlwaysDisable", 0x00010008, "NEC     MBR-7.4 "
HKLM,"System\CurrentControlSet\Services\cdrom","AutoRunAlwaysDisable", 0x00010008, "PIONEER CHANGR DRM-1804X"
HKLM,"System\CurrentControlSet\Services\cdrom","AutoRunAlwaysDisable", 0x00010008, "PIONEER CD-ROM DRM-6324X"
HKLM,"System\CurrentControlSet\Services\cdrom","AutoRunAlwaysDisable", 0x00010008, "PIONEER CD-ROM DRM-624X "
HKLM,"System\CurrentControlSet\Services\cdrom","AutoRunAlwaysDisable", 0x00010008, "TORiSAN CD-ROM CDR_C36"

;;
;; Use to disable synchronous transfers to this device.  Sync transfers will
;; always be turned off by default in this INF for any cdrom-type device
;;

[nosync_addreg]
HKR,,"DefaultRequestFlags",0x00010001,8
HKR,"Storport","MinimumIdleTimeoutInMS",0x00010001,0

;;
;; Installation section for mitsumi.
;;

[mitsumi_install]
CopyFiles=cdrom_copyfiles

[mitsumi_install.HW]
AddReg=nosync_addreg,mitsumi_addreg

[mitsumi_install.Services]
Needs=cdrom_install.Services

;;
;; Installation section for generic cdrom.
;;

[cdrom_install]
CopyFiles=cdrom_copyfiles

[cdrom_install.HW]
AddReg=nosync_addreg

[cdrom_install.Services]
AddService=cdrom,0x00000002,cdrom_ServiceInstallSection,cdrom_EventLog_InstallSection

[cdrom_install_NoSlumber]
CopyFiles=cdrom_copyfiles
AddPowerSetting=DisableSlumberSetting

[cdrom_install_NoSlumber.HW]
AddReg=nosync_addreg

[cdrom_install_NoSlumber.Services]
AddService=cdrom,0x00000002,cdrom_ServiceInstallSection,cdrom_EventLog_InstallSection

[cdrom_install_ISO_drive]
CopyFiles=cdrom_copyfiles

[cdrom_install_ISO_drive.HW]
AddReg=nosync_addreg,ISO_addreg

[cdrom_install_ISO_drive.Services]
AddService=cdrom,0x00000002,cdrom_ServiceInstallSection,cdrom_EventLog_InstallSection

;;
;; Service install sections
;;

[cdrom_ServiceInstallSection]
DisplayName   = %cdrom_ServiceDesc%
ServiceType   = 1
StartType     = 1
ErrorControl  = 1
ServiceBinary = %12%\cdrom.sys
LoadOrderGroup = "SCSI CDROM Class"
AddReg=autorun_addreg

[cdrom_EventLog_InstallSection]
AddReg=cdrom_EventLog_AddReg

[cdrom_EventLog_AddReg]
HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll"
HKR,,TypesSupported,0x00010001,7


[DisableSlumberSetting]
Subgroup = {0012ee47-9041-4b5d-9b77-535fba8b1442}
; LPM: Disable Slumber

Setting =  {DAB60367-53FE-4fbc-825E-521D069D2456}, "AHCI Link Power Management - Adaptive", "Automatically transit from Partial to Slumber.",,0x00000001
; range 0 to 5 minutes (unit: ms)
ValueRange = 0, 300000, 1, "millisecond"

; High Performance
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 0, 0
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 1, 0
; Balanced
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 0, 0
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 1, 0
; Power Saving
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 0, 0
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 1, 0


[Strings]
MSFT        = "Microsoft"

;; Manufacturer specific strings
MITSUMI         = "Mitsumi"
GenManufacturer = "(Standard CD-ROM drives)"

;; Descriptions for enumerated brands and models
Mitsumi_cdrom_devdesc    = "Mitsumi CD-ROM Drive"
gencdrom_devdesc         = "CD-ROM Drive"

;; Friendly names
Mitsumi_Generic_FriendlyName = "Mitsumi CD-ROM Drive"
ISO_Generic_FriendlyName = "Microsoft Virtual DVD-ROM"

;; Service descriptions
cdrom_ServiceDesc   = "CD-ROM Driver"

Our Services

  • What our customers say about us?

© 2011-2024 All Rights Reserved. Joya Systems. 4425 South Mopac Building II Suite 101 Austin, TX 78735 Tel: 800-DEV-KERNEL

Privacy Policy. Terms of use. Valid XHTML & CSS