summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralexke-dev <[email protected]>2023-01-18 11:51:27 -0800
committerGitHub <[email protected]>2023-01-18 11:51:27 -0800
commitb35c9d13274e237eea8abdd5fb06c5f29429fddb (patch)
tree2d9ce27f1104a39458cd9fdd270e91eb0016a1d7
parent8cfa11c4cc71344667cb797ee46101a988972e03 (diff)
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.
-rw-r--r--wia/copywia.cmd2
-rw-r--r--wia/microdrv/testmcro.inf74
-rw-r--r--wia/microdrv/testmcro.inxbin0 -> 3240 bytes
-rw-r--r--wia/microdrv/testmcro.vcxproj9
4 files changed, 9 insertions, 76 deletions
diff --git a/wia/copywia.cmd b/wia/copywia.cmd
index df37a38c..999e8719 100644
--- a/wia/copywia.cmd
+++ b/wia/copywia.cmd
@@ -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" (
diff --git a/wia/microdrv/testmcro.inf b/wia/microdrv/testmcro.inf
deleted file mode 100644
index 741c3bb4..00000000
--- a/wia/microdrv/testmcro.inf
+++ /dev/null
@@ -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"
diff --git a/wia/microdrv/testmcro.inx b/wia/microdrv/testmcro.inx
new file mode 100644
index 00000000..5cd679a7
--- /dev/null
+++ b/wia/microdrv/testmcro.inx
Binary files differ
diff --git a/wia/microdrv/testmcro.vcxproj b/wia/microdrv/testmcro.vcxproj
index 4fedb7a2..aba1deda 100644
--- a/wia/microdrv/testmcro.vcxproj
+++ b/wia/microdrv/testmcro.vcxproj
@@ -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>