diff options
| author | Wei Mao <[email protected]> | 2023-01-15 15:37:52 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-01-15 15:37:52 -0800 |
| commit | 13092c638c30acbe2dec7d4be53d0d0d5bfb7487 (patch) | |
| tree | 4c421bbb5a5e47fac8390e52ced2c8e924aa76b6 /general | |
| parent | 8ff2c86adcfbe50187d2aeb38a842095b137b7e4 (diff) | |
| parent | 217e46c9844145bf0bee397a916ddc5bffe26d02 (diff) | |
Merge pull request #834 - Update WDF samples to use DIRID=13 (Driver Store)
## Why is this change being made?
[Driver package isolation](https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/driver-isolation) is a requirement for Windows Drivers that makes driver packages more resilient to external changes, easier to update, and more straightforward to install.
One of such requirements is to for driver to [run from the driver store](https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/run-from-driver-store), which means to use `DIRID = 13` in INF file, `DestinationDirs` section and `ServiceBinary` directive.
## What changed?
Update generic WDF samples to use DIRID = 13. Specifically, it touches the following sample folders:
- general, toaster, usb, hid, input, serial, pofx, spb, wmi
Note it does not touch areas that are owned by individual driver classes, e.g., network, storage, file system.
This change does mean that the sample **won't work on older OS** (prior to Win10 version 1809) where DIRID 13 is not fully supported. To find the original sample, please look at https://github.com/microsoft/Windows-driver-samples/tree/win11-22h2.
Diffstat (limited to 'general')
16 files changed, 42 insertions, 34 deletions
diff --git a/general/PLX9x5x/sys/pci9x5x.inx b/general/PLX9x5x/sys/pci9x5x.inx Binary files differindex 675a2a2c..2446271e 100644 --- a/general/PLX9x5x/sys/pci9x5x.inx +++ b/general/PLX9x5x/sys/pci9x5x.inx diff --git a/general/echo/kmdf/driver/AutoSync/echo.inx b/general/echo/kmdf/driver/AutoSync/echo.inx Binary files differindex bfb3b356..970462a3 100644 --- a/general/echo/kmdf/driver/AutoSync/echo.inx +++ b/general/echo/kmdf/driver/AutoSync/echo.inx diff --git a/general/echo/kmdf/driver/DriverSync/echo_2.inx b/general/echo/kmdf/driver/DriverSync/echo_2.inx Binary files differindex ea524f85..bb73b485 100644 --- a/general/echo/kmdf/driver/DriverSync/echo_2.inx +++ b/general/echo/kmdf/driver/DriverSync/echo_2.inx diff --git a/general/echo/umdf2/driver/AutoSync/echoum.inx b/general/echo/umdf2/driver/AutoSync/echoum.inx Binary files differindex cae8b45f..ccfe6a7e 100644 --- a/general/echo/umdf2/driver/AutoSync/echoum.inx +++ b/general/echo/umdf2/driver/AutoSync/echoum.inx diff --git a/general/pcidrv/kmdf/genpci.inx b/general/pcidrv/kmdf/genpci.inx Binary files differindex 1ccf8ca9..db6e5c55 100644 --- a/general/pcidrv/kmdf/genpci.inx +++ b/general/pcidrv/kmdf/genpci.inx diff --git a/general/toaster/toastDrv/kmdf/bus/dynamic/dynambus.inx b/general/toaster/toastDrv/kmdf/bus/dynamic/dynambus.inx Binary files differindex c51e1e9b..912596fd 100644 --- a/general/toaster/toastDrv/kmdf/bus/dynamic/dynambus.inx +++ b/general/toaster/toastDrv/kmdf/bus/dynamic/dynambus.inx diff --git a/general/toaster/toastDrv/kmdf/bus/static/statbus.inx b/general/toaster/toastDrv/kmdf/bus/static/statbus.inx Binary files differindex a28b3144..7a7053ae 100644 --- a/general/toaster/toastDrv/kmdf/bus/static/statbus.inx +++ b/general/toaster/toastDrv/kmdf/bus/static/statbus.inx diff --git a/general/toaster/toastDrv/kmdf/filter/filter.inx b/general/toaster/toastDrv/kmdf/filter/filter.inx Binary files differindex d579ff7e..7958ef4d 100644 --- a/general/toaster/toastDrv/kmdf/filter/filter.inx +++ b/general/toaster/toastDrv/kmdf/filter/filter.inx diff --git a/general/toaster/toastDrv/kmdf/func/featured/wdffeatured.inx b/general/toaster/toastDrv/kmdf/func/featured/wdffeatured.inx Binary files differindex 73a1a1ea..4b7f091f 100644 --- a/general/toaster/toastDrv/kmdf/func/featured/wdffeatured.inx +++ b/general/toaster/toastDrv/kmdf/func/featured/wdffeatured.inx diff --git a/general/toaster/toastDrv/kmdf/func/simple/wdfsimple.inx b/general/toaster/toastDrv/kmdf/func/simple/wdfsimple.inx Binary files differindex 69fbea75..22ef9301 100644 --- a/general/toaster/toastDrv/kmdf/func/simple/wdfsimple.inx +++ b/general/toaster/toastDrv/kmdf/func/simple/wdfsimple.inx diff --git a/general/toaster/toastDrv/kmdf/toastmon/wdftoastmon.inx b/general/toaster/toastDrv/kmdf/toastmon/wdftoastmon.inx Binary files differindex cfee1b11..2986b5e4 100644 --- a/general/toaster/toastDrv/kmdf/toastmon/wdftoastmon.inx +++ b/general/toaster/toastDrv/kmdf/toastmon/wdftoastmon.inx diff --git a/general/toaster/toastpkg/inf/toastpkg.inf b/general/toaster/toastpkg/inf/toastpkg.inf index 04ac6103..a2a1982c 100644 --- a/general/toaster/toastpkg/inf/toastpkg.inf +++ b/general/toaster/toastpkg/inf/toastpkg.inf @@ -18,6 +18,9 @@ ; This is a mutlios INF file. Same INF file cab be used on ; x86, ia64 and amd64 platforms. ; +; Important: +; This INF depends on features for the Driver Store DIRIDs which are available starting Windows 10 1809 +; ;--*/ [Version] Signature="$WINDOWS NT$" @@ -28,15 +31,29 @@ DriverVer=09/21/2006,6.0.5736.1 CatalogFile.NTx86 = tostx86.cat CatalogFile.NTIA64 = tostia64.cat CatalogFile.NTAMD64 = tstamd64.cat +PnpLockdown = 1 [DestinationDirs] -DefaultDestDir = 12 +DefaultDestDir = 13 CoInstaller_CopyFiles = 11 +[SourceDisksNames.x86] +1 = %DiskId1%, toastpkg.tag,,\i386 + +[SourceDisksNames.ia64] +1 = %DiskId1%, toastpkg.tag,,\ia64 + +[SourceDisksNames.amd64] +1 = %DiskId1%, toastpkg.tag,,\amd64 + +[SourceDisksFiles] +toaster.sys = 1,, +tostrco2.dll = 1,, + ; ================= Class section ===================== [ClassInstall32] -Addreg=ToasterClassReg +Addreg=ToasterClassReg CopyFiles=ToasterClassInstallerCopyFiles [ToasterClassReg] @@ -82,9 +99,9 @@ AddService = toaster, %SPSVCINST_ASSOCSERVICE%, toaster_Service_Inst [toaster_Service_Inst] DisplayName = %toaster.SVCDESC% ServiceType = 1 ; SERVICE_KERNEL_DRIVER -StartType = 3 ; SERVICE_DEMAND_START +StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL -ServiceBinary = %12%\toaster.sys +ServiceBinary = %13%\toaster.sys ;-------------- Coinstaller installation @@ -103,19 +120,6 @@ HKR,,CoInstallers32,0x00010000,"tostrco2.dll,ToasterCoInstaller" ; located (so it can launch value-added setup programs). OriginalInfSourcePath = %1% -[SourceDisksNames.x86] -1 = %DiskId1%, toastpkg.tag,,\i386 - -[SourceDisksNames.ia64] -1 = %DiskId1%, toastpkg.tag,,\ia64 - -[SourceDisksNames.amd64] -1 = %DiskId1%, toastpkg.tag,,\amd64 - -[SourceDisksFiles] -toaster.sys = 1,, -tostrco2.dll = 1,, - [Strings] SPSVCINST_ASSOCSERVICE= 0x00000002 ProviderName = "TODO-Set-Provider" diff --git a/general/toaster/toastpkg/toastcd/toastpkg.inf b/general/toaster/toastpkg/toastcd/toastpkg.inf index 04ac6103..a2a1982c 100644 --- a/general/toaster/toastpkg/toastcd/toastpkg.inf +++ b/general/toaster/toastpkg/toastcd/toastpkg.inf @@ -18,6 +18,9 @@ ; This is a mutlios INF file. Same INF file cab be used on ; x86, ia64 and amd64 platforms. ; +; Important: +; This INF depends on features for the Driver Store DIRIDs which are available starting Windows 10 1809 +; ;--*/ [Version] Signature="$WINDOWS NT$" @@ -28,15 +31,29 @@ DriverVer=09/21/2006,6.0.5736.1 CatalogFile.NTx86 = tostx86.cat CatalogFile.NTIA64 = tostia64.cat CatalogFile.NTAMD64 = tstamd64.cat +PnpLockdown = 1 [DestinationDirs] -DefaultDestDir = 12 +DefaultDestDir = 13 CoInstaller_CopyFiles = 11 +[SourceDisksNames.x86] +1 = %DiskId1%, toastpkg.tag,,\i386 + +[SourceDisksNames.ia64] +1 = %DiskId1%, toastpkg.tag,,\ia64 + +[SourceDisksNames.amd64] +1 = %DiskId1%, toastpkg.tag,,\amd64 + +[SourceDisksFiles] +toaster.sys = 1,, +tostrco2.dll = 1,, + ; ================= Class section ===================== [ClassInstall32] -Addreg=ToasterClassReg +Addreg=ToasterClassReg CopyFiles=ToasterClassInstallerCopyFiles [ToasterClassReg] @@ -82,9 +99,9 @@ AddService = toaster, %SPSVCINST_ASSOCSERVICE%, toaster_Service_Inst [toaster_Service_Inst] DisplayName = %toaster.SVCDESC% ServiceType = 1 ; SERVICE_KERNEL_DRIVER -StartType = 3 ; SERVICE_DEMAND_START +StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL -ServiceBinary = %12%\toaster.sys +ServiceBinary = %13%\toaster.sys ;-------------- Coinstaller installation @@ -103,19 +120,6 @@ HKR,,CoInstallers32,0x00010000,"tostrco2.dll,ToasterCoInstaller" ; located (so it can launch value-added setup programs). OriginalInfSourcePath = %1% -[SourceDisksNames.x86] -1 = %DiskId1%, toastpkg.tag,,\i386 - -[SourceDisksNames.ia64] -1 = %DiskId1%, toastpkg.tag,,\ia64 - -[SourceDisksNames.amd64] -1 = %DiskId1%, toastpkg.tag,,\amd64 - -[SourceDisksFiles] -toaster.sys = 1,, -tostrco2.dll = 1,, - [Strings] SPSVCINST_ASSOCSERVICE= 0x00000002 ProviderName = "TODO-Set-Provider" diff --git a/general/toaster/umdf2/filter/generic/filterum.inx b/general/toaster/umdf2/filter/generic/filterum.inx Binary files differindex 0efeb0d3..db5e7a28 100644 --- a/general/toaster/umdf2/filter/generic/filterum.inx +++ b/general/toaster/umdf2/filter/generic/filterum.inx diff --git a/general/toaster/umdf2/func/featured/wdffeaturedum.inx b/general/toaster/umdf2/func/featured/wdffeaturedum.inx Binary files differindex bb8af311..2c251ffd 100644 --- a/general/toaster/umdf2/func/featured/wdffeaturedum.inx +++ b/general/toaster/umdf2/func/featured/wdffeaturedum.inx diff --git a/general/toaster/umdf2/func/simple/wdfsimpleum.inx b/general/toaster/umdf2/func/simple/wdfsimpleum.inx Binary files differindex 3187b27f..8f28fbaa 100644 --- a/general/toaster/umdf2/func/simple/wdfsimpleum.inx +++ b/general/toaster/umdf2/func/simple/wdfsimpleum.inx |
