Update TestMcro sample to target a single architecture and support best practices (#837)

* Update TestMcro sample to target a single architecture.

* Update copywia.cmd to use the new path for the TestMcro.inf file.

* Restore missing BOM to vcxproj file.
This commit is contained in:
alexke-dev 2023-01-18 11:51:27 -08:00 коммит произвёл GitHub
Родитель 8cfa11c4cc
Коммит b35c9d1327
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 9 добавлений и 76 удалений

Просмотреть файл

@ -70,7 +70,7 @@ rem WIA 1.0
rem
copy microdrv\%build_samples%\%cpu_samples%\testmcro.dll %1wiabins\drivers
copy microdrv\testmcro.inf %1wiabins\drivers
copy microdrv\%build_samples%\%cpu_samples%\testmcro.inf %1wiabins\drivers
copy "%build_tools%\%cpu_tools%\wiatest.exe" %1wiabins
if /I "%DDK_TARGET_OS%" EQU "WinXP" (

Просмотреть файл

@ -1,74 +0,0 @@
; TESTMCRO.INF -- WIA sample MicroDriver scanner setup file
; Copyright (c) 2001 Microsoft Corporation
; Manufacturer: Microsoft
[Version]
Signature="$WINDOWS NT$"
Class=Image
ClassGUID={6bdd1fc6-810f-11d0-bec7-08002be2092f}
Provider=%ProviderString%
DriverVer=11/02/2007,1.0.0.1
CatalogFile=testmcro.cat
PnpLockdown=1
[SourceDisksFiles.x86]
testmcro.dll=1
[SourceDisksNames.x86]
1=%Location%,,,
[SourceDisksFiles.amd64]
testmcro.dll=1
[SourceDisksNames.amd64]
1=%Location%,,,
[DestinationDirs]
; By default, files will be copied to \windows\system32.
DefaultDestDir=11
[Manufacturer]
%ManufacturerName%=Models, NTx86, NTamd64
; This is the models section for the x86 driver
[Models.NTx86]
%WIASample.DeviceDesc% = WIASample.Scanner, PnPIDInformation
; This is the models section for the amd64 driver
[Models.NTamd64]
%WIASample.DeviceDesc% = WIASample.Scanner, PnPIDInformation
[WIASample.Scanner]
Include=sti.inf
Needs=STI.SerialSection, STI.MICRODRIVERSection
SubClass=StillImage
DeviceType=1
DeviceSubType=0x1
Capabilities=0x30
Events=WIASample.Events
DeviceData=WIASample.DeviceData
AddReg=WIASample.AddReg
CopyFiles=WIASample.CopyFiles
ICMProfiles="sRGB Color Space Profile.icm"
[WIASample.Events]
[WIASample.Scanner.Services]
Include=sti.inf
Needs=STI.SerialSection.Services
[WIASample.DeviceData]
Server=local
UI Class ID={4DB1AD10-3391-11D2-9A33-00C04FA36145}
MicroDriver="TESTMCRO.DLL"
Sample Entry=1,1
[WIASample.AddReg]
HKR,,HardwareConfig,1,1
[WIASample.CopyFiles]
testmcro.dll
[Strings]
ManufacturerName="TODO-Set-Manufacturer"
ProviderString="TODO-Set-Provider"
Location="Install Source"
WIASample.DeviceDesc="WIA Sample MicroDriver Scanner Device"

Двоичные данные
wia/microdrv/testmcro.inx Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -74,7 +74,14 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<ItemGroup Label="WrappedTaskItems" />
<ItemGroup Label="WrappedTaskItems">
<Inf Include="testmcro.inx">
<Architecture>$(InfArch)</Architecture>
<SpecifyArchitecture>true</SpecifyArchitecture>
<Verbose>true</Verbose>
<CopyOutput>.\$(IntDir)\testmcro.inf</CopyOutput>
</Inf>
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetName>testmcro</TargetName>
</PropertyGroup>