[STORPROP][CDROM_NEW][DISK_NEW] Improve disk and cdrom device installation

- Take a proper inf file for disk.sys
- Add class information into cdrom.inf
- Make a correct stub for storprop!DvdClassInstaller
This commit is contained in:
Victor Perevertkin 2020-11-03 23:12:40 +03:00
parent d887308b2f
commit da4ee18cc9
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
4 changed files with 191 additions and 102 deletions

View file

@ -32,6 +32,18 @@ DiskClassInstaller(
return ERROR_DI_DO_DEFAULT; return ERROR_DI_DO_DEFAULT;
} }
DWORD
WINAPI
DvdClassInstaller(
_In_ DI_FUNCTION InstallFunction,
_In_ HDEVINFO DeviceInfoSet,
_In_ PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
{
DPRINT("DvdClassInstaller(%u %p %p)\n",
InstallFunction, DeviceInfoSet, DeviceInfoData);
return ERROR_DI_DO_DEFAULT;
}
BOOL BOOL
WINAPI WINAPI

View file

@ -3,7 +3,7 @@
@ stub CdromIsDigitalPlaybackEnabled @ stub CdromIsDigitalPlaybackEnabled
@ stdcall DiskClassInstaller(long ptr ptr) @ stdcall DiskClassInstaller(long ptr ptr)
@ stdcall DllMain(ptr long ptr) @ stdcall DllMain(ptr long ptr)
@ stub DvdClassInstaller @ stdcall DvdClassInstaller(long ptr ptr)
@ stub DvdLauncher @ stub DvdLauncher
@ stub DvdPropPageProvider @ stub DvdPropPageProvider
@ stub IdePropPageProvider @ stub IdePropPageProvider

View file

@ -3,13 +3,13 @@
; ;
[Version] [Version]
Signature = "$WINDOWS NT$" Signature = "$WINDOWS NT$"
LayoutFile = layout.inf LayoutFile = layout.inf
Class = CDROM Class = CDROM
ClassGuid = {4D36E965-E325-11CE-BFC1-08002BE10318} ClassGUID = {4D36E965-E325-11CE-BFC1-08002BE10318}
Provider = %MSFT% Provider = %MSFT%
; Git commit 96eb96d @ https://github.com/microsoft/Windows-driver-samples ; Git commit 96eb96d @ https://github.com/microsoft/Windows-driver-samples
DriverVer = 08/11/2016, 1.0 DriverVer = 08/11/2016, 1.0
;[SourceDisksNames] ;[SourceDisksNames]
;3426=windows cd ;3426=windows cd
@ -19,6 +19,18 @@ DriverVer = 08/11/2016, 1.0
[DestinationDirs] [DestinationDirs]
cdrom_copyfiles = 12 cdrom_copyfiles = 12
storprop_CopyFiles.NT = 11
[ClassInstall32.NT]
AddReg = CDROMClass.NT.AddReg
Copyfiles = storprop_CopyFiles.NT
[CDROMClass.NT.AddReg]
HKR, , , 0, %CDROMClassName%
HKR, , Icon, 0, "-51"
HKR, , Installer32, 0, "storprop.dll,DvdClassInstaller"
HKR, , NoInstallClass, 0, 1
HKR, , SilentInstall, 0, 1
[cdrom_copyfiles] [cdrom_copyfiles]
cdrom.sys,,,0x100 cdrom.sys,,,0x100
@ -27,8 +39,10 @@ cdrom.sys,,,0x100
BasicDriverOk=* BasicDriverOk=*
[Manufacturer] [Manufacturer]
%MITSUMI% = mitsumi_cdrom,NT$ARCH$ %MITSUMI% = mitsumi_cdrom,NT
%GenManufacturer% = cdrom_device,NT$ARCH$ %GenManufacturer% = cdrom_device,NT
;%MITSUMI% = mitsumi_cdrom,NT$ARCH$
;%GenManufacturer% = cdrom_device,NT$ARCH$
;[mitsumi_cdrom.NT$ARCH$] ;[mitsumi_cdrom.NT$ARCH$]
[mitsumi_cdrom.NT] [mitsumi_cdrom.NT]
@ -135,13 +149,17 @@ AddReg=autorun_addreg
[cdrom_EventLog_InstallSection] [cdrom_EventLog_InstallSection]
;AddReg=cdrom_EventLog_AddReg ;AddReg=cdrom_EventLog_AddReg
;[cdrom_EventLog_AddReg] [cdrom_EventLog_AddReg]
;HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll" HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll"
;HKR,,TypesSupported,0x00010001,7 HKR,,TypesSupported,0x00010001,7
[storprop_CopyFiles.NT]
storprop.dll
[Strings] [Strings]
MSFT = "Microsoft" MSFT = "Microsoft"
CDROMClassName = "DVD/CD-ROM drives"
;; Manufacturer specific strings ;; Manufacturer specific strings
MITSUMI = "Mitsumi" MITSUMI = "Mitsumi"

View file

@ -1,10 +1,9 @@
; DISK.INF ;
; Copyright (c) Microsoft Corporation. All rights reserved.
; Installation of DISK DRIVESs ;
[Version] [Version]
Signature = "$Windows NT$" Signature = "$WINDOWS NT$"
;Signature = "$ReactOS$"
LayoutFile = layout.inf LayoutFile = layout.inf
Class = DiskDrive Class = DiskDrive
ClassGUID = {4D36E967-E325-11CE-BFC1-08002BE10318} ClassGUID = {4D36E967-E325-11CE-BFC1-08002BE10318}
@ -12,8 +11,27 @@ Provider = %MSFT%
; Git commit 3428c5f @ https://github.com/microsoft/Windows-driver-samples ; Git commit 3428c5f @ https://github.com/microsoft/Windows-driver-samples
DriverVer = 08/29/2018, 1.0 DriverVer = 08/29/2018, 1.0
;[SourceDisksNames]
;3426=windows cd
;[SourceDisksFiles]
;disk.sys = 3426
;;
;; 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\disk","AutoRunAlwaysDisable", 0x00010008, "Brother RemovableDisk(U)"
[disk_copyfiles]
disk.sys,,,0x100
[DestinationDirs] [DestinationDirs]
disk_CopyFiles.NT = 12 disk_copyfiles=12
storprop_CopyFiles.NT = 11 storprop_CopyFiles.NT = 11
[ClassInstall32.NT] [ClassInstall32.NT]
@ -22,108 +40,149 @@ Copyfiles = storprop_CopyFiles.NT
[DiskClass.NT.AddReg] [DiskClass.NT.AddReg]
HKR, , , 0, %DiskClassName% HKR, , , 0, %DiskClassName%
HKR, , Installer32, 0, "storprop.dll,DiskClassInstaller"
HKR, , Icon, 0, "-53" HKR, , Icon, 0, "-53"
HKR, , Installer32, 0, "storprop.dll,DiskClassInstaller"
HKR, , NoInstallClass, 0, 1 HKR, , NoInstallClass, 0, 1
HKR, , SilentInstall, 0, 1 HKR, , SilentInstall, 0, 1
[ControlFlags]
BasicDriverOk=*
[Manufacturer] [Manufacturer]
%GenericMfg% = GenericMfg %GenManufacturer%=disk_device,NT
%Compaq%=compaq,NT
%Mylex%=mylex,NT
;%GenManufacturer%=disk_device,NT$ARCH$
;%Compaq%=compaq,NT$ARCH$
;%Mylex%=mylex,NT$ARCH$
[GenericMfg] ;[disk_device.NT$ARCH$]
%Disk.DeviceDesc% = disk_Inst,GenDisk [disk_device.NT]
%OpticalDisk.DeviceDesc% = disk_Inst,GenOptical %disk_devdesc% = disk_install, GenDisk
%opticaldisk_devdesc% = disk_install, GenOptical
%disk_devdesc% = disk_install, USBSTOR\DiskSony____MSC-U01_________
%disk_devdesc% = disk_install, USBSTOR\DiskSony____MSC-U01N________
%disk_devdesc% = media_unlockable_disk_install, IDE\DiskIOMEGA_ZIP_100__________________________
%disk_devdesc% = media_unlockable_disk_install, SCSI\DiskIOMEGA__ZIP_100_________
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\FUJITSU&DynaMO-FE_OPTICAL_DRIVE&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\&SYM13FW500-DISK_DRIVE&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\&WDxxxA001RTL-Disk_Drive&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\MAC_TECHNOLOGIESINC.&MAC_THIN_FIREWIRE_DRIVE&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\VST_TECHNOLOGIESINC.&VST_THIN_FIREWIRE_DRIVE&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\Sony&PCVA-HD04&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\LSI_Logic&SYM13FW500-DISK_DRIVE&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\MELCO_INC&1394MEL-HD_DRIVE_&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\MELCO_INC&1394MEL-HD_DRIVE&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\MELCO_INC&1394MEL-MO_DRIVE_&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\LOGITEC&LMO-PFU&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\LOGITEC&LMO-AF&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\OXFW900_&LHD-SF__&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\LOGITEC&LHD-PFU&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\LOGITEC&LHD_AF&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\I-O_DATA_DEVICE_INC.&1394_Converter__&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\API-903-95__&1394_Storage_+_Repeater_&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install, SBP2\Sony&PCVA-HD08A&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_surprise_removal_disk_install, LEXARUSB\GenDisk
%disk_devdesc% = expect_surprise_removal_disk_install, SCSI\DiskToshiba_SD_Mem_Driver___
%disk_devdesc% = disk_install_VHD_drive, SCSI\DiskMsft____Virtual_Disk____
;----------------------------- DISK DRIVER ----------------------------- ;[compaq.NT$ARCH$]
[compaq.NT]
%compaq_array.DeviceDesc% = disk_install, SCSI\DiskCompaq__Disk_Array______
[disk_Inst.NT] ;[mylex.NT$ARCH$]
CopyFiles = disk_CopyFiles.NT [mylex.NT]
%mylex_array.DeviceDesc% = disk_install, SCSI\DiskMYLEX___
[disk_Inst.NT.Services] [media_unlockable_disk_install.NT]
AddService = disk, 2, disk_Service_Inst CopyFiles=disk_copyfiles
[disk_Service_Inst] [media_unlockable_disk_install.NT.Services]
DisplayName = %Disk.ServiceDesc% AddService=disk,2,disk_ServiceInstallSection,disk_EventLog_InstallSection
ServiceType = 1
StartType = 0
ErrorControl = 1
ServiceBinary = %12%\disk.sys
[disk_CopyFiles.NT] [media_unlockable_disk_install.NT.HW]
disk.sys AddReg=media_unlockable_disk_install_HW.AddReg
;---------------------------- DISK INSTALLER ---------------------------- [media_unlockable_disk_install_HW.AddReg]
HKR,"Classpnp","HackMask",0x00010001,0x1 ; Device cannot lock media
[expect_orderly_removal_disk_install.NT]
CopyFiles=disk_copyfiles
[expect_orderly_removal_disk_install.NT.Services]
AddService=disk,2,disk_ServiceInstallSection,disk_EventLog_InstallSection
[expect_orderly_removal_disk_install.NT.HW]
AddReg=expect_orderly_removal_disk_install_HW.AddReg
[expect_orderly_removal_disk_install_HW.AddReg]
HKR,,"RemovalPolicy",0x00010001,0x2 ; ExpectOrderlyRemoval
[expect_surprise_removal_disk_install.NT]
CopyFiles=disk_copyfiles
[expect_surprise_removal_disk_install.NT.Services]
AddService=disk,2,disk_ServiceInstallSection,disk_EventLog_InstallSection
[expect_surprise_removal_disk_install.NT.HW]
AddReg=expect_surprise_removal_disk_install_HW.AddReg
[expect_surprise_removal_disk_install_HW.AddReg]
HKR,,"RemovalPolicy",0x00010001,0x3 ; ExpectSurpriseRemoval
[disk_install_VHD_drive.NT]
CopyFiles=disk_copyfiles
[disk_install_VHD_drive.NT.Services]
AddService=disk,2,disk_ServiceInstallSection,disk_EventLog_InstallSection
[disk_install_VHD_drive.NT.HW]
AddReg=disk_install_VHD_drive.AddReg
[disk_install_VHD_drive.AddReg]
HKR,,"FriendlyName",,%VHD_Generic_FriendlyName% ; Give VHD drives a more friendly name
[disk_install.NT]
CopyFiles=disk_copyfiles
ExcludeId=GenSFloppy,SCSI\DiskMATSHITALS-120_COSM___04,SCSI\DiskCOMPAQ__LS-120_VER5___AB
ExcludeId=SCSI\DiskCOMPAQ__LS-120_HIMA___01,SCSI\DiskMATSHITALS-120_VER5___00
ExcludeId=SCSI\DiskMATSHITALS-120/240____00
DiskCiPrivateData=4
[disk_install.NT.Services]
AddService=disk,2,disk_ServiceInstallSection,disk_EventLog_InstallSection
[disk_ServiceInstallSection]
DisplayName=%disk_ServiceDesc%
ServiceType=1
StartType=0
ErrorControl=1
ServiceBinary = %12%\disk.sys
AddReg=autorun_addreg
[disk_EventLog_InstallSection]
;AddReg=disk_EventLog_AddReg
[disk_EventLog_AddReg]
HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll"
HKR,,TypesSupported,0x00010001,7
[storprop_CopyFiles.NT] [storprop_CopyFiles.NT]
storprop.dll storprop.dll
;-------------------------------- STRINGS -------------------------------
[Strings] [Strings]
ReactOS = "ReactOS Team" MSFT="Microsoft"
GenericMfg = "(Generic Disk Drives)" DiskClassName="Disk drives"
DiskClassName = "Disk Drives" GenManufacturer="(Standard disk drives)"
Disk.DeviceDesc = "Disk Drive" Compaq="Compaq"
OpticalDisk.DeviceDesc = "Optical Disk Drive" Mylex="Mylex"
Disk.ServiceDesc = "Disk Driver"
[Strings.0405] disk_devdesc="Disk drive"
GenericMfg = "(Obecné diskové jednotky)" opticaldisk_devdesc="Optical disk drive"
DiskClassName = "Diskové jednotky"
Disk.DeviceDesc = "Disková jednotka"
OpticalDisk.DeviceDesc = "Optická disková jednotka"
Disk.ServiceDesc = "Ovladač disku"
[Strings.0a] disk_ServiceDesc="Disk Driver"
ReactOS = "Equipo de ReactOS" compaq_array.DeviceDesc = "Compaq SCSI Drive Array"
GenericMfg = "(Unidades de disco genéricas)" mylex_array.DeviceDesc = "Mylex RAID Disk Device"
DiskClassName = "Unidades de disco"
Disk.DeviceDesc = "Unidad de disco"
OpticalDisk.DeviceDesc = "Unidad de disco óptico"
Disk.ServiceDesc = "Controlador de disco"
[Strings.0415] VHD_Generic_FriendlyName = "Microsoft Virtual Disk"
ReactOS = "Zespół ReactOS"
GenericMfg = "(Standardowy dysk twardy)"
DiskClassName = "Dyski twarde"
Disk.DeviceDesc = "Dysk twardy"
OpticalDisk.DeviceDesc = "Dysk optyczny"
Disk.ServiceDesc = "Sterownik dysku"
[Strings.0418]
ReactOS = "Echipa ReactOS"
GenericMfg = "(dispozitiv disc generic)"
DiskClassName = "Dispozitive disc"
Disk.DeviceDesc = "Dispozitiv disc"
OpticalDisk.DeviceDesc = "Dispozitiv disc optic"
Disk.ServiceDesc = "Modúl-pilot de disc"
[Strings.0419]
ReactOS = "Команда ReactOS"
GenericMfg = "(Стандартные дисковые накопители)"
DiskClassName = "Дисковые устройства"
Disk.DeviceDesc = "Дисковое устройство"
OpticalDisk.DeviceDesc = "Оптическое дисковое устройство"
Disk.ServiceDesc = "Драйвер диска"
[Strings.041f]
ReactOS = "ReactOS Takımı"
GenericMfg = "(Umûmî Disk Sürücüleri)"
DiskClassName = "Disk Sürücüleri"
Disk.DeviceDesc = "Disk Sürücüsü"
OpticalDisk.DeviceDesc = "Optik Disk Sürücüsü"
Disk.ServiceDesc = "Disk Sürücüsü"
[Strings.0422]
ReactOS = "Команда ReactOS"
GenericMfg = "(Стандартні приводи дисків)"
DiskClassName = "Дискові приводи"
Disk.DeviceDesc = "Дисковий привід"
OpticalDisk.DeviceDesc = "Оптичний привід дисків"
Disk.ServiceDesc = "Драйвер диску"
[Strings.0804]
GenericMfg = "(通用磁盘驱动器)"
Disk.DeviceDesc = "磁盘驱动器"
OpticalDisk.DeviceDesc = "光盘驱动器"
Disk.ServiceDesc = "磁盘驱动器"