diff --git a/Build-SampleSet.ps1 b/Build-SampleSet.ps1
index 0892cc846..c279148a7 100644
--- a/Build-SampleSet.ps1
+++ b/Build-SampleSet.ps1
@@ -105,9 +105,7 @@ else {
#
# After 22621 those warnings are put under a common flag: /samples
#
-# Additionally after 22621 we have to temporarily suppress /sw1402 due to one specific sample "biometrics".
-#
-$InfVerif_AdditionalOptions=($build_number -le 22621 ? "/sw1284 /sw1285 /sw1293 /sw2083 /sw2086" : "/samples /sw1402")
+$InfVerif_AdditionalOptions=($build_number -le 22621 ? "/sw1284 /sw1285 /sw1293 /sw2083 /sw2086" : "/samples")
#
# Determine exclusions.
diff --git a/biometrics/Package/package.VcxProj b/biometrics/Package/package.VcxProj
deleted file mode 100644
index fb98576d7..000000000
--- a/biometrics/Package/package.VcxProj
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
-
-
- {22EED378-7FE9-4946-A653-05BB1EE20717}
-
-
- {321860DA-56D9-427A-A5C2-346DFE8FB529}
-
-
- {339A0554-2E3D-4A12-B45C-8E2D7D59D7C2}
-
-
- {474A1976-0414-48E7-9F2B-4FDED5BA700C}
-
-
-
- WindowsKernelModeDriver10.0
- Utility
- Package
- true
- Debug
-
-
-
- {93931C7A-00DC-4E0F-8D54-06A960AF23FC}
- {A1648E68-56F1-41FA-903C-F64C87787413}
- $(MSBuildProjectName)
-
-
- Windows10
- true
-
-
- Windows10
- false
-
-
- Windows10
- true
-
-
- Windows10
- false
-
-
-
-
-
-
-
-
-
-
- DbgengRemoteDebugger
- False
- None
-
-
-
-
-
- %PathToInf%
- False
- False
- True
-
- 133563
-
-
-
- sha256
-
-
-
-
- sha256
-
-
-
-
- sha256
-
-
-
-
- sha256
-
-
-
-
-
-
\ No newline at end of file
diff --git a/biometrics/Package/package.VcxProj.Filters b/biometrics/Package/package.VcxProj.Filters
deleted file mode 100644
index fc0e5c564..000000000
--- a/biometrics/Package/package.VcxProj.Filters
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*
- {7DC6547C-49AA-4ABD-B48E-1C589CF982E2}
-
-
- h;hpp;hxx;hm;inl;inc;xsd
- {98781539-8891-4798-9778-6AF2451E1062}
-
-
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml
- {3D1F0D76-620A-4046-A834-772C416DE4E5}
-
-
- inf;inv;inx;mof;mc;
- {7FA33C20-27C2-45C8-AD85-B5686078DB41}
-
-
-
\ No newline at end of file
diff --git a/biometrics/README.md b/biometrics/README.md
deleted file mode 100644
index abf0235e6..000000000
--- a/biometrics/README.md
+++ /dev/null
@@ -1,80 +0,0 @@
----
-page_type: sample
-description: "Contains the Windows Biometric Driver Interface sample and the Windows Biometric Service Adapter samples."
-languages:
-- cpp
-products:
-- windows
-- windows-wdk
----
-
-# Windows Biometric Driver Samples (UMDF Version 1)
-
-The Windows Biometric Driver Samples contain the Windows Biometric Driver Interface sample and the Windows Biometric Service Adapter samples.
-
-## Windows Biometric Driver Interface
-
-This sample implements the Windows Biometric Driver Interface (WBDI). It contains skeleton code for handling the mandatory IOCTLs necessary to interoperate with the Windows Biometric Framework. A WBDI driver can be deployed in conjunction with an engine adapter DLL to allow a sensor to be exposed from the Windows Biometric Framework. This sample has been written to make use of the UMDF framework, which allows for ease of development and system stability.
-
-## Windows Biometric Service Adapters
-
-These samples provide skeleton code that developers can use as a basis for writing Sensor, Engine, and Storage Adapters for the Windows Biometric Service. Note that the stubs in these samples are non-functional, and Adapter writers will need to follow the programming guidelines in the WinBio Service documentation in order produce a working Adapter component.
-
-## Build the sample
-
-For information on how to build a driver solution using Microsoft Visual Studio, see [Building a Driver with Visual Studio and the WDK](https://docs.microsoft.com/windows-hardware/drivers/develop/building-a-driver).
-
-> [!NOTE]
-> You can obtain the co-installers by downloading the *wdfcoinstaller.msi* package from [WDK 8 Redistributable Components](https://go.microsoft.com/fwlink/p/?LinkID=253170).
-
-## Installation
-
-### Windows Biometric Driver Interface installation
-
-The sample requires the use of a suitable fingerprint sensor. It does not capture real data, but it does create a biometric unit in the Windows Biometric Framework.
-
-### Windows Biometric Service Adapters installation
-
-To write and test an Adapter plug-in, it will be necessary to have a biometric device and a working WBDI driver for the device.
-
-Adapters are generally installed along with the WBDI driver for the corresponding device. Consult the WinBio Service documentation for information on the INF file commands used for installing Adapters. Note that Adapters are trusted plug-in components, so they can only be installed using a privileged account.
-
-## Design and operation
-
-### Windows Biometric Driver Interface
-
-This sample is taken from the UMDF FX2 sample and has been modified to expose WBDI. It has the necessary hooks to make this a WBDI driver:
-
-- Installs WBDI driver, including correct class GUID settings and icons, and registry settings for Windows Biometric Framework configuration.
-- Publishes WBDI device interface.
-- Supports all the mandatory [WBDI IOCTLs](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/_biometric/#ioctls).
-- Supports cancellation.
-- Can be opened with exclusivity.
-
-All of these things are required for the Windows Biometric Framework service to recognize this device as a biometric device and set up a Biometric Unit. It allows the service to properly control the device.
-
-The sample makes use of ATL support for simplified handling of COM objects with UMDF.
-
-The driver makes use of a parallel queue so that multiple requests can be outstanding at once.
-
-It uses device level-locking to simplify internal thread synchronization. This means that only one framework callback can be active at a time.
-
-It supports cancellation of any IOCTL which may be I/O intensive, particularly a capture IOCTL. This sample does not have a real capture mechanism, so it is simulated by a 5 second delay returning a capture IOCTL. Cancellation is supported through the mechanism exposed by WUDF, with a callback for a request object. Cancellation support is required for all IOCTLs.
-
-There are hooks for all [WBDI IOCTLs](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/_biometric/#ioctls), including the optional IOCTLs.
-
-PnP is very simple for this driver. It needs to only implement **OnPrepareHardware** and **OnReleaseHardware** from **IPnpCallbackHardware**.
-
-Some device drivers may need to keep several pending reads to the WinUsb I/O target in order to properly flush all I/O that comes from the device during a capture.
-
-### Windows Biometric Service Adapters
-
-WinBio Adapters are plug-in components that provide a standard interface layer between the Windows Biometric Service and a biometric device. The WinBio Service recognizes three types of Adapters:
-
-- Sensor Adapters - expose the sample-capture capabilities of the biometric device.
-- Engine Adapters - expose the sample manipulation, template generation, and matching capabilities of the device.
-- Storage Adapters - expose the template storage and retrieval capabilities of the device.
-
-For many simple biometric devices, it will only be necessary to write a WBDI driver for the device plus an Engine Adapter to perform matching operations. Consult the programming guidelines in the WinBio Service documentation for more details.
-
-Each Adapter sample contains a well-known interface-discovery function, whose job is to return the address of a function dispatch table. When the WinBio Service loads an Adapter plug-in, it uses the interface-discovery function to locate the dispatch table, and then calls various methods in the table to communicate with the biometric device. The purpose, arguments, and return codes of each Adapter method are described in the WinBio Service programming guidelines. More information on adapter plug-ins is available at [WBDI Plug-in Reference](https://docs.microsoft.com/windows/desktop/SecBioMet/plug-in-reference).
diff --git a/biometrics/WBDIsample.sln b/biometrics/WBDIsample.sln
deleted file mode 100644
index 98de6df9d..000000000
--- a/biometrics/WBDIsample.sln
+++ /dev/null
@@ -1,90 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0
-MinimumVisualStudioVersion = 12.0
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Package", "Package", "{2E5F1FF5-DA6C-4935-8389-17811F54BC28}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Storage_adapter", "Storage_adapter", "{AB84BCF3-9781-47FE-9AF0-8D96FF6F27DE}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Adapters", "Adapters", "{B6C842E0-023A-40CE-84EA-76C0A7B366FD}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sensor_adapter", "Sensor_adapter", "{CFF6A5A2-CF3E-413B-A36E-3B4B81657D5D}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine_adapter", "Engine_adapter", "{15B79D52-B6B0-431E-AA93-EAF3D204EB81}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Driver", "Driver", "{038A4A81-D088-4E25-AEE5-93D35BF5B25C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "package", "Package\package.VcxProj", "{93931C7A-00DC-4E0F-8D54-06A960AF23FC}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StorageAdapter", "adapters\storage_adapter\StorageAdapter.vcxproj", "{339A0554-2E3D-4A12-B45C-8E2D7D59D7C2}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SensorAdapter", "adapters\sensor_adapter\SensorAdapter.vcxproj", "{321860DA-56D9-427A-A5C2-346DFE8FB529}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EngineAdapter", "adapters\engine_adapter\EngineAdapter.vcxproj", "{22EED378-7FE9-4946-A653-05BB1EE20717}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WudfBioUsbSample", "driver\WudfBioUsbSample.vcxproj", "{474A1976-0414-48E7-9F2B-4FDED5BA700C}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- Debug|x64 = Debug|x64
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {93931C7A-00DC-4E0F-8D54-06A960AF23FC}.Debug|Win32.ActiveCfg = Debug|Win32
- {93931C7A-00DC-4E0F-8D54-06A960AF23FC}.Debug|Win32.Build.0 = Debug|Win32
- {93931C7A-00DC-4E0F-8D54-06A960AF23FC}.Release|Win32.ActiveCfg = Release|Win32
- {93931C7A-00DC-4E0F-8D54-06A960AF23FC}.Release|Win32.Build.0 = Release|Win32
- {93931C7A-00DC-4E0F-8D54-06A960AF23FC}.Debug|x64.ActiveCfg = Debug|x64
- {93931C7A-00DC-4E0F-8D54-06A960AF23FC}.Debug|x64.Build.0 = Debug|x64
- {93931C7A-00DC-4E0F-8D54-06A960AF23FC}.Release|x64.ActiveCfg = Release|x64
- {93931C7A-00DC-4E0F-8D54-06A960AF23FC}.Release|x64.Build.0 = Release|x64
- {339A0554-2E3D-4A12-B45C-8E2D7D59D7C2}.Debug|Win32.ActiveCfg = Debug|Win32
- {339A0554-2E3D-4A12-B45C-8E2D7D59D7C2}.Debug|Win32.Build.0 = Debug|Win32
- {339A0554-2E3D-4A12-B45C-8E2D7D59D7C2}.Release|Win32.ActiveCfg = Release|Win32
- {339A0554-2E3D-4A12-B45C-8E2D7D59D7C2}.Release|Win32.Build.0 = Release|Win32
- {339A0554-2E3D-4A12-B45C-8E2D7D59D7C2}.Debug|x64.ActiveCfg = Debug|x64
- {339A0554-2E3D-4A12-B45C-8E2D7D59D7C2}.Debug|x64.Build.0 = Debug|x64
- {339A0554-2E3D-4A12-B45C-8E2D7D59D7C2}.Release|x64.ActiveCfg = Release|x64
- {339A0554-2E3D-4A12-B45C-8E2D7D59D7C2}.Release|x64.Build.0 = Release|x64
- {321860DA-56D9-427A-A5C2-346DFE8FB529}.Debug|Win32.ActiveCfg = Debug|Win32
- {321860DA-56D9-427A-A5C2-346DFE8FB529}.Debug|Win32.Build.0 = Debug|Win32
- {321860DA-56D9-427A-A5C2-346DFE8FB529}.Release|Win32.ActiveCfg = Release|Win32
- {321860DA-56D9-427A-A5C2-346DFE8FB529}.Release|Win32.Build.0 = Release|Win32
- {321860DA-56D9-427A-A5C2-346DFE8FB529}.Debug|x64.ActiveCfg = Debug|x64
- {321860DA-56D9-427A-A5C2-346DFE8FB529}.Debug|x64.Build.0 = Debug|x64
- {321860DA-56D9-427A-A5C2-346DFE8FB529}.Release|x64.ActiveCfg = Release|x64
- {321860DA-56D9-427A-A5C2-346DFE8FB529}.Release|x64.Build.0 = Release|x64
- {22EED378-7FE9-4946-A653-05BB1EE20717}.Debug|Win32.ActiveCfg = Debug|Win32
- {22EED378-7FE9-4946-A653-05BB1EE20717}.Debug|Win32.Build.0 = Debug|Win32
- {22EED378-7FE9-4946-A653-05BB1EE20717}.Release|Win32.ActiveCfg = Release|Win32
- {22EED378-7FE9-4946-A653-05BB1EE20717}.Release|Win32.Build.0 = Release|Win32
- {22EED378-7FE9-4946-A653-05BB1EE20717}.Debug|x64.ActiveCfg = Debug|x64
- {22EED378-7FE9-4946-A653-05BB1EE20717}.Debug|x64.Build.0 = Debug|x64
- {22EED378-7FE9-4946-A653-05BB1EE20717}.Release|x64.ActiveCfg = Release|x64
- {22EED378-7FE9-4946-A653-05BB1EE20717}.Release|x64.Build.0 = Release|x64
- {474A1976-0414-48E7-9F2B-4FDED5BA700C}.Debug|Win32.ActiveCfg = Debug|Win32
- {474A1976-0414-48E7-9F2B-4FDED5BA700C}.Debug|Win32.Build.0 = Debug|Win32
- {474A1976-0414-48E7-9F2B-4FDED5BA700C}.Release|Win32.ActiveCfg = Release|Win32
- {474A1976-0414-48E7-9F2B-4FDED5BA700C}.Release|Win32.Build.0 = Release|Win32
- {474A1976-0414-48E7-9F2B-4FDED5BA700C}.Debug|x64.ActiveCfg = Debug|x64
- {474A1976-0414-48E7-9F2B-4FDED5BA700C}.Debug|x64.Build.0 = Debug|x64
- {474A1976-0414-48E7-9F2B-4FDED5BA700C}.Release|x64.ActiveCfg = Release|x64
- {474A1976-0414-48E7-9F2B-4FDED5BA700C}.Release|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {93931C7A-00DC-4E0F-8D54-06A960AF23FC} = {2E5F1FF5-DA6C-4935-8389-17811F54BC28}
- {339A0554-2E3D-4A12-B45C-8E2D7D59D7C2} = {AB84BCF3-9781-47FE-9AF0-8D96FF6F27DE}
- {321860DA-56D9-427A-A5C2-346DFE8FB529} = {CFF6A5A2-CF3E-413B-A36E-3B4B81657D5D}
- {22EED378-7FE9-4946-A653-05BB1EE20717} = {15B79D52-B6B0-431E-AA93-EAF3D204EB81}
- {474A1976-0414-48E7-9F2B-4FDED5BA700C} = {038A4A81-D088-4E25-AEE5-93D35BF5B25C}
- {AB84BCF3-9781-47FE-9AF0-8D96FF6F27DE} = {B6C842E0-023A-40CE-84EA-76C0A7B366FD}
- {CFF6A5A2-CF3E-413B-A36E-3B4B81657D5D} = {B6C842E0-023A-40CE-84EA-76C0A7B366FD}
- {15B79D52-B6B0-431E-AA93-EAF3D204EB81} = {B6C842E0-023A-40CE-84EA-76C0A7B366FD}
- EndGlobalSection
-EndGlobal
diff --git a/biometrics/adapters/engine_adapter/EngineAdapter.cpp b/biometrics/adapters/engine_adapter/EngineAdapter.cpp
deleted file mode 100644
index 229611248..000000000
--- a/biometrics/adapters/engine_adapter/EngineAdapter.cpp
+++ /dev/null
@@ -1,665 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- EngineAdapter.cpp
-
-Abstract:
-
- This module contains a stub implementation of an Engine Adapter
- plug-in for the Windows Biometric service.
-
-Author:
-
- -
-
-Environment:
-
- Win32, user mode only.
-
-Revision History:
-
-NOTES:
-
- (None)
-
---*/
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Header files...
-//
-///////////////////////////////////////////////////////////////////////////////
-#include "precomp.h"
-#include "winbio_adapter.h"
-#include "EngineAdapter.h"
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Forward declarations for the Engine Adapter's interface routines...
-//
-///////////////////////////////////////////////////////////////////////////////
-static HRESULT
-WINAPI
-EngineAdapterAttach(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-EngineAdapterDetach(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-EngineAdapterClearContext(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-EngineAdapterEndOperation(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-EngineAdapterQueryPreferredFormat(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_REGISTERED_FORMAT StandardFormat,
- _Out_ PWINBIO_UUID VendorFormat
- );
-
-static HRESULT
-WINAPI
-EngineAdapterQueryIndexVectorSize(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PSIZE_T IndexElementCount
- );
-
-static HRESULT
-WINAPI
-EngineAdapterQueryHashAlgorithms(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PSIZE_T AlgorithmCount,
- _Out_ PSIZE_T AlgorithmBufferSize,
- _Out_ PUCHAR *AlgorithmBuffer
- );
-
-static HRESULT
-WINAPI
-EngineAdapterSetHashAlgorithm(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ SIZE_T AlgorithmBufferSize,
- _In_ PUCHAR AlgorithmBuffer
- );
-
-static HRESULT
-WINAPI
-EngineAdapterAcceptSampleHint(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PSIZE_T SampleHint
- );
-
-static HRESULT
-WINAPI
-EngineAdapterAcceptSampleData(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_BIR SampleBuffer,
- _In_ SIZE_T SampleSize,
- _In_ WINBIO_BIR_PURPOSE Purpose,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- );
-
-static HRESULT
-WINAPI
-EngineAdapterExportEngineData(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ WINBIO_BIR_DATA_FLAGS Flags,
- _Out_ PWINBIO_BIR *SampleBuffer,
- _Out_ PSIZE_T SampleSize
- );
-
-static HRESULT
-WINAPI
-EngineAdapterVerifyFeatureSet(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_IDENTITY Identity,
- _In_ WINBIO_BIOMETRIC_SUBTYPE SubFactor,
- _Out_ PBOOLEAN Match,
- _Out_ PUCHAR *PayloadBlob,
- _Out_ PSIZE_T PayloadBlobSize,
- _Out_ PUCHAR *HashValue,
- _Out_ PSIZE_T HashSize,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- );
-
-static HRESULT
-WINAPI
-EngineAdapterIdentifyFeatureSet(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_IDENTITY Identity,
- _Out_ PWINBIO_BIOMETRIC_SUBTYPE SubFactor,
- _Out_ PUCHAR *PayloadBlob,
- _Out_ PSIZE_T PayloadBlobSize,
- _Out_ PUCHAR *HashValue,
- _Out_ PSIZE_T HashSize,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- );
-
-static HRESULT
-WINAPI
-EngineAdapterCreateEnrollment(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-EngineAdapterUpdateEnrollment(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- );
-
-static HRESULT
-WINAPI
-EngineAdapterGetEnrollmentStatus(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- );
-
-static HRESULT
-WINAPI
-EngineAdapterGetEnrollmentHash(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PUCHAR *HashValue,
- _Out_ PSIZE_T HashSize
- );
-
-static HRESULT
-WINAPI
-EngineAdapterCheckForDuplicate(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_IDENTITY Identity,
- _Out_ PWINBIO_BIOMETRIC_SUBTYPE SubFactor,
- _Out_ PBOOLEAN Duplicate
- );
-
-static HRESULT
-WINAPI
-EngineAdapterCommitEnrollment(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_IDENTITY Identity,
- _In_ WINBIO_BIOMETRIC_SUBTYPE SubFactor,
- _In_ PUCHAR PayloadBlob,
- _In_ SIZE_T PayloadBlobSize
- );
-
-static HRESULT
-WINAPI
-EngineAdapterDiscardEnrollment(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-EngineAdapterControlUnit(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ ULONG ControlCode,
- _In_ PUCHAR SendBuffer,
- _In_ SIZE_T SendBufferSize,
- _In_ PUCHAR ReceiveBuffer,
- _In_ SIZE_T ReceiveBufferSize,
- _Out_ PSIZE_T ReceiveDataSize,
- _Out_ PULONG OperationStatus
- );
-
-static HRESULT
-WINAPI
-EngineAdapterControlUnitPrivileged(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ ULONG ControlCode,
- _In_ PUCHAR SendBuffer,
- _In_ SIZE_T SendBufferSize,
- _In_ PUCHAR ReceiveBuffer,
- _In_ SIZE_T ReceiveBufferSize,
- _Out_ PSIZE_T ReceiveDataSize,
- _Out_ PULONG OperationStatus
- );
-//-----------------------------------------------------------------------------
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Interface dispatch table
-//
-///////////////////////////////////////////////////////////////////////////////
-static WINBIO_ENGINE_INTERFACE g_EngineInterface = {
- WINBIO_ENGINE_INTERFACE_VERSION_1,
- WINBIO_ADAPTER_TYPE_ENGINE,
- sizeof(WINBIO_ENGINE_INTERFACE),
- {0xb876fdc8, 0x34e7, 0x471a, {0x82, 0xc8, 0x9c, 0xba, 0x6a, 0x35, 0x38, 0xec}},
-
- EngineAdapterAttach,
- EngineAdapterDetach,
- EngineAdapterClearContext,
- EngineAdapterQueryPreferredFormat,
- EngineAdapterQueryIndexVectorSize,
- EngineAdapterQueryHashAlgorithms,
- EngineAdapterSetHashAlgorithm,
- EngineAdapterAcceptSampleHint,
- EngineAdapterAcceptSampleData,
- EngineAdapterExportEngineData,
- EngineAdapterVerifyFeatureSet,
- EngineAdapterIdentifyFeatureSet,
- EngineAdapterCreateEnrollment,
- EngineAdapterUpdateEnrollment,
- EngineAdapterGetEnrollmentStatus,
- EngineAdapterGetEnrollmentHash,
- EngineAdapterCheckForDuplicate,
- EngineAdapterCommitEnrollment,
- EngineAdapterDiscardEnrollment,
- EngineAdapterControlUnit,
- EngineAdapterControlUnitPrivileged
-};
-//-----------------------------------------------------------------------------
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Mandatory DLL entrypoint function.
-//
-///////////////////////////////////////////////////////////////////////////////
-BOOL APIENTRY
-DllMain(
- HANDLE ModuleHandle,
- DWORD ReasonForCall,
- LPVOID Reserved
- )
-{
- UNREFERENCED_PARAMETER(ModuleHandle);
- UNREFERENCED_PARAMETER(ReasonForCall);
- UNREFERENCED_PARAMETER(Reserved);
-
- return TRUE;
-}
-//-----------------------------------------------------------------------------
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Well-known interface-discovery function exported by the Engine Adapter
-//
-///////////////////////////////////////////////////////////////////////////////
-HRESULT
-WINAPI
-WbioQueryEngineInterface(
- _Out_ PWINBIO_ENGINE_INTERFACE *EngineInterface
- )
-{
- *EngineInterface = &g_EngineInterface;
- return S_OK;
-}
-//-----------------------------------------------------------------------------
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Engine Adapter action routines
-//
-///////////////////////////////////////////////////////////////////////////////
-static HRESULT
-WINAPI
-EngineAdapterAttach(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterDetach(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterClearContext(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterQueryPreferredFormat(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_REGISTERED_FORMAT StandardFormat,
- _Out_ PWINBIO_UUID VendorFormat
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(StandardFormat);
- UNREFERENCED_PARAMETER(VendorFormat);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterQueryIndexVectorSize(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PSIZE_T IndexElementCount
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(IndexElementCount);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterQueryHashAlgorithms(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PSIZE_T AlgorithmCount,
- _Out_ PSIZE_T AlgorithmBufferSize,
- _Out_ PUCHAR *AlgorithmBuffer
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(AlgorithmCount);
- UNREFERENCED_PARAMETER(AlgorithmBufferSize);
- UNREFERENCED_PARAMETER(AlgorithmBuffer);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterSetHashAlgorithm(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ SIZE_T AlgorithmBufferSize,
- _In_ PUCHAR AlgorithmBuffer
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(AlgorithmBufferSize);
- UNREFERENCED_PARAMETER(AlgorithmBuffer);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterAcceptSampleHint(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PSIZE_T SampleHint
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(SampleHint);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterAcceptSampleData(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_BIR SampleBuffer,
- _In_ SIZE_T SampleSize,
- _In_ WINBIO_BIR_PURPOSE Purpose,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(SampleBuffer);
- UNREFERENCED_PARAMETER(SampleSize);
- UNREFERENCED_PARAMETER(Purpose);
- UNREFERENCED_PARAMETER(RejectDetail);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterExportEngineData(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ WINBIO_BIR_DATA_FLAGS Flags,
- _Out_ PWINBIO_BIR *SampleBuffer,
- _Out_ PSIZE_T SampleSize
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(Flags);
- UNREFERENCED_PARAMETER(SampleBuffer);
- UNREFERENCED_PARAMETER(SampleSize);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterVerifyFeatureSet(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_IDENTITY Identity,
- _In_ WINBIO_BIOMETRIC_SUBTYPE SubFactor,
- _Out_ PBOOLEAN Match,
- _Out_ PUCHAR *PayloadBlob,
- _Out_ PSIZE_T PayloadBlobSize,
- _Out_ PUCHAR *HashValue,
- _Out_ PSIZE_T HashSize,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(Identity);
- UNREFERENCED_PARAMETER(SubFactor);
- UNREFERENCED_PARAMETER(Match);
- UNREFERENCED_PARAMETER(PayloadBlob);
- UNREFERENCED_PARAMETER(PayloadBlobSize);
- UNREFERENCED_PARAMETER(HashValue);
- UNREFERENCED_PARAMETER(HashSize);
- UNREFERENCED_PARAMETER(RejectDetail);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterIdentifyFeatureSet(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_IDENTITY Identity,
- _Out_ PWINBIO_BIOMETRIC_SUBTYPE SubFactor,
- _Out_ PUCHAR *PayloadBlob,
- _Out_ PSIZE_T PayloadBlobSize,
- _Out_ PUCHAR *HashValue,
- _Out_ PSIZE_T HashSize,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(Identity);
- UNREFERENCED_PARAMETER(SubFactor);
- UNREFERENCED_PARAMETER(PayloadBlob);
- UNREFERENCED_PARAMETER(PayloadBlobSize);
- UNREFERENCED_PARAMETER(HashValue);
- UNREFERENCED_PARAMETER(HashSize);
- UNREFERENCED_PARAMETER(RejectDetail);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterCreateEnrollment(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterUpdateEnrollment(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(RejectDetail);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterGetEnrollmentStatus(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(RejectDetail);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterGetEnrollmentHash(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PUCHAR *HashValue,
- _Out_ PSIZE_T HashSize
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(HashValue);
- UNREFERENCED_PARAMETER(HashSize);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterCheckForDuplicate(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_IDENTITY Identity,
- _Out_ PWINBIO_BIOMETRIC_SUBTYPE SubFactor,
- _Out_ PBOOLEAN Duplicate
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(Identity);
- UNREFERENCED_PARAMETER(SubFactor);
- UNREFERENCED_PARAMETER(Duplicate);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterCommitEnrollment(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_IDENTITY Identity,
- _In_ WINBIO_BIOMETRIC_SUBTYPE SubFactor,
- _In_ PUCHAR PayloadBlob,
- _In_ SIZE_T PayloadBlobSize
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(Identity);
- UNREFERENCED_PARAMETER(SubFactor);
- UNREFERENCED_PARAMETER(PayloadBlob);
- UNREFERENCED_PARAMETER(PayloadBlobSize);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterDiscardEnrollment(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterControlUnit(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ ULONG ControlCode,
- _In_ PUCHAR SendBuffer,
- _In_ SIZE_T SendBufferSize,
- _In_ PUCHAR ReceiveBuffer,
- _In_ SIZE_T ReceiveBufferSize,
- _Out_ PSIZE_T ReceiveDataSize,
- _Out_ PULONG OperationStatus
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(ControlCode);
- UNREFERENCED_PARAMETER(SendBuffer);
- UNREFERENCED_PARAMETER(SendBufferSize);
- UNREFERENCED_PARAMETER(ReceiveBuffer);
- UNREFERENCED_PARAMETER(ReceiveBufferSize);
- UNREFERENCED_PARAMETER(ReceiveDataSize);
- UNREFERENCED_PARAMETER(OperationStatus);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-EngineAdapterControlUnitPrivileged(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ ULONG ControlCode,
- _In_ PUCHAR SendBuffer,
- _In_ SIZE_T SendBufferSize,
- _In_ PUCHAR ReceiveBuffer,
- _In_ SIZE_T ReceiveBufferSize,
- _Out_ PSIZE_T ReceiveDataSize,
- _Out_ PULONG OperationStatus
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(ControlCode);
- UNREFERENCED_PARAMETER(SendBuffer);
- UNREFERENCED_PARAMETER(SendBufferSize);
- UNREFERENCED_PARAMETER(ReceiveBuffer);
- UNREFERENCED_PARAMETER(ReceiveBufferSize);
- UNREFERENCED_PARAMETER(ReceiveDataSize);
- UNREFERENCED_PARAMETER(OperationStatus);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
diff --git a/biometrics/adapters/engine_adapter/EngineAdapter.def b/biometrics/adapters/engine_adapter/EngineAdapter.def
deleted file mode 100644
index 8f8b458fe..000000000
--- a/biometrics/adapters/engine_adapter/EngineAdapter.def
+++ /dev/null
@@ -1,4 +0,0 @@
-LIBRARY EngineAdapter
-
-EXPORTS
- WbioQueryEngineInterface
diff --git a/biometrics/adapters/engine_adapter/EngineAdapter.h b/biometrics/adapters/engine_adapter/EngineAdapter.h
deleted file mode 100644
index 1be2cd6d2..000000000
--- a/biometrics/adapters/engine_adapter/EngineAdapter.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- EngineAdapter.h
-
-Abstract:
-
- This module contains a stub implementation of an Engine Adapter
- plug-in for the Windows Biometric service.
-
-Author:
-
- -
-
-Environment:
-
- Win32, user mode only.
-
-Revision History:
-
-NOTES:
-
- (None)
-
---*/
-#pragma once
-
-#include "winbio_adapter.h"
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// The WINIBIO_ENGINE_CONTEXT structure is privately-defined by each
-// Engine Adapter. Its purpose is to maintain any information that
-// should persist across Engine Adapter API calls.
-//
-// The Adapter allocates and initializes one of these structures in its
-// 'Attach' routine and saves its address in the Pipeline->EngineContext
-// field.
-//
-// The Engine Adapter's 'Detach' routine cleans up and deallocates the
-// structure and sets the PipelineContext->EngineContext field to NULL.
-//
-///////////////////////////////////////////////////////////////////////////////
-typedef struct _WINIBIO_ENGINE_CONTEXT {
- //
- // The following fields illustrate the kind of information
- // the Engine Adapter needs to keep in this structure:
- //
- // FeatureSet - A processed description of a biometric
- // sample.
- //
- // Enrollment - An object that tracks the current state
- // of an in-progress enrollment operation.
- //
- // Template - A template either created from the Feature
- // Set or from the Enrollment object.
- //
- // Comparison - An object that tracks the result of a
- // one-to-one comparison between the Template
- // and the Feature Set.
- //
- PVOID x;
- PVOID y;
- PVOID z;
-
-} WINIBIO_ENGINE_CONTEXT, *PWINIBIO_ENGINE_CONTEXT;
-
diff --git a/biometrics/adapters/engine_adapter/EngineAdapter.rc b/biometrics/adapters/engine_adapter/EngineAdapter.rc
deleted file mode 100644
index d2a99f201..000000000
--- a/biometrics/adapters/engine_adapter/EngineAdapter.rc
+++ /dev/null
@@ -1,29 +0,0 @@
-//---------------------------------------------------------------------------
-// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
-// PARTICULAR PURPOSE.
-//
-// Copyright (c) Microsoft Corporation. All rights reserved
-//
-// BioUsbSample.rc
-//
-// Copyright (c) 2007 Microsoft Corporation, All Rights Reserved
-//---------------------------------------------------------------------------
-
-
-#include
-#include
-#include "resource.h"
-
-//
-// TODO: Change the file description and file names to match your binary.
-//
-
-#define VER_FILETYPE VFT_DLL
-#define VER_FILESUBTYPE VFT_UNKNOWN
-#define VER_FILEDESCRIPTION_STR "Engine Adapter Sample"
-#define VER_INTERNALNAME_STR "EngineAdapter"
-#define VER_ORIGINALFILENAME_STR "EngineAdapter.dll"
-
-#include "common.ver"
diff --git a/biometrics/adapters/engine_adapter/EngineAdapter.vcxproj b/biometrics/adapters/engine_adapter/EngineAdapter.vcxproj
deleted file mode 100644
index 4c462ac4c..000000000
--- a/biometrics/adapters/engine_adapter/EngineAdapter.vcxproj
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
-
- {22EED378-7FE9-4946-A653-05BB1EE20717}
- $(MSBuildProjectName)
- false
- true
- Debug
- Win32
- {9263013E-19E1-41D9-B085-8892CE56B9BB}
-
-
-
- Windows10
- False
- Windows Driver
-
- WindowsApplicationForDrivers10.0
- DynamicLibrary
-
-
- Windows10
- True
- Windows Driver
-
- WindowsApplicationForDrivers10.0
- DynamicLibrary
-
-
- Windows10
- False
- Windows Driver
-
- WindowsApplicationForDrivers10.0
- DynamicLibrary
-
-
- Windows10
- True
- Windows Driver
-
- WindowsApplicationForDrivers10.0
- DynamicLibrary
-
-
-
- $(IntDir)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- EngineAdapter
-
-
- EngineAdapter
-
-
- EngineAdapter
-
-
- EngineAdapter
-
-
-
- true
- Level4
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- true
- Level4
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- true
- Level4
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- true
- Level4
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib
- EngineAdapter.def
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib
- EngineAdapter.def
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib
- EngineAdapter.def
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib
- EngineAdapter.def
-
-
-
-
- ;%(AdditionalIncludeDirectories)
- precomp.h
- Use
- $(IntDir)\precomp.h.pch
-
-
- ;%(AdditionalIncludeDirectories)
- precomp.h
- Create
- $(IntDir)\precomp.h.pch
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/biometrics/adapters/engine_adapter/EngineAdapter.vcxproj.Filters b/biometrics/adapters/engine_adapter/EngineAdapter.vcxproj.Filters
deleted file mode 100644
index ab887f288..000000000
--- a/biometrics/adapters/engine_adapter/EngineAdapter.vcxproj.Filters
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*
- {010878EC-7BA3-41C4-B355-5556C237FDE3}
-
-
- h;hpp;hxx;hm;inl;inc;xsd
- {64493738-BBBD-46B2-995D-EF8EE18A251D}
-
-
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml
- {E0C063ED-18D1-4D6B-A62A-5E6CF79522C1}
-
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- Resource Files
-
-
-
\ No newline at end of file
diff --git a/biometrics/adapters/engine_adapter/precomp.h b/biometrics/adapters/engine_adapter/precomp.h
deleted file mode 100644
index c36eb36cd..000000000
--- a/biometrics/adapters/engine_adapter/precomp.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- precomp.h
-
-Abstract:
-
- This module contains identifies all the headers that
- shoulde be pre-compiled.
-
-Author:
-
- -
-
-Environment:
-
- Win32, user mode only.
-
-Revision History:
-
-NOTES:
-
- (None)
-
---*/
-#pragma once
-
-//
-// Necessary for compiling under VC.
-//
-#if(!defined(WINVER) || (WINVER < 0x0500))
- #undef WINVER
- #define WINVER 0x0500
-#endif
-#if(!defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500))
- #undef _WIN32_WINNT
- #define _WIN32_WINNT 0x0500
-#endif
-
-//
-// Required header files that shouldn't change often.
-//
-#include
-#include
-#include
-
-//
-// StrSafe.h needs to be included last
-// to disallow unsafe string functions.
-#include
-
-#ifndef ARGUMENT_PRESENT
-#define ARGUMENT_PRESENT(x) ((x) != NULL)
-#endif
diff --git a/biometrics/adapters/engine_adapter/precompsrc.cpp b/biometrics/adapters/engine_adapter/precompsrc.cpp
deleted file mode 100644
index 5944cf515..000000000
--- a/biometrics/adapters/engine_adapter/precompsrc.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "precomp.h"
\ No newline at end of file
diff --git a/biometrics/adapters/engine_adapter/resource.h b/biometrics/adapters/engine_adapter/resource.h
deleted file mode 100644
index 95ed37fa6..000000000
--- a/biometrics/adapters/engine_adapter/resource.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//---------------------------------------------------------------------------
-// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
-// PARTICULAR PURPOSE.
-//
-// Copyright (c) Microsoft Corporation. All rights reserved
-//
-// BioUsbSample.rc
-//
-// Copyright (c) 2007 Microsoft Corporation, All Rights Reserved
-//---------------------------------------------------------------------------
-
-#pragma once
-
diff --git a/biometrics/adapters/sensor_adapter/SensorAdapter.cpp b/biometrics/adapters/sensor_adapter/SensorAdapter.cpp
deleted file mode 100644
index 0e5345aaf..000000000
--- a/biometrics/adapters/sensor_adapter/SensorAdapter.cpp
+++ /dev/null
@@ -1,485 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- SensorAdapter.cpp
-
-Abstract:
-
- This module contains a stub implementation of a Sensor Adapter
- plug-in for the Windows Biometric service.
-
-Author:
-
- -
-
-Environment:
-
- Win32, user mode only.
-
-Revision History:
-
-NOTES:
-
- (None)
-
---*/
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Header files...
-//
-///////////////////////////////////////////////////////////////////////////////
-#include "precomp.h"
-#include "winbio_adapter.h"
-#include "SensorAdapter.h"
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Forward declarations for the Engine Adapter's interface routines...
-//
-///////////////////////////////////////////////////////////////////////////////
-static HRESULT
-WINAPI
-SensorAdapterAttach(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-SensorAdapterDetach(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-SensorAdapterClearContext(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-SensorAdapterQueryStatus(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_SENSOR_STATUS Status
- );
-
-static HRESULT
-WINAPI
-SensorAdapterReset(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-SensorAdapterSetMode(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ WINBIO_SENSOR_MODE Mode
- );
-
-static HRESULT
-WINAPI
-SensorAdapterSetIndicatorStatus(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ WINBIO_INDICATOR_STATUS IndicatorStatus
- );
-
-static HRESULT
-WINAPI
-SensorAdapterGetIndicatorStatus(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_INDICATOR_STATUS IndicatorStatus
- );
-
-static HRESULT
-WINAPI
-SensorAdapterStartCapture(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ WINBIO_BIR_PURPOSE Purpose,
- _Out_ LPOVERLAPPED *Overlapped
- );
-
-static HRESULT
-WINAPI
-SensorAdapterFinishCapture(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- );
-
-static HRESULT
-WINAPI
-SensorAdapterClearCaptureBuffer(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-SensorAdapterExportSensorData(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_BIR *SampleBuffer,
- _Out_ PSIZE_T SampleSize
- );
-
-static HRESULT
-WINAPI
-SensorAdapterCancel(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-SensorAdapterPushDataToEngine(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ WINBIO_BIR_PURPOSE Purpose,
- _In_ WINBIO_BIR_DATA_FLAGS Flags,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- );
-
-static HRESULT
-WINAPI
-SensorAdapterControlUnit(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ ULONG ControlCode,
- _In_ PUCHAR SendBuffer,
- _In_ SIZE_T SendBufferSize,
- _In_ PUCHAR ReceiveBuffer,
- _In_ SIZE_T ReceiveBufferSize,
- _Out_ PSIZE_T ReceiveDataSize,
- _Out_ PULONG OperationStatus
- );
-
-static HRESULT
-WINAPI
-SensorAdapterControlUnitPrivileged(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ ULONG ControlCode,
- _In_ PUCHAR SendBuffer,
- _In_ SIZE_T SendBufferSize,
- _In_ PUCHAR ReceiveBuffer,
- _In_ SIZE_T ReceiveBufferSize,
- _Out_ PSIZE_T ReceiveDataSize,
- _Out_ PULONG OperationStatus
- );
-//-----------------------------------------------------------------------------
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Interface dispatch table
-//
-///////////////////////////////////////////////////////////////////////////////
-static WINBIO_SENSOR_INTERFACE g_SensorInterface = {
- WINBIO_STORAGE_INTERFACE_VERSION_1,
- WINBIO_ADAPTER_TYPE_SENSOR,
- sizeof(WINBIO_SENSOR_INTERFACE),
- {0xa545298c, 0xec34, 0x4306, {0x84, 0x12, 0x83, 0x12, 0x5d, 0xca, 0xfa, 0xe1}},
-
- SensorAdapterAttach,
- SensorAdapterDetach,
- SensorAdapterClearContext,
- SensorAdapterQueryStatus,
- SensorAdapterReset,
- SensorAdapterSetMode,
- SensorAdapterSetIndicatorStatus,
- SensorAdapterGetIndicatorStatus,
- SensorAdapterStartCapture,
- SensorAdapterFinishCapture,
- SensorAdapterExportSensorData,
- SensorAdapterCancel,
- SensorAdapterPushDataToEngine,
- SensorAdapterControlUnit,
- SensorAdapterControlUnitPrivileged
-};
-//-----------------------------------------------------------------------------
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Mandatory DLL entrypoint function.
-//
-///////////////////////////////////////////////////////////////////////////////
-BOOL APIENTRY
-DllMain(
- HANDLE ModuleHandle,
- DWORD ReasonForCall,
- LPVOID Reserved
- )
-{
- UNREFERENCED_PARAMETER(ModuleHandle);
- UNREFERENCED_PARAMETER(ReasonForCall);
- UNREFERENCED_PARAMETER(Reserved);
-
- return TRUE;
-}
-//-----------------------------------------------------------------------------
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Well-known interface-discovery function exported by the Sensor Adapter
-//
-///////////////////////////////////////////////////////////////////////////////
-HRESULT
-WINAPI
-WbioQuerySensorInterface(
- _Out_ PWINBIO_SENSOR_INTERFACE *SensorInterface
- )
-{
- *SensorInterface = &g_SensorInterface;
- return S_OK;
-}
-//-----------------------------------------------------------------------------
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Storage Adapter action routines
-//
-///////////////////////////////////////////////////////////////////////////////
-static HRESULT
-WINAPI
-SensorAdapterAttach(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-static HRESULT
-WINAPI
-SensorAdapterDetach(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-static HRESULT
-WINAPI
-SensorAdapterClearContext(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-static HRESULT
-WINAPI
-SensorAdapterQueryStatus(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_SENSOR_STATUS Status
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(Status);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-static HRESULT
-WINAPI
-SensorAdapterReset(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-static HRESULT
-WINAPI
-SensorAdapterSetMode(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ WINBIO_SENSOR_MODE Mode
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(Mode);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-static HRESULT
-WINAPI
-SensorAdapterSetIndicatorStatus(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ WINBIO_INDICATOR_STATUS IndicatorStatus
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(IndicatorStatus);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-static HRESULT
-WINAPI
-SensorAdapterGetIndicatorStatus(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_INDICATOR_STATUS IndicatorStatus
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(IndicatorStatus);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-static HRESULT
-WINAPI
-SensorAdapterStartCapture(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ WINBIO_BIR_PURPOSE Purpose,
- _Out_ LPOVERLAPPED *Overlapped
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(Purpose);
- UNREFERENCED_PARAMETER(Overlapped);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-static HRESULT
-WINAPI
-SensorAdapterFinishCapture(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(RejectDetail);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-//
-// Export raw capture buffer
-//
-static HRESULT
-WINAPI
-SensorAdapterExportSensorData(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_BIR *SampleBuffer,
- _Out_ PSIZE_T SampleSize
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(SampleBuffer);
- UNREFERENCED_PARAMETER(SampleSize);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-static HRESULT
-WINAPI
-SensorAdapterCancel(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-//
-// Push current sample into the Engine and
-// convert it into a feature set for use in
-// additional processing.
-//
-static HRESULT
-WINAPI
-SensorAdapterPushDataToEngine(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ WINBIO_BIR_PURPOSE Purpose,
- _In_ WINBIO_BIR_DATA_FLAGS Flags,
- _Out_ PWINBIO_REJECT_DETAIL RejectDetail
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(Purpose);
- UNREFERENCED_PARAMETER(Flags);
- UNREFERENCED_PARAMETER(RejectDetail);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-static HRESULT
-WINAPI
-SensorAdapterControlUnit(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ ULONG ControlCode,
- _In_ PUCHAR SendBuffer,
- _In_ SIZE_T SendBufferSize,
- _In_ PUCHAR ReceiveBuffer,
- _In_ SIZE_T ReceiveBufferSize,
- _Out_ PSIZE_T ReceiveDataSize,
- _Out_ PULONG OperationStatus
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(ControlCode);
- UNREFERENCED_PARAMETER(SendBuffer);
- UNREFERENCED_PARAMETER(SendBufferSize);
- UNREFERENCED_PARAMETER(ReceiveBuffer);
- UNREFERENCED_PARAMETER(ReceiveBufferSize);
- UNREFERENCED_PARAMETER(ReceiveDataSize);
- UNREFERENCED_PARAMETER(OperationStatus);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
-
-static HRESULT
-WINAPI
-SensorAdapterControlUnitPrivileged(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ ULONG ControlCode,
- _In_ PUCHAR SendBuffer,
- _In_ SIZE_T SendBufferSize,
- _In_ PUCHAR ReceiveBuffer,
- _In_ SIZE_T ReceiveBufferSize,
- _Out_ PSIZE_T ReceiveDataSize,
- _Out_ PULONG OperationStatus
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(ControlCode);
- UNREFERENCED_PARAMETER(SendBuffer);
- UNREFERENCED_PARAMETER(SendBufferSize);
- UNREFERENCED_PARAMETER(ReceiveBuffer);
- UNREFERENCED_PARAMETER(ReceiveBufferSize);
- UNREFERENCED_PARAMETER(ReceiveDataSize);
- UNREFERENCED_PARAMETER(OperationStatus);
-
- return E_NOTIMPL;
-}
-///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/adapters/sensor_adapter/SensorAdapter.def b/biometrics/adapters/sensor_adapter/SensorAdapter.def
deleted file mode 100644
index e25340089..000000000
--- a/biometrics/adapters/sensor_adapter/SensorAdapter.def
+++ /dev/null
@@ -1,5 +0,0 @@
-LIBRARY SensorAdapter
-
-EXPORTS
- WbioQuerySensorInterface
-
diff --git a/biometrics/adapters/sensor_adapter/SensorAdapter.h b/biometrics/adapters/sensor_adapter/SensorAdapter.h
deleted file mode 100644
index f70c3f515..000000000
--- a/biometrics/adapters/sensor_adapter/SensorAdapter.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- SensorAdapter.h
-
-Abstract:
-
- This module contains a stub implementation of an Sensor Adapter
- plug-in for the Windows Biometric service.
-
-Author:
-
- -
-
-Environment:
-
- Win32, user mode only.
-
-Revision History:
-
-NOTES:
-
- (None)
-
---*/
-#pragma once
-
-#include "winbio_adapter.h"
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// The WINIBIO_SENSOR_CONTEXT structure is privately-defined by each
-// Sensor Adapter. Its purpose is to maintain any information that
-// should persist across Sensor Adapter API calls.
-//
-// The Adapter allocates and initializes one of these structures in its
-// 'Attach' routine and saves its address in the Pipeline->SensorContext
-// field.
-//
-// The Sensor Adapter's 'Detach' routine cleans up and deallocates the
-// structure and sets the PipelineContext->SensorContext field to NULL.
-//
-///////////////////////////////////////////////////////////////////////////////
-typedef struct _WINIBIO_SENSOR_CONTEXT {
- //
- // The following fields illustrate the kind of information
- // the Sensor Adapter needs to keep in this structure:
- //
- // SampleBuffer - A pointer to the most-recently-captured
- // data sample from the sensor device.
- //
- // SampleSize - Count of the number of bytes in the
- // sample buffer.
- //
- PWINBIO_BIR SampleBuffer;
- SIZE_T SampleSize;
-
-} WINIBIO_SENSOR_CONTEXT, *PWINIBIO_SENSOR_CONTEXT;
-
-
diff --git a/biometrics/adapters/sensor_adapter/SensorAdapter.rc b/biometrics/adapters/sensor_adapter/SensorAdapter.rc
deleted file mode 100644
index 0c08a2089..000000000
--- a/biometrics/adapters/sensor_adapter/SensorAdapter.rc
+++ /dev/null
@@ -1,29 +0,0 @@
-//---------------------------------------------------------------------------
-// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
-// PARTICULAR PURPOSE.
-//
-// Copyright (c) Microsoft Corporation. All rights reserved
-//
-// BioUsbSample.rc
-//
-// Copyright (c) 2007 Microsoft Corporation, All Rights Reserved
-//---------------------------------------------------------------------------
-
-
-#include
-#include
-#include "resource.h"
-
-//
-// TODO: Change the file description and file names to match your binary.
-//
-
-#define VER_FILETYPE VFT_DLL
-#define VER_FILESUBTYPE VFT_UNKNOWN
-#define VER_FILEDESCRIPTION_STR "Sensor Adapter Sample"
-#define VER_INTERNALNAME_STR "SensorAdapter"
-#define VER_ORIGINALFILENAME_STR "SensorAdapter.dll"
-
-#include "common.ver"
diff --git a/biometrics/adapters/sensor_adapter/SensorAdapter.vcxproj b/biometrics/adapters/sensor_adapter/SensorAdapter.vcxproj
deleted file mode 100644
index 166f8076d..000000000
--- a/biometrics/adapters/sensor_adapter/SensorAdapter.vcxproj
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
-
- {321860DA-56D9-427A-A5C2-346DFE8FB529}
- $(MSBuildProjectName)
- false
- true
- Debug
- Win32
- {6166C525-23D0-4D3C-8DD3-1E3CB527FA23}
-
-
-
- Windows10
- False
- Windows Driver
-
- WindowsApplicationForDrivers10.0
- DynamicLibrary
-
-
- Windows10
- True
- Windows Driver
-
- WindowsApplicationForDrivers10.0
- DynamicLibrary
-
-
- Windows10
- False
- Windows Driver
-
- WindowsApplicationForDrivers10.0
- DynamicLibrary
-
-
- Windows10
- True
- Windows Driver
-
- WindowsApplicationForDrivers10.0
- DynamicLibrary
-
-
-
- $(IntDir)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SensorAdapter
-
-
- SensorAdapter
-
-
- SensorAdapter
-
-
- SensorAdapter
-
-
-
- true
- Level4
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- true
- Level4
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- true
- Level4
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- true
- Level4
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib
- SensorAdapter.def
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib
- SensorAdapter.def
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib
- SensorAdapter.def
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib
- SensorAdapter.def
-
-
-
-
- ;%(AdditionalIncludeDirectories)
- precomp.h
- Create
- $(IntDir)\precomp.h.pch
-
-
- ;%(AdditionalIncludeDirectories)
- precomp.h
- Use
- $(IntDir)\precomp.h.pch
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/biometrics/adapters/sensor_adapter/SensorAdapter.vcxproj.Filters b/biometrics/adapters/sensor_adapter/SensorAdapter.vcxproj.Filters
deleted file mode 100644
index 53f0b241f..000000000
--- a/biometrics/adapters/sensor_adapter/SensorAdapter.vcxproj.Filters
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*
- {51205C64-E853-46B7-8706-03C4F355D3FB}
-
-
- h;hpp;hxx;hm;inl;inc;xsd
- {65E3A5BF-7427-4CB0-B6C7-F47537AC67BB}
-
-
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml
- {05AE8E4A-3180-403D-BFB9-122DD85E0D1A}
-
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- Resource Files
-
-
-
\ No newline at end of file
diff --git a/biometrics/adapters/sensor_adapter/precomp.h b/biometrics/adapters/sensor_adapter/precomp.h
deleted file mode 100644
index c36eb36cd..000000000
--- a/biometrics/adapters/sensor_adapter/precomp.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- precomp.h
-
-Abstract:
-
- This module contains identifies all the headers that
- shoulde be pre-compiled.
-
-Author:
-
- -
-
-Environment:
-
- Win32, user mode only.
-
-Revision History:
-
-NOTES:
-
- (None)
-
---*/
-#pragma once
-
-//
-// Necessary for compiling under VC.
-//
-#if(!defined(WINVER) || (WINVER < 0x0500))
- #undef WINVER
- #define WINVER 0x0500
-#endif
-#if(!defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500))
- #undef _WIN32_WINNT
- #define _WIN32_WINNT 0x0500
-#endif
-
-//
-// Required header files that shouldn't change often.
-//
-#include
-#include
-#include
-
-//
-// StrSafe.h needs to be included last
-// to disallow unsafe string functions.
-#include
-
-#ifndef ARGUMENT_PRESENT
-#define ARGUMENT_PRESENT(x) ((x) != NULL)
-#endif
diff --git a/biometrics/adapters/sensor_adapter/precompsrc.cpp b/biometrics/adapters/sensor_adapter/precompsrc.cpp
deleted file mode 100644
index 5944cf515..000000000
--- a/biometrics/adapters/sensor_adapter/precompsrc.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "precomp.h"
\ No newline at end of file
diff --git a/biometrics/adapters/sensor_adapter/resource.h b/biometrics/adapters/sensor_adapter/resource.h
deleted file mode 100644
index 95ed37fa6..000000000
--- a/biometrics/adapters/sensor_adapter/resource.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//---------------------------------------------------------------------------
-// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
-// PARTICULAR PURPOSE.
-//
-// Copyright (c) Microsoft Corporation. All rights reserved
-//
-// BioUsbSample.rc
-//
-// Copyright (c) 2007 Microsoft Corporation, All Rights Reserved
-//---------------------------------------------------------------------------
-
-#pragma once
-
diff --git a/biometrics/adapters/storage_adapter/StorageAdapter.cpp b/biometrics/adapters/storage_adapter/StorageAdapter.cpp
deleted file mode 100644
index 4e5cfb664..000000000
--- a/biometrics/adapters/storage_adapter/StorageAdapter.cpp
+++ /dev/null
@@ -1,594 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- Storage.cpp
-
-Abstract:
-
- This module contains a stub implementation of a Storage Adapter
- plug-in for the Windows Biometric service.
-
-Author:
-
- -
-
-Environment:
-
- Win32, user mode only.
-
-Revision History:
-
-NOTES:
-
- (None)
-
---*/
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Header files...
-//
-///////////////////////////////////////////////////////////////////////////////
-#include "precomp.h"
-#include "winbio_adapter.h"
-#include "StorageAdapter.h"
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Forward declarations for the Storage Adapter's interface routines...
-//
-///////////////////////////////////////////////////////////////////////////////
-static HRESULT
-WINAPI
-StorageAdapterAttach(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-StorageAdapterDetach(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-StorageAdapterClearContext(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-StorageAdapterCreateDatabase(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_UUID DatabaseId,
- _In_ WINBIO_BIOMETRIC_TYPE Factor,
- _In_ PWINBIO_UUID Format,
- _In_ LPCWSTR FilePath,
- _In_ LPCWSTR ConnectString,
- _In_ SIZE_T IndexElementCount,
- _In_ SIZE_T InitialSize
- );
-
-static HRESULT
-WINAPI
-StorageAdapterEraseDatabase(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_UUID DatabaseId,
- _In_ LPCWSTR FilePath,
- _In_ LPCWSTR ConnectString
- );
-
-static HRESULT
-WINAPI
-StorageAdapterOpenDatabase(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_UUID DatabaseId,
- _In_ LPCWSTR FilePath,
- _In_ LPCWSTR ConnectString
- );
-
-static HRESULT
-WINAPI
-StorageAdapterCloseDatabase(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-StorageAdapterGetDataFormat(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_UUID Format,
- _Out_ PWINBIO_VERSION Version
- );
-
-static HRESULT
-WINAPI
-StorageAdapterGetDatabaseSize(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PSIZE_T AvailableRecordCount,
- _Out_ PSIZE_T TotalRecordCount
- );
-
-static HRESULT
-WINAPI
-StorageAdapterAddRecord(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_STORAGE_RECORD RecordContents
- );
-
-static HRESULT
-WINAPI
-StorageAdapterDeleteRecord(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_IDENTITY Identity,
- _In_ WINBIO_BIOMETRIC_SUBTYPE SubFactor
- );
-
-static HRESULT
-WINAPI
-StorageAdapterQueryBySubject(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_IDENTITY Identity,
- _In_ WINBIO_BIOMETRIC_SUBTYPE SubFactor
- );
-
-static HRESULT
-WINAPI
-StorageAdapterQueryByContent(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ WINBIO_BIOMETRIC_SUBTYPE SubFactor,
- _In_ ULONG IndexVector[],
- _In_ SIZE_T IndexElementCount
- );
-
-static HRESULT
-WINAPI
-StorageAdapterGetRecordCount(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PSIZE_T RecordCount
- );
-
-static HRESULT
-WINAPI
-StorageAdapterFirstRecord(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-StorageAdapterNextRecord(
- _Inout_ PWINBIO_PIPELINE Pipeline
- );
-
-static HRESULT
-WINAPI
-StorageAdapterGetCurrentRecord(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_STORAGE_RECORD RecordContents
- );
-
-static HRESULT
-WINAPI
-StorageAdapterControlUnit(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ ULONG ControlCode,
- _In_ PUCHAR SendBuffer,
- _In_ SIZE_T SendBufferSize,
- _In_ PUCHAR ReceiveBuffer,
- _In_ SIZE_T ReceiveBufferSize,
- _Out_ PSIZE_T ReceiveDataSize,
- _Out_ PULONG OperationStatus
- );
-
-static HRESULT
-WINAPI
-StorageAdapterControlUnitPrivileged(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ ULONG ControlCode,
- _In_ PUCHAR SendBuffer,
- _In_ SIZE_T SendBufferSize,
- _In_ PUCHAR ReceiveBuffer,
- _In_ SIZE_T ReceiveBufferSize,
- _Out_ PSIZE_T ReceiveDataSize,
- _Out_ PULONG OperationStatus
- );
-//-----------------------------------------------------------------------------
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Interface dispatch table
-//
-///////////////////////////////////////////////////////////////////////////////
-static WINBIO_STORAGE_INTERFACE g_StorageInterface = {
- WINBIO_STORAGE_INTERFACE_VERSION_1,
- WINBIO_ADAPTER_TYPE_STORAGE,
- sizeof(WINBIO_STORAGE_INTERFACE),
- {0x7f6c2610, 0xfdba, 0x41a3, {0xae, 0x1c, 0x8f, 0xd5, 0x84, 0x59, 0x8d, 0x13}},
-
- StorageAdapterAttach,
- StorageAdapterDetach,
- StorageAdapterClearContext,
- StorageAdapterCreateDatabase,
- StorageAdapterEraseDatabase,
- StorageAdapterOpenDatabase,
- StorageAdapterCloseDatabase,
- StorageAdapterGetDataFormat,
- StorageAdapterGetDatabaseSize,
- StorageAdapterAddRecord,
- StorageAdapterDeleteRecord,
- StorageAdapterQueryBySubject,
- StorageAdapterQueryByContent,
- StorageAdapterGetRecordCount,
- StorageAdapterFirstRecord,
- StorageAdapterNextRecord,
- StorageAdapterGetCurrentRecord,
- StorageAdapterControlUnit,
- StorageAdapterControlUnitPrivileged
-};
-//-----------------------------------------------------------------------------
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Mandatory DLL entrypoint function.
-//
-///////////////////////////////////////////////////////////////////////////////
-BOOL APIENTRY
-DllMain(
- HANDLE ModuleHandle,
- DWORD ReasonForCall,
- LPVOID Reserved
- )
-{
- UNREFERENCED_PARAMETER(ModuleHandle);
- UNREFERENCED_PARAMETER(ReasonForCall);
- UNREFERENCED_PARAMETER(Reserved);
-
- return TRUE;
-}
-//-----------------------------------------------------------------------------
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Well-known interface-discovery function exported by the Storage Adapter
-//
-///////////////////////////////////////////////////////////////////////////////
-HRESULT
-WINAPI
-WbioQueryStorageInterface(
- _Out_ PWINBIO_STORAGE_INTERFACE *StorageInterface
- )
-{
- *StorageInterface = &g_StorageInterface;
- return S_OK;
-}
-//-----------------------------------------------------------------------------
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Storage Adapter action routines
-//
-///////////////////////////////////////////////////////////////////////////////
-static HRESULT
-WINAPI
-StorageAdapterAttach(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterDetach(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterClearContext(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterCreateDatabase(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_UUID DatabaseId,
- _In_ WINBIO_BIOMETRIC_TYPE Factor,
- _In_ PWINBIO_UUID Format,
- _In_ LPCWSTR FilePath,
- _In_ LPCWSTR ConnectString,
- _In_ SIZE_T IndexElementCount,
- _In_ SIZE_T InitialSize
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(DatabaseId);
- UNREFERENCED_PARAMETER(Factor);
- UNREFERENCED_PARAMETER(Format);
- UNREFERENCED_PARAMETER(FilePath);
- UNREFERENCED_PARAMETER(ConnectString);
- UNREFERENCED_PARAMETER(IndexElementCount);
- UNREFERENCED_PARAMETER(InitialSize);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterEraseDatabase(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_UUID DatabaseId,
- _In_ LPCWSTR FilePath,
- _In_ LPCWSTR ConnectString
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(DatabaseId);
- UNREFERENCED_PARAMETER(FilePath);
- UNREFERENCED_PARAMETER(ConnectString);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterOpenDatabase(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_UUID DatabaseId,
- _In_ LPCWSTR FilePath,
- _In_ LPCWSTR ConnectString
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(DatabaseId);
- UNREFERENCED_PARAMETER(FilePath);
- UNREFERENCED_PARAMETER(ConnectString);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterCloseDatabase(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterGetDataFormat(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_UUID Format,
- _Out_ PWINBIO_VERSION Version
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(Format);
- UNREFERENCED_PARAMETER(Version);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterGetDatabaseSize(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PSIZE_T AvailableRecordCount,
- _Out_ PSIZE_T TotalRecordCount
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(AvailableRecordCount);
- UNREFERENCED_PARAMETER(TotalRecordCount);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterAddRecord(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_STORAGE_RECORD RecordContents
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(RecordContents);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterDeleteRecord(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_IDENTITY Identity,
- _In_ WINBIO_BIOMETRIC_SUBTYPE SubFactor
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(Identity);
- UNREFERENCED_PARAMETER(SubFactor);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterQueryBySubject(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ PWINBIO_IDENTITY Identity,
- _In_ WINBIO_BIOMETRIC_SUBTYPE SubFactor
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(Identity);
- UNREFERENCED_PARAMETER(SubFactor);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterQueryByContent(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ WINBIO_BIOMETRIC_SUBTYPE SubFactor,
- _In_ ULONG IndexVector[],
- _In_ SIZE_T IndexElementCount
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(SubFactor);
- UNREFERENCED_PARAMETER(IndexVector);
- UNREFERENCED_PARAMETER(IndexElementCount);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterGetRecordCount(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PSIZE_T RecordCount
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(RecordCount);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterFirstRecord(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterNextRecord(
- _Inout_ PWINBIO_PIPELINE Pipeline
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterGetCurrentRecord(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _Out_ PWINBIO_STORAGE_RECORD RecordContents
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(RecordContents);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterControlUnit(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ ULONG ControlCode,
- _In_ PUCHAR SendBuffer,
- _In_ SIZE_T SendBufferSize,
- _In_ PUCHAR ReceiveBuffer,
- _In_ SIZE_T ReceiveBufferSize,
- _Out_ PSIZE_T ReceiveDataSize,
- _Out_ PULONG OperationStatus
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(ControlCode);
- UNREFERENCED_PARAMETER(SendBuffer);
- UNREFERENCED_PARAMETER(SendBufferSize);
- UNREFERENCED_PARAMETER(ReceiveBuffer);
- UNREFERENCED_PARAMETER(ReceiveBufferSize);
- UNREFERENCED_PARAMETER(ReceiveDataSize);
- UNREFERENCED_PARAMETER(OperationStatus);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-static HRESULT
-WINAPI
-StorageAdapterControlUnitPrivileged(
- _Inout_ PWINBIO_PIPELINE Pipeline,
- _In_ ULONG ControlCode,
- _In_ PUCHAR SendBuffer,
- _In_ SIZE_T SendBufferSize,
- _In_ PUCHAR ReceiveBuffer,
- _In_ SIZE_T ReceiveBufferSize,
- _Out_ PSIZE_T ReceiveDataSize,
- _Out_ PULONG OperationStatus
- )
-{
- UNREFERENCED_PARAMETER(Pipeline);
- UNREFERENCED_PARAMETER(ControlCode);
- UNREFERENCED_PARAMETER(SendBuffer);
- UNREFERENCED_PARAMETER(SendBufferSize);
- UNREFERENCED_PARAMETER(ReceiveBuffer);
- UNREFERENCED_PARAMETER(ReceiveBufferSize);
- UNREFERENCED_PARAMETER(ReceiveDataSize);
- UNREFERENCED_PARAMETER(OperationStatus);
-
- return E_NOTIMPL;
-}
-//-----------------------------------------------------------------------------
-
-
diff --git a/biometrics/adapters/storage_adapter/StorageAdapter.def b/biometrics/adapters/storage_adapter/StorageAdapter.def
deleted file mode 100644
index 685b9f3fb..000000000
--- a/biometrics/adapters/storage_adapter/StorageAdapter.def
+++ /dev/null
@@ -1,4 +0,0 @@
-LIBRARY StorageAdapter
-
-EXPORTS
- WbioQueryStorageInterface
diff --git a/biometrics/adapters/storage_adapter/StorageAdapter.h b/biometrics/adapters/storage_adapter/StorageAdapter.h
deleted file mode 100644
index d0259213f..000000000
--- a/biometrics/adapters/storage_adapter/StorageAdapter.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- StorageAdapter.h
-
-Abstract:
-
- This module contains a stub implementation of a Storage Adapter
- plug-in for the Windows Biometric service.
-
-Author:
-
- -
-
-Environment:
-
- Win32, user mode only.
-
-Revision History:
-
-NOTES:
-
- (None)
-
---*/
-#pragma once
-
-#include "winbio_adapter.h"
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// The WINIBIO_STORAGE_CONTEXT structure is privately-defined by each
-// Storage Adapter. Its purpose is to maintain any information that
-// should persist across Storage Adapter API calls.
-//
-// The Adapter allocates and initializes one of these structures in its
-// 'Attach' routine and saves its address in the Pipeline->StorageContext
-// field.
-//
-// The Storage Adapter's 'Detach' routine cleans up and deallocates the
-// structure and sets the PipelineContext->StorageContext field to NULL.
-//
-///////////////////////////////////////////////////////////////////////////////
-typedef struct _WINIBIO_STORAGE_CONTEXT {
- //
- // The following fields illustrate the kind of information
- // the Storage Adapter needs to keep in this structure:
- //
- // DatabaseId - Identify of the Adapter's
- // currently-opened database.
- //
- // DatabaseHandle - A handle to the Storage Adapter's
- // currently-open database.
- //
- // ResultSet - A collection of records generated by
- // a database query operation.
- //
- // ResultSetCursor - Current location in the result
- // set. Used to iterate through the
- // result set and make individual
- // records available.
- //
- WINBIO_UUID DatabaseId;
- PVOID DatabaseHandle;
- PVOID ResultSet;
- PVOID ResultSetCursor;
-
-} WINIBIO_STORAGE_CONTEXT, *PWINIBIO_STORAGE_CONTEXT;
-
-
-
diff --git a/biometrics/adapters/storage_adapter/StorageAdapter.rc b/biometrics/adapters/storage_adapter/StorageAdapter.rc
deleted file mode 100644
index 332ed60ce..000000000
--- a/biometrics/adapters/storage_adapter/StorageAdapter.rc
+++ /dev/null
@@ -1,29 +0,0 @@
-//---------------------------------------------------------------------------
-// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
-// PARTICULAR PURPOSE.
-//
-// Copyright (c) Microsoft Corporation. All rights reserved
-//
-// BioUsbSample.rc
-//
-// Copyright (c) 2007 Microsoft Corporation, All Rights Reserved
-//---------------------------------------------------------------------------
-
-
-#include
-#include
-#include "resource.h"
-
-//
-// TODO: Change the file description and file names to match your binary.
-//
-
-#define VER_FILETYPE VFT_DLL
-#define VER_FILESUBTYPE VFT_UNKNOWN
-#define VER_FILEDESCRIPTION_STR "Storage Adapter Sample"
-#define VER_INTERNALNAME_STR "StorageAdapter"
-#define VER_ORIGINALFILENAME_STR "StorageAdapter.dll"
-
-#include "common.ver"
diff --git a/biometrics/adapters/storage_adapter/StorageAdapter.vcxproj b/biometrics/adapters/storage_adapter/StorageAdapter.vcxproj
deleted file mode 100644
index 217ba7602..000000000
--- a/biometrics/adapters/storage_adapter/StorageAdapter.vcxproj
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
-
- {339A0554-2E3D-4A12-B45C-8E2D7D59D7C2}
- $(MSBuildProjectName)
- false
- true
- Debug
- Win32
- {A09D774C-A1A4-4648-8599-3905585E696B}
-
-
-
- Windows10
- False
- Windows Driver
-
- WindowsApplicationForDrivers10.0
- DynamicLibrary
-
-
- Windows10
- True
- Windows Driver
-
- WindowsApplicationForDrivers10.0
- DynamicLibrary
-
-
- Windows10
- False
- Windows Driver
-
- WindowsApplicationForDrivers10.0
- DynamicLibrary
-
-
- Windows10
- True
- Windows Driver
-
- WindowsApplicationForDrivers10.0
- DynamicLibrary
-
-
-
- $(IntDir)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StorageAdapter
-
-
- StorageAdapter
-
-
- StorageAdapter
-
-
- StorageAdapter
-
-
-
- true
- Level4
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- true
- Level4
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- true
- Level4
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- true
- Level4
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib
- StorageAdapter.def
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib
- StorageAdapter.def
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib
- StorageAdapter.def
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib
- StorageAdapter.def
-
-
-
-
- ;%(AdditionalIncludeDirectories)
- precomp.h
- Create
- $(IntDir)\precomp.h.pch
-
-
- ;%(AdditionalIncludeDirectories)
- precomp.h
- Use
- $(IntDir)\precomp.h.pch
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/biometrics/adapters/storage_adapter/StorageAdapter.vcxproj.Filters b/biometrics/adapters/storage_adapter/StorageAdapter.vcxproj.Filters
deleted file mode 100644
index 928764979..000000000
--- a/biometrics/adapters/storage_adapter/StorageAdapter.vcxproj.Filters
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*
- {EE3BFC89-6F03-422C-B8F1-B4F4764C10BB}
-
-
- h;hpp;hxx;hm;inl;inc;xsd
- {C5BD080B-5F54-4E1D-A8EB-7CD4F15F93CA}
-
-
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml
- {105F62EC-5AF7-4EA7-BC5B-07BBDD5C3611}
-
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- Resource Files
-
-
-
\ No newline at end of file
diff --git a/biometrics/adapters/storage_adapter/precomp.h b/biometrics/adapters/storage_adapter/precomp.h
deleted file mode 100644
index c36eb36cd..000000000
--- a/biometrics/adapters/storage_adapter/precomp.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- precomp.h
-
-Abstract:
-
- This module contains identifies all the headers that
- shoulde be pre-compiled.
-
-Author:
-
- -
-
-Environment:
-
- Win32, user mode only.
-
-Revision History:
-
-NOTES:
-
- (None)
-
---*/
-#pragma once
-
-//
-// Necessary for compiling under VC.
-//
-#if(!defined(WINVER) || (WINVER < 0x0500))
- #undef WINVER
- #define WINVER 0x0500
-#endif
-#if(!defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500))
- #undef _WIN32_WINNT
- #define _WIN32_WINNT 0x0500
-#endif
-
-//
-// Required header files that shouldn't change often.
-//
-#include
-#include
-#include
-
-//
-// StrSafe.h needs to be included last
-// to disallow unsafe string functions.
-#include
-
-#ifndef ARGUMENT_PRESENT
-#define ARGUMENT_PRESENT(x) ((x) != NULL)
-#endif
diff --git a/biometrics/adapters/storage_adapter/precompsrc.cpp b/biometrics/adapters/storage_adapter/precompsrc.cpp
deleted file mode 100644
index 5944cf515..000000000
--- a/biometrics/adapters/storage_adapter/precompsrc.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "precomp.h"
\ No newline at end of file
diff --git a/biometrics/adapters/storage_adapter/resource.h b/biometrics/adapters/storage_adapter/resource.h
deleted file mode 100644
index 95ed37fa6..000000000
--- a/biometrics/adapters/storage_adapter/resource.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//---------------------------------------------------------------------------
-// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
-// PARTICULAR PURPOSE.
-//
-// Copyright (c) Microsoft Corporation. All rights reserved
-//
-// BioUsbSample.rc
-//
-// Copyright (c) 2007 Microsoft Corporation, All Rights Reserved
-//---------------------------------------------------------------------------
-
-#pragma once
-
diff --git a/biometrics/driver/BioUsbSample.ctl b/biometrics/driver/BioUsbSample.ctl
deleted file mode 100644
index bcec77c14..000000000
--- a/biometrics/driver/BioUsbSample.ctl
+++ /dev/null
@@ -1 +0,0 @@
-864936A6-DB79-451e-B764-E720D61A9361 WudfBioUsbSampleTraceGuid
\ No newline at end of file
diff --git a/biometrics/driver/BioUsbSample.rc b/biometrics/driver/BioUsbSample.rc
deleted file mode 100644
index 36f83c5a6..000000000
--- a/biometrics/driver/BioUsbSample.rc
+++ /dev/null
@@ -1,26 +0,0 @@
-// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
-// PARTICULAR PURPOSE.
-//
-// Copyright (c) Microsoft Corporation. All rights reserved
-//
-// BioUsbSample.rc
-//
-
-
-#include
-#include
-#include "resource.h"
-
-//
-// TODO: Change the file description and file names to match your binary.
-//
-
-#define VER_FILETYPE VFT_DLL
-#define VER_FILESUBTYPE VFT_UNKNOWN
-#define VER_FILEDESCRIPTION_STR "WUDF: Biometric Sample"
-#define VER_INTERNALNAME_STR "WudfBioUsbSample"
-#define VER_ORIGINALFILENAME_STR "WudfBioUsbSample.dll"
-
-#include "common.ver"
diff --git a/biometrics/driver/Device.cpp b/biometrics/driver/Device.cpp
deleted file mode 100644
index 8f8dd6b45..000000000
--- a/biometrics/driver/Device.cpp
+++ /dev/null
@@ -1,1834 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- Device.cpp
-
-Abstract:
-
- This module contains the implementation of the Biometric
- device driver.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-#include "internal.h"
-#include "device.tmh"
-
-#pragma warning(disable : 4189)
-
-DWORD WINAPI
-CaptureSleepThread(
- LPVOID lpParam
- )
-{
- CBiometricDevice *device = (CBiometricDevice *) lpParam;
- PCAPTURE_SLEEP_PARAMS sleepParams = device->GetCaptureSleepParams();
-
- //
- // Make sure it is less than or equal to 1 minute.
- //
- if (sleepParams->SleepValue > 60)
- {
- sleepParams->SleepValue = 60;
- }
-
- Sleep(sleepParams->SleepValue * 1000);
-
- device->CompletePendingRequest(sleepParams->Hr, sleepParams->Information);
-
- return 0;
-}
-
-
-HRESULT
-CBiometricDevice::CreateInstanceAndInitialize(
- _In_ IWDFDriver *FxDriver,
- _In_ IWDFDeviceInitialize * FxDeviceInit,
- _Out_ CBiometricDevice **Device
- )
-/*++
-
- Routine Description:
-
- This method creates and initializs an instance of the skeleton driver's
- device callback object.
-
- Arguments:
-
- FxDeviceInit - the settings for the device.
-
- Device - a location to store the referenced pointer to the device object.
-
- Return Value:
-
- Status
-
---*/
-{
- //
- // Create a new instance of the device class
- //
- CComObject *pMyDevice = NULL;
- HRESULT hr = CComObject::CreateInstance( &pMyDevice );
-
- if (SUCCEEDED(hr))
- {
-
- //
- // Initialize the instance. This calls the WUDF framework,
- // which keeps a reference to the device interface for the lifespan
- // of the device.
- //
- if (NULL != pMyDevice)
- {
- hr = pMyDevice->Initialize(FxDriver, FxDeviceInit);
-
- if (FAILED(hr))
- {
- BiometricSafeRelease(pMyDevice);
- }
-
- }
-
- *Device = pMyDevice;
-
- }
-
- return hr;
-}
-
-HRESULT
-CBiometricDevice::Initialize(
- _In_ IWDFDriver * FxDriver,
- _In_ IWDFDeviceInitialize * FxDeviceInit
- )
-/*++
-
- Routine Description:
-
- This method initializes the device callback object and creates the
- partner device object.
-
- The method should perform any device-specific configuration that:
- * could fail (these can't be done in the constructor)
- * must be done before the partner object is created -or-
- * can be done after the partner object is created and which aren't
- influenced by any device-level parameters the parent (the driver
- in this case) might set.
-
- Arguments:
-
- FxDeviceInit - the settings for this device.
-
- Return Value:
-
- status.
-
---*/
-{
- IWDFDevice *fxDevice = NULL;
- HRESULT hr = S_OK;
- IUnknown *unknown = NULL;
-
- //
- // Configure things like the locking model before we go to create our
- // partner device.
- //
-
- //
- // Set the locking model.
- //
-
- FxDeviceInit->SetLockingConstraint(WdfDeviceLevel);
-
- //
- // Any per-device initialization which must be done before
- // creating the partner object.
- //
-
- //
- // Create a new FX device object and assign the new callback object to
- // handle any device level events that occur.
- //
-
- //
- // We pass an IUnknown reference to CreateDevice, which takes its own
- // reference if everything works.
- //
-
- if (SUCCEEDED(hr))
- {
- hr = this->QueryInterface(__uuidof(IUnknown), (void **)&unknown);
-
- }
-
- if (SUCCEEDED(hr))
- {
-
- hr = FxDriver->CreateDevice(FxDeviceInit, unknown, &fxDevice);
- BiometricSafeRelease(unknown);
- }
-
- //
- // If that succeeded then set our FxDevice member variable.
- //
-
- if (SUCCEEDED(hr))
- {
- m_FxDevice = fxDevice;
-
- //
- // Drop the reference we got from CreateDevice. Since this object
- // is partnered with the framework object they have the same
- // lifespan - there is no need for an additional reference.
- //
-
- BiometricSafeRelease(fxDevice);
- }
-
- return hr;
-}
-
-HRESULT
-CBiometricDevice::Configure(
- VOID
- )
-/*++
-
- Routine Description:
-
- This method is called after the device callback object has been initialized
- and returned to the driver. It would setup the device's queues and their
- corresponding callback objects.
-
- Arguments:
-
- FxDevice - the framework device object for which we're handling events.
-
- Return Value:
-
- status
-
---*/
-{
-
- HRESULT hr = S_OK;
-
- //
- // Create the I/O queue
- //
-
- if (SUCCEEDED(hr))
- {
- hr = CBiometricIoQueue::CreateInstanceAndInitialize(m_FxDevice, this, &m_IoQueue);
-
- if (SUCCEEDED(hr))
- {
- hr = m_IoQueue->Configure();
- }
- }
-
- //
- // Create Device Interface
- //
-
- if (SUCCEEDED(hr))
- {
- hr = m_FxDevice->CreateDeviceInterface(&GUID_DEVINTERFACE_BIOMETRIC_READER,
- NULL);
- }
-
- if (SUCCEEDED(hr))
- {
- hr = m_FxDevice->AssignDeviceInterfaceState(&GUID_DEVINTERFACE_BIOMETRIC_READER,
- NULL,
- TRUE);
- }
-
- //
- // TODO - this is where additional interfaces can be exposed.
- //
-
- return hr;
-}
-
-HRESULT
-CBiometricDevice::OnPrepareHardware(
- _In_ IWDFDevice * /* FxDevice */
- )
-/*++
-
-Routine Description:
-
- This routine is invoked to ready the driver
- to talk to hardware. It opens the handle to the
- device and talks to it using the WINUSB interface.
- It invokes WINUSB to discver the interfaces and stores
- the information related to bulk endpoints.
-
-Arguments:
-
- FxDevice : Pointer to the WDF device interface
-
-Return Value:
-
- HRESULT
-
---*/
-{
- PWSTR deviceName = NULL;
- DWORD deviceNameCch = 0;
-
- HRESULT hr;
-
- //
- // Get the device name.
- // Get the length to allocate first
- //
-
- hr = m_FxDevice->RetrieveDeviceName(NULL, &deviceNameCch);
-
- if (FAILED(hr))
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Cannot get device name %!hresult!",
- hr
- );
- }
-
- //
- // Allocate the buffer
- //
-
- if (SUCCEEDED(hr))
- {
- deviceName = (PWSTR) malloc(deviceNameCch * sizeof (WCHAR));
-
- if (deviceName == NULL)
- {
- hr = E_OUTOFMEMORY;
- }
- }
-
- //
- // Get the actual name
- //
-
- if (SUCCEEDED(hr))
- {
- hr = m_FxDevice->RetrieveDeviceName(deviceName, &deviceNameCch);
-
- if (FAILED(hr))
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Cannot get device name %!hresult!",
- hr
- );
- }
- }
-
- if (SUCCEEDED(hr))
- {
- TraceEvents(TRACE_LEVEL_INFORMATION,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Device name %S",
- deviceName
- );
- }
-
- //
- // Create USB I/O Targets and configure them
- //
-
- if (SUCCEEDED(hr))
- {
- hr = CreateUsbIoTargets();
- }
-
- if (SUCCEEDED(hr))
- {
- ULONG length = sizeof(m_Speed);
-
- hr = m_pIUsbTargetDevice->RetrieveDeviceInformation(DEVICE_SPEED,
- &length,
- &m_Speed);
- if (FAILED(hr))
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Cannot get usb device speed information %!HRESULT!",
- hr
- );
- }
- }
-
- if (SUCCEEDED(hr))
- {
- TraceEvents(TRACE_LEVEL_INFORMATION,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Speed - %x\n",
- m_Speed
- );
- }
-
- //
- // Setup power-management settings on the device.
- //
-
- if (SUCCEEDED(hr))
- {
- hr = SetPowerManagement();
- }
-
- //
- // We have non-power managed queues so we Stop them in OnReleaseHardware
- // and start them in OnPrepareHardware
- //
-
- if (SUCCEEDED(hr))
- {
- m_IoQueue->Start();
- }
-
- if (SUCCEEDED(hr))
- {
- //
- // If the device stack allows read to remain pending across power-down
- // and up, it can be initiated during OnPrepareHardware
- //
- // If the device stack doesn't allow the read to remain pending (i.e. it
- // cancels the pending read during power transition) driver will have to
- // stop sending pending read during D0Exit and re-initiate it during
- // D0Entry
- //
- // USB core actually doesn't allow read to remain pending across power
- // transition but WinUSB does. Since we are layered above WinUSB we don't
- // need to manage pending read across power transitions.
- //
-
- hr = InitiatePendingRead();
- }
-
- if (deviceName)
- {
- free(deviceName);
- deviceName = NULL;
- }
-
- return hr;
-}
-
-HRESULT
-CBiometricDevice::OnReleaseHardware(
- _In_ IWDFDevice * /* FxDevice */
- )
-/*++
-
-Routine Description:
-
- This routine is invoked when the device is being removed or stopped
- It releases all resources allocated for this device.
-
-Arguments:
-
- FxDevice - Pointer to the Device object.
-
-Return Value:
-
- HRESULT - Always succeeds.
-
---*/
-{
- //
- // Cancel the pending data collection I/O, if one exists.
- //
- CompletePendingRequest(HRESULT_FROM_WIN32(ERROR_CANCELLED), 0);
-
- //
- // Since we have non-power managed queues, we need to Stop them
- // explicitly
- //
- // We need to stop them before deleting I/O targets otherwise we
- // will continue to get I/O and our I/O processing will try to access
- // freed I/O targets
- //
- // We initialize queues in CMyDevice::Initialize so we can't get
- // here with queues being NULL and don't need to guard against that
- //
-
- m_IoQueue->StopSynchronously();
-
- //
- // Delete USB Target Device WDF Object, this will in turn
- // delete all the children - interface and the pipe objects
- //
- // This makes sure that
- // 1. We drain the I/O before releasing the targets
- // a. We always need to do that for the pending read which does
- // not come from an I/O queue
- // b. We need to do this even for I/O coming from I/O queues because
- // we set them to non-power managed queues (to leverage wait/wake
- // from WinUsb.sys)
- // 2. We remove USB target objects from object tree (and thereby free them)
- // before any potential subsequent OnPrepareHardware creates new ones
- //
- // m_pIUsbTargetDevice could be NULL if OnPrepareHardware failed so we need
- // to guard against that
- //
-
- if (m_pIUsbTargetDevice)
- {
- m_pIUsbTargetDevice->DeleteWdfObject();
- }
-
- //
- // This sample has a thread that will sleep for 5 seconds before
- // completing a capture request.
- //
- if (m_SleepThread != INVALID_HANDLE_VALUE)
- {
- WaitForSingleObject(m_SleepThread, INFINITE);
- CloseHandle(m_SleepThread);
- m_SleepThread = INVALID_HANDLE_VALUE;
- }
-
- return S_OK;
-}
-
-HRESULT
-CBiometricDevice::CreateUsbIoTargets(
- )
-/*++
-
-Routine Description:
-
- This routine creates Usb device, interface and pipe objects
-
-Arguments:
-
- None
-
-Return Value:
-
- HRESULT
---*/
-{
- HRESULT hr;
- UCHAR NumEndPoints = 0;
- IWDFUsbTargetFactory * pIUsbTargetFactory = NULL;
- IWDFUsbTargetDevice * pIUsbTargetDevice = NULL;
- IWDFUsbInterface * pIUsbInterface = NULL;
- IWDFUsbTargetPipe * pIUsbPipe = NULL;
-
- hr = m_FxDevice->QueryInterface(IID_PPV_ARGS(&pIUsbTargetFactory));
-
- if (FAILED(hr))
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Cannot get usb target factory %!HRESULT!",
- hr
- );
- }
-
- if (SUCCEEDED(hr))
- {
- hr = pIUsbTargetFactory->CreateUsbTargetDevice(
- &pIUsbTargetDevice);
- if (FAILED(hr))
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Unable to create USB Device I/O Target %!HRESULT!",
- hr
- );
- }
- else
- {
- m_pIUsbTargetDevice = pIUsbTargetDevice;
-
- //
- // Release the creation reference as object tree will maintain a reference
- //
-
- BiometricSafeRelease(pIUsbTargetDevice);
- }
- }
-
- if (SUCCEEDED(hr))
- {
- UCHAR NumInterfaces = pIUsbTargetDevice->GetNumInterfaces();
- TraceEvents(TRACE_LEVEL_INFORMATION,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Found %u interfaces",
- NumInterfaces
- );
-
- hr = pIUsbTargetDevice->RetrieveUsbInterface(0, &pIUsbInterface);
- if (FAILED(hr))
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Unable to retrieve USB interface from USB Device I/O Target %!HRESULT!",
- hr
- );
- }
- else
- {
- m_pIUsbInterface = pIUsbInterface;
-
- BiometricSafeRelease(pIUsbInterface); // release creation reference
- }
- }
-
- if (SUCCEEDED(hr))
- {
- NumEndPoints = pIUsbInterface->GetNumEndPoints();
-
- if (NumEndPoints != NUM_WBDI_ENDPOINTS)
- {
- hr = E_UNEXPECTED;
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Has %d endpoints, expected %d, returning %!HRESULT! ",
- NumEndPoints,
- NUM_WBDI_ENDPOINTS,
- hr
- );
- }
- }
-
- if (SUCCEEDED(hr))
- {
- for (UCHAR PipeIndex = 0; PipeIndex < NumEndPoints; PipeIndex++)
- {
- hr = pIUsbInterface->RetrieveUsbPipeObject(PipeIndex,
- &pIUsbPipe);
-
- if (FAILED(hr))
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Unable to retrieve USB Pipe for PipeIndex %d, %!HRESULT!",
- PipeIndex,
- hr
- );
- }
- else
- {
- if ( pIUsbPipe->IsInEndPoint() )
- {
- if ( UsbdPipeTypeInterrupt == pIUsbPipe->GetType() )
- {
- m_pIUsbInterruptPipe = pIUsbPipe;
- }
- else if ( UsbdPipeTypeBulk == pIUsbPipe->GetType() )
- {
- m_pIUsbInputPipe = pIUsbPipe;
- }
- else
- {
- pIUsbPipe->DeleteWdfObject();
- }
- }
- else if ( pIUsbPipe->IsOutEndPoint() && (UsbdPipeTypeBulk == pIUsbPipe->GetType()) )
- {
- m_pIUsbOutputPipe = pIUsbPipe;
- }
- else
- {
- pIUsbPipe->DeleteWdfObject();
- }
-
- BiometricSafeRelease(pIUsbPipe); //release creation reference
- }
- }
-
- if (NULL == m_pIUsbInputPipe || NULL == m_pIUsbOutputPipe)
- {
- hr = E_UNEXPECTED;
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Input or output pipe not found, returning %!HRESULT!",
- hr
- );
- }
- }
-
- BiometricSafeRelease(pIUsbTargetFactory);
-
- return hr;
-}
-
-HRESULT
-CBiometricDevice::SetPowerManagement(
- VOID
- )
-/*++
-
- Routine Description:
-
- This method enables the WinUSB driver to power the device down when it is
- idle.
-
- Arguments:
-
- None
-
- Return Value:
-
- Status
-
---*/
-{
-
- HRESULT hr = S_OK;
- ULONG value = WBDI_SUSPEND_DELAY;
-
- hr = m_pIUsbTargetDevice->SetPowerPolicy( SUSPEND_DELAY,
- sizeof(ULONG),
- (PVOID) &value );
-
- if (FAILED(hr))
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Unable to set power policy (SUSPEND_DELAY) for the device %!HRESULT!",
- hr
- );
- }
-
-
- //
- // Finally enable auto-suspend.
- //
-
- if (SUCCEEDED(hr))
- {
- BOOL AutoSuspsend = TRUE;
-
- hr = m_pIUsbTargetDevice->SetPowerPolicy( AUTO_SUSPEND,
- sizeof(BOOL),
- (PVOID) &AutoSuspsend );
- }
-
- if (FAILED(hr))
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Unable to set power policy (AUTO_SUSPEND) for the device %!HRESULT!",
- hr
- );
- }
-
- return hr;
-}
-
-HRESULT
-CBiometricDevice::SendControlTransferSynchronously(
- _In_ PWINUSB_SETUP_PACKET SetupPacket,
- _Inout_updates_(BufferLength) PBYTE Buffer,
- _In_ ULONG BufferLength,
- _Out_ PULONG LengthTransferred
- )
-/*++
-
- Routine Description:
-
- This method synchronously sends a control transfer request to
- the USB I/O target.
-
- Arguments:
-
- SetupPacket - The command parameter structure
-
- Buffer - The data to transfer
-
- BufferLength - The size of the data buffer to transfer
-
- LengthTransferred - Contains the actual number of bytes transferred.
-
- Return Value:
-
- HRESULT
-
---*/
-{
- HRESULT hr = S_OK;
- IWDFIoRequest *pWdfRequest = NULL;
- IWDFDriver * FxDriver = NULL;
- IWDFMemory * FxMemory = NULL;
- IWDFRequestCompletionParams * FxComplParams = NULL;
- IWDFUsbRequestCompletionParams * FxUsbComplParams = NULL;
-
- *LengthTransferred = 0;
-
- hr = m_FxDevice->CreateRequest( NULL, //pCallbackInterface
- NULL, //pParentObject
- &pWdfRequest);
-
- if (SUCCEEDED(hr))
- {
- m_FxDevice->GetDriver(&FxDriver);
-
- hr = FxDriver->CreatePreallocatedWdfMemory( Buffer,
- BufferLength,
- NULL, //pCallbackInterface
- pWdfRequest, //pParetObject
- &FxMemory );
- }
-
- if (SUCCEEDED(hr))
- {
- hr = m_pIUsbTargetDevice->FormatRequestForControlTransfer( pWdfRequest,
- SetupPacket,
- FxMemory,
- NULL); //TransferOffset
- }
-
- if (SUCCEEDED(hr))
- {
- hr = pWdfRequest->Send( m_pIUsbTargetDevice,
- WDF_REQUEST_SEND_OPTION_SYNCHRONOUS,
- 0); //Timeout
- }
-
- if (SUCCEEDED(hr))
- {
- pWdfRequest->GetCompletionParams(&FxComplParams);
-
- hr = FxComplParams->GetCompletionStatus();
- }
-
- if (SUCCEEDED(hr))
- {
- HRESULT hrQI = FxComplParams->QueryInterface(IID_PPV_ARGS(&FxUsbComplParams));
- if (SUCCEEDED(hrQI))
- {
- FxUsbComplParams->GetDeviceControlTransferParameters( NULL,
- LengthTransferred,
- NULL,
- NULL );
- }
- }
-
- BiometricSafeRelease(FxUsbComplParams);
- BiometricSafeRelease(FxComplParams);
- BiometricSafeRelease(FxMemory);
-
- pWdfRequest->DeleteWdfObject();
- BiometricSafeRelease(pWdfRequest);
-
- BiometricSafeRelease(FxDriver);
-
- return hr;
-}
-
-WDF_IO_TARGET_STATE
-CBiometricDevice::GetTargetState(
- IWDFIoTarget * pTarget
- )
-/*++
-
- Routine Description:
-
- This method gets the state of the I/O target
-
- Arguments:
-
- pTarget - A pointer to the I/O target
-
- Return Value:
-
- WDF_IO_TARGET_STATE
-
---*/
-{
- IWDFIoTargetStateManagement * pStateMgmt = NULL;
- WDF_IO_TARGET_STATE state = WdfIoTargetStateUndefined;
-
- HRESULT hrQI = pTarget->QueryInterface(IID_PPV_ARGS(&pStateMgmt));
- if (FAILED(hrQI))
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Cannot query interface %!HRESULT!",
- hrQI
- );
-
- return state;
- }
-
- state = pStateMgmt->GetState();
-
- BiometricSafeRelease(pStateMgmt);
-
- return state;
-}
-
-HRESULT
-CBiometricDevice::InitiatePendingRead(
- VOID
- )
-/*++
-
- Routine Description:
-
- This routine starts up a cycling read on the interrupt pipe. As each
- read completes it will start up the next one.
-
- Arguments:
-
- None
-
- Return Value:
-
- Status
-
---*/
-{
- HRESULT hr = S_OK;
- IWDFIoRequest * FxRequest = NULL;
- IWDFMemory * FxMemory = NULL;
- IWDFDriver * FxDriver = NULL;
- IRequestCallbackRequestCompletion * FxComplCallback = NULL;
-
- hr = m_FxDevice->CreateRequest(NULL, NULL, &FxRequest);
-
- if (SUCCEEDED(hr))
- {
- m_FxDevice->GetDriver(&FxDriver);
-
- hr = FxDriver->CreatePreallocatedWdfMemory( (PBYTE) &m_InterruptMessage,
- sizeof(m_InterruptMessage),
- NULL, //pCallbackInterface
- FxRequest, //pParetObject
- &FxMemory );
- }
-
- if (SUCCEEDED(hr))
- {
- hr = m_pIUsbInterruptPipe->FormatRequestForRead(FxRequest,
- NULL, //pFile - IoTarget would apply its file
- FxMemory,
- NULL, //Memory offset
- NULL); //Device offset
- }
-
- if (SUCCEEDED(hr))
- {
- hr = this->QueryInterface(IID_PPV_ARGS(&FxComplCallback));
- if (SUCCEEDED(hr))
- {
- FxRequest->SetCompletionCallback(FxComplCallback, NULL);
-
- hr = FxRequest->Send(m_pIUsbInterruptPipe, 0, 0);
- }
- }
-
- if (FAILED(hr))
- {
- m_InterruptReadProblem = hr;
-
- if (FxRequest)
- {
- FxRequest->DeleteWdfObject();
- }
- }
-
- BiometricSafeRelease(FxRequest);
- BiometricSafeRelease(FxMemory);
- BiometricSafeRelease(FxDriver);
- BiometricSafeRelease(FxComplCallback);
-
- return hr;
-}
-
-VOID
-CBiometricDevice::OnCompletion(
- _In_ IWDFIoRequest* FxRequest,
- _In_ IWDFIoTarget* pIoTarget,
- _In_ IWDFRequestCompletionParams* pParams,
- _In_ PVOID pContext
- )
-/*++
-
- Routine Description:
-
- This method is called when the asynchronous pending
- read on the interrupt pipe completes.
-
- Arguments:
-
- FxRequest - The request object
-
- pIoTarget - The I/O target for the request
-
- pParams - The completion parameters
-
- pContext - Optional context
-
- Return Value:
-
- None
-
---*/
-{
- UNREFERENCED_PARAMETER(pIoTarget);
- UNREFERENCED_PARAMETER(pContext);
-
- IWDFUsbRequestCompletionParams * pUsbComplParams = NULL;
- IWDFMemory * FxMemory = NULL;
- SIZE_T bytesRead = 0;
- HRESULT hrCompletion = pParams->GetCompletionStatus();
-
- TraceEvents(TRACE_LEVEL_INFORMATION,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Pending read completed with %!hresult!",
- hrCompletion
- );
-
- if (FAILED(hrCompletion))
- {
- m_InterruptReadProblem = hrCompletion;
- }
- else
- {
- //
- // Get the interrupt message
- //
-
- HRESULT hrQI = pParams->QueryInterface(IID_PPV_ARGS(&pUsbComplParams));
- if (SUCCEEDED(hrQI))
- {
- pUsbComplParams->GetPipeReadParameters(&FxMemory, &bytesRead, NULL);
- if (bytesRead == sizeof(INTERRUPT_MESSAGE))
- {
-
- PVOID pBuff = FxMemory->GetDataBuffer(NULL);
- CopyMemory(&m_InterruptMessage, pBuff, sizeof(m_InterruptMessage));
-
- //
- // TODO: Parse m_InterruptMessage
- //
- }
- }
- }
-
- //
- // Don't complete the request since we created it, just delete it.
- //
-
- FxRequest->DeleteWdfObject();
-
- //
- // Re-initiate pending read if I/O Target is not stopped/removed
- //
-
- if (WdfIoTargetStarted == GetTargetState(m_pIUsbInterruptPipe))
- {
- int numRetries = 0;
- HRESULT hr = InitiatePendingRead();
-
- //
- // If we fail here, the device will become unresponsive.
- // Re-issue the request until it succeeds.
- //
- for (numRetries = 0; FAILED(hr) && numRetries < 3; ++numRetries)
- {
- hr = InitiatePendingRead();
- }
- }
-
- BiometricSafeRelease(pUsbComplParams);
- BiometricSafeRelease(FxMemory);
-}
-
-
-//
-// I/O handlers
-//
-
-void
-CBiometricDevice::GetIoRequestParams(
- _In_ IWDFIoRequest *FxRequest,
- _Out_ ULONG *MajorControlCode,
- _Outptr_result_bytebuffer_(*InputBufferSizeInBytes) PUCHAR *InputBuffer,
- _Out_ SIZE_T *InputBufferSizeInBytes,
- _Outptr_result_bytebuffer_(*OutputBufferSizeInBytes) PUCHAR *OutputBuffer,
- _Out_ SIZE_T *OutputBufferSizeInBytes
- )
-/*++
-
- Routine Description:
-
- This method retrieves the input and output buffers associated with the request.
-
- Arguments:
-
- FxRequest - The WDF request oject
-
- MajorControlCode - Contains the control code for the I/O request
-
- InputBuffer - Contains the input buffer pointer
-
- InputBufferSizeInBytes - Contains the size of the input buffer
-
- OutputBuffer - Contains the output buffer pointer
-
- OutputBufferSizeInBytes - Contains the size of the output buffer
-
- Return Value:
-
- None
-
---*/
-{
- //
- // Get main parameters
- //
- FxRequest->GetDeviceIoControlParameters(MajorControlCode,
- InputBufferSizeInBytes,
- OutputBufferSizeInBytes);
-
- // Get pointer to input buffer
- IWDFMemory *fxMemory = NULL;
- FxRequest->GetInputMemory(&fxMemory);
- if (fxMemory)
- {
- *InputBuffer = (PUCHAR) fxMemory->GetDataBuffer(InputBufferSizeInBytes);
- BiometricSafeRelease(fxMemory);
- }
-
- // Save pointer to reply buffer
- fxMemory = NULL;
- FxRequest->GetOutputMemory(&fxMemory);
- if (fxMemory)
- {
- *OutputBuffer = (PUCHAR) fxMemory->GetDataBuffer(OutputBufferSizeInBytes);
- BiometricSafeRelease(fxMemory);
- }
-}
-
-void
-CBiometricDevice::OnGetAttributes(
- _Inout_ IWDFIoRequest *FxRequest
- )
-/*++
-
- Routine Description:
-
- This method is invoked when the IOCTL_BIOMETRIC_GET_ATTRIBUTES command is called.
-
- Arguments:
-
- FxRequest - The output for this request is a PWINBIO_SENSOR_ATTRIBUTES.
-
- Return Value:
-
- None
-
---*/
-{
- CRequestHelper MyRequest(FxRequest); // RAII helper class
- ULONG controlCode = 0;
- PUCHAR inputBuffer= NULL;
- SIZE_T inputBufferSize = 0;
- PWINBIO_SENSOR_ATTRIBUTES sensorAttributes = NULL;
- SIZE_T outputBufferSize;
-
- //
- // Get the request parameters
- //
- GetIoRequestParams(FxRequest,
- &controlCode,
- &inputBuffer,
- &inputBufferSize,
- (PUCHAR *)&sensorAttributes,
- &outputBufferSize);
-
- //
- // Make sure we have an output buffer big enough
- //
- if (sensorAttributes == NULL || outputBufferSize < sizeof(DWORD))
- {
- // We cannot return size information.
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC!Output buffer NULL or too small to return size information.");
- MyRequest.SetCompletionHr(E_INVALIDARG);
- return;
- }
-
- // We only have one supported format, so sizeof (WINBIO_SENSOR_ATTRIBUTES) is sufficient.
- if (outputBufferSize < sizeof(WINBIO_SENSOR_ATTRIBUTES))
- {
- // Buffer too small.
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC!Buffer too small - return size necessary in PayloadSize - 0x%x.", sizeof(WINBIO_SENSOR_ATTRIBUTES));
- sensorAttributes->PayloadSize = (DWORD) sizeof(WINBIO_SENSOR_ATTRIBUTES);
- MyRequest.SetInformation(sizeof(DWORD));
- MyRequest.SetCompletionHr(S_OK);
- return;
- }
-
- //
- // Fill in the attribute payload structure
- //
- RtlZeroMemory(sensorAttributes, outputBufferSize);
- sensorAttributes->PayloadSize = (DWORD) sizeof(WINBIO_SENSOR_ATTRIBUTES);
- sensorAttributes->WinBioHresult = S_OK;
- sensorAttributes->WinBioVersion.MajorVersion = WINBIO_WBDI_MAJOR_VERSION;
- sensorAttributes->WinBioVersion.MinorVersion = WINBIO_WBDI_MINOR_VERSION;
- sensorAttributes->SensorType = WINBIO_TYPE_FINGERPRINT;
- sensorAttributes->SensorSubType = WINBIO_FP_SENSOR_SUBTYPE_SWIPE;
- sensorAttributes->Capabilities = WINBIO_CAPABILITY_SENSOR;
- sensorAttributes->SupportedFormatEntries = 1;
- sensorAttributes->SupportedFormat[0].Owner = WINBIO_ANSI_381_FORMAT_OWNER;
- sensorAttributes->SupportedFormat[0].Type= WINBIO_ANSI_381_FORMAT_TYPE;
- RtlCopyMemory(sensorAttributes->ManufacturerName, SAMPLE_MANUFACTURER_NAME, (wcslen(SAMPLE_MANUFACTURER_NAME)+1)*sizeof(WCHAR));
- RtlCopyMemory(sensorAttributes->ModelName, SAMPLE_MODEL_NAME, (wcslen(SAMPLE_MODEL_NAME)+1)*sizeof(WCHAR));
- RtlCopyMemory(sensorAttributes->SerialNumber, SAMPLE_SERIAL_NUMBER, (wcslen(SAMPLE_SERIAL_NUMBER)+1)*sizeof(WCHAR));
- sensorAttributes->FirmwareVersion.MajorVersion = 1;
- sensorAttributes->FirmwareVersion.MinorVersion = 0;
-
- MyRequest.SetInformation(sensorAttributes->PayloadSize);
- MyRequest.SetCompletionHr(S_OK);
-}
-
-
-void
-CBiometricDevice::OnReset(
- _Inout_ IWDFIoRequest *FxRequest
- )
-/*++
-
- Routine Description:
-
- This method is invoked when the IOCTL_BIOMETRIC_RESET command is called.
-
- Arguments:
-
- FxRequest -
-
- Return Value:
-
- None
-
---*/
-{
- CRequestHelper MyRequest(FxRequest); // RAII helper class
- ULONG controlCode = 0;
- PUCHAR inputBuffer= NULL;
- SIZE_T inputBufferSize = 0;
- PWINBIO_BLANK_PAYLOAD blankPayload = NULL;
- SIZE_T outputBufferSize;
-
- //
- // Get the request parameters
- //
- GetIoRequestParams(FxRequest,
- &controlCode,
- &inputBuffer,
- &inputBufferSize,
- (PUCHAR *)&blankPayload,
- &outputBufferSize);
-
- //
- // Make sure we have an output buffer big enough
- //
- if (blankPayload== NULL || outputBufferSize < sizeof(DWORD))
- {
- // We cannot return size information.
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC!Output buffer NULL or too small to return size information.");
- MyRequest.SetInformation(sizeof(DWORD));
- MyRequest.SetCompletionHr(S_OK);
- MyRequest.SetCompletionHr(E_INVALIDARG);
- return;
- }
-
- if (outputBufferSize < sizeof(WINBIO_BLANK_PAYLOAD))
- {
- // Buffer too small.
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC!Buffer too small - return size necessary in PayloadSize - 0x%x.", sizeof(WINBIO_DIAGNOSTICS));
- MyRequest.SetInformation(sizeof(DWORD));
- MyRequest.SetCompletionHr(S_OK);
- return;
- }
-
- //
- // This is a simulated device. Nothing to do here except cancel the pending data
- // collection I/O, if one exists.
- //
- CompletePendingRequest(HRESULT_FROM_WIN32(ERROR_CANCELLED), 0);
-
- //
- // Fill in the OUT payload structure
- //
- RtlZeroMemory(blankPayload, outputBufferSize);
- blankPayload->PayloadSize = (DWORD) sizeof(WINBIO_BLANK_PAYLOAD);
- blankPayload->WinBioHresult = S_OK;
-
- FxRequest->SetInformation(blankPayload->PayloadSize);
- MyRequest.SetCompletionHr(S_OK);
-
-}
-
-void
-CBiometricDevice::OnCalibrate(
- _Inout_ IWDFIoRequest *FxRequest
- )
-/*++
-
- Routine Description:
-
- This method is invoked when the IOCTL_BIOMETRIC_CALIBRATE command is called.
-
- Arguments:
-
- FxRequest -
- IN - blank payload
- OUT - PWINBIO_CALIBRATION_INFO
-
- Return Value:
-
- None
-
---*/
-{
- CRequestHelper MyRequest(FxRequest); // RAII helper class
- ULONG controlCode = 0;
- PUCHAR inputBuffer= NULL;
- SIZE_T inputBufferSize = 0;
- PWINBIO_CALIBRATION_INFO calibrationInfo = NULL;
- SIZE_T outputBufferSize;
-
- //
- // Get the request parameters
- //
- GetIoRequestParams(FxRequest,
- &controlCode,
- &inputBuffer,
- &inputBufferSize,
- (PUCHAR *)&calibrationInfo,
- &outputBufferSize);
-
- //
- // Make sure we have an output buffer big enough
- //
- if (calibrationInfo == NULL || outputBufferSize < sizeof(DWORD))
- {
- // We cannot return size information.
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC!Output buffer NULL or too small to return size information.");
- MyRequest.SetCompletionHr(E_INVALIDARG);
- return;
- }
-
- if (outputBufferSize < sizeof(WINBIO_CALIBRATION_INFO))
- {
- // Buffer too small.
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC!Buffer too small - return size necessary in PayloadSize - 0x%x.", sizeof(WINBIO_DIAGNOSTICS));
- calibrationInfo->PayloadSize = (DWORD) sizeof(WINBIO_CALIBRATION_INFO);
- MyRequest.SetInformation(sizeof(DWORD));
- MyRequest.SetCompletionHr(S_OK);
- return;
- }
-
- //
- // This is where code to calibrate the device goes.
- //
-
- //
- // Fill in the OUT payload structure
- //
- RtlZeroMemory(calibrationInfo, outputBufferSize);
- calibrationInfo->PayloadSize = (DWORD) sizeof(WINBIO_CALIBRATION_INFO);
- calibrationInfo->WinBioHresult = S_OK;
-
- MyRequest.SetInformation(calibrationInfo->PayloadSize);
- MyRequest.SetCompletionHr(S_OK);
-}
-
-
-void
-CBiometricDevice::OnGetSensorStatus(
- _Inout_ IWDFIoRequest *FxRequest
- )
-/*++
-
- Routine Description:
-
- This method is invoked when the IOCTL_BIOMETRIC_GET_SENSOR_STATUS command is called.
-
- Arguments:
-
- FxRequest -
- IN payload: none
- OUT payload: PWINBIO_DIAGNOSTICS
-
- Return Value:
-
- None
-
---*/
-{
- CRequestHelper MyRequest(FxRequest); // RAII helper class
- ULONG controlCode = 0;
- PUCHAR inputBuffer= NULL;
- SIZE_T inputBufferSize = 0;
- PWINBIO_DIAGNOSTICS diagnostics = NULL;
- SIZE_T outputBufferSize;
-
- //
- // Get the request parameters
- //
- GetIoRequestParams(FxRequest,
- &controlCode,
- &inputBuffer,
- &inputBufferSize,
- (PUCHAR *)&diagnostics,
- &outputBufferSize);
-
- //
- // Make sure we have an output buffer big enough
- //
- if (diagnostics == NULL || outputBufferSize < sizeof(DWORD))
- {
- // We cannot return size information.
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC!Output buffer NULL or too small to return size information.");
- MyRequest.SetCompletionHr(E_INVALIDARG);
- return;
- }
-
- if (outputBufferSize < sizeof(WINBIO_DIAGNOSTICS))
- {
- // Buffer too small.
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC!Buffer too small - return size necessary in PayloadSize - 0x%x.", sizeof(WINBIO_DIAGNOSTICS));
- diagnostics->PayloadSize = (DWORD) sizeof(WINBIO_DIAGNOSTICS);
- MyRequest.SetInformation(sizeof(DWORD));
- MyRequest.SetCompletionHr(S_OK);
- return;
- }
-
- //
- // Fill in the OUT payload structure
- //
- RtlZeroMemory(diagnostics, outputBufferSize);
- diagnostics->PayloadSize = (DWORD) sizeof(WINBIO_DIAGNOSTICS);
- diagnostics->WinBioHresult = S_OK;
- diagnostics->SensorStatus = WINBIO_SENSOR_READY;
-
- MyRequest.SetInformation(diagnostics->PayloadSize);
- MyRequest.SetCompletionHr(S_OK);
-}
-
-
-void
-CBiometricDevice::OnCaptureData(
- _Inout_ IWDFIoRequest *FxRequest
- )
-/*++
-
- Routine Description:
-
- This method is invoked when the IOCTL_BIOMETRIC_CAPTURE_DATA command is called.
-
- Arguments:
-
- FxRequest -
- IN payload: PWINBIO_CAPTURE_PARAMETERS
- OUT payload: PWINBIO_CAPTURE_DATA
-
- Return Value:
-
- None
-
---*/
-{
- ULONG controlCode = 0;
- PWINBIO_CAPTURE_PARAMETERS captureParams = NULL;
- SIZE_T inputBufferSize = 0;
- PWINBIO_CAPTURE_DATA captureData = NULL;
- SIZE_T outputBufferSize = 0;
-
- //
- // We can only have one outstanding data capture request at a time.
- // Check to see if we have a request pending.
- //
- bool requestPending = false;
-
- EnterCriticalSection(&m_RequestLock);
-
- if (m_PendingRequest == NULL)
- {
- //
- // See if we have an active sleep thread.
- // If so, tell it to exit.
- // Wait for it to exit.
- //
- if (m_SleepThread != INVALID_HANDLE_VALUE)
- {
- LeaveCriticalSection(&m_RequestLock);
-
- // TODO: Add code to signal thread to exit.
-
- // NOTE: Sleeping for INFINITE time is dangerous. A real driver
- // should be able to handle the case where the thread does
- // not exit.
- WaitForSingleObject(m_SleepThread, INFINITE);
- CloseHandle(m_SleepThread);
- m_SleepThread = INVALID_HANDLE_VALUE;
-
- EnterCriticalSection(&m_RequestLock);
- }
-
- //
- // We might have had to leave the CS to wait for the sleep thread.
- // Double check that the pending request is still NULL.
- //
- if (m_PendingRequest == NULL)
- {
- // Save the request.
- m_PendingRequest = FxRequest;
-
- // Mark the request as cancellable.
- m_PendingRequest->MarkCancelable(this);
- }
- else
- {
- requestPending = true;
- }
-
- }
- else
- {
- requestPending = true;
- }
-
- LeaveCriticalSection(&m_RequestLock);
-
- if (requestPending)
- {
- // Complete the request to tell the app that there is already
- // a pending data collection request.
- FxRequest->Complete(WINBIO_E_DATA_COLLECTION_IN_PROGRESS);
- return;
- }
-
- //
- // Get the request parameters
- //
- GetIoRequestParams(FxRequest,
- &controlCode,
- (PUCHAR *)&captureParams,
- &inputBufferSize,
- (PUCHAR *)&captureData,
- &outputBufferSize);
-
- //
- // Check input parameters.
- //
- if (inputBufferSize < sizeof (WINBIO_CAPTURE_PARAMETERS))
- {
- // Invalid arguments
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC!Invalid argument(s).");
- CompletePendingRequest(E_INVALIDARG, 0);
- return;
- }
-
- //
- // Make sure we have an output buffer big enough
- //
- if (outputBufferSize < sizeof(DWORD))
- {
- // We cannot return size information.
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC!Output buffer NULL or too small to return size information.");
- CompletePendingRequest(E_INVALIDARG, 0);
- return;
- }
-
- //
- // Check output buffer size.
- //
- if (outputBufferSize < sizeof (WINBIO_CAPTURE_DATA))
- {
- // Buffer too small.
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC!Buffer too small - must be at least 0x%x.", sizeof (WINBIO_CAPTURE_DATA));
- //
- // NOTE: The output buffer size necessary for this sample is sizeof(WINBIO_CAPTURE_DATA).
- // Real devices will need additional space to handle a typical capture.
- // The value that should be returned here is sizeof(WINBIO_CAPTURE_DATA) + CaptureBufferSize.
- //
- captureData->PayloadSize = (DWORD) sizeof(WINBIO_CAPTURE_DATA);
- CompletePendingRequest(S_OK, sizeof(DWORD));
- return;
- }
-
- //
- // NOTE: This call always fails in this sample since it is not
- // written for a real device.
- //
-
- //
- // Set default values in output buffer.
- //
- captureData->PayloadSize = (DWORD) sizeof (WINBIO_CAPTURE_DATA);
- captureData->WinBioHresult = WINBIO_E_NO_CAPTURE_DATA;
- captureData->SensorStatus = WINBIO_SENSOR_FAILURE;
- captureData->RejectDetail= 0;
- captureData->CaptureData.Size = 0;
-
- //
- // Check purpose, format and type.
- //
- if (captureParams->Purpose == WINBIO_NO_PURPOSE_AVAILABLE)
- {
- captureData->WinBioHresult = WINBIO_E_UNSUPPORTED_PURPOSE;
- }
- else if ((captureParams->Format.Type != WINBIO_ANSI_381_FORMAT_TYPE) ||
- (captureParams->Format.Owner != WINBIO_ANSI_381_FORMAT_OWNER))
- {
- captureData->WinBioHresult = WINBIO_E_UNSUPPORTED_DATA_FORMAT;
- }
- else if (captureParams->Flags != WINBIO_DATA_FLAG_RAW)
- {
- captureData->WinBioHresult = WINBIO_E_UNSUPPORTED_DATA_TYPE;
- }
-
- //
- // NOTE: This sample completes the request after
- // sleeping for 5 seconds. A real driver would
- // program the device for capture mode, and then
- // return from this callback. The request would
- // remain pending until cancelled, or until the
- // driver detects a capture is complete.
- //
- // The construct of m_PendingRequest will allow
- // a driver to have only one pending request at any
- // time, which can be cancelled in a Reset IOCTL, or
- // by calling CancelIoEx.
- //
-
- //
- // Create thread to sleep 5 seconds before completing the request.
- //
- m_SleepParams.SleepValue = 5;
- m_SleepParams.Hr = S_OK;
- m_SleepParams.Information = captureData->PayloadSize;
- m_SleepThread = CreateThread(NULL, // default security attributes
- 0, // use default stack size
- CaptureSleepThread, // thread function name
- this, // argument to thread function
- 0, // use default creation flags
- NULL); // returns the thread identifier
-}
-
-
-void
-CBiometricDevice::OnUpdateFirmware(
- _Inout_ IWDFIoRequest *FxRequest
- )
-/*++
-
- Routine Description:
-
- This method is invoked when the IOCTL_BIOMETRIC_UPDATE_FIRMWARE command is called.
-
- Arguments:
-
- FxRequest -
-
- Return Value:
-
- None
-
---*/
-{
- FxRequest->Complete(E_NOTIMPL);
-}
-
-void
-CBiometricDevice::OnGetSupportedAlgorithms(
- _Inout_ IWDFIoRequest *FxRequest
- )
-/*++
-
- Routine Description:
-
- This method is invoked when the IOCTL_BIOMETRIC_GET_SUPPORTED_ALGORITHMS command is called.
-
- Arguments:
-
- FxRequest -
-
- Return Value:
-
- None
-
---*/
-{
- FxRequest->Complete(E_NOTIMPL);
-}
-
-void
-CBiometricDevice::OnGetIndicator(
- _Inout_ IWDFIoRequest *FxRequest
- )
-/*++
-
- Routine Description:
-
- This method is invoked when the IOCTL_BIOMETRIC_GET_INDICATOR command is called.
-
- Arguments:
-
- FxRequest -
-
- Return Value:
-
- None
-
---*/
-{
- FxRequest->Complete(E_NOTIMPL);
-}
-
-
-void
-CBiometricDevice::OnSetIndicator(
- _Inout_ IWDFIoRequest *FxRequest
- )
-/*++
-
- Routine Description:
-
- This method is invoked when the IOCTL_BIOMETRIC_SET_INDICATOR command is called.
-
- Arguments:
-
- FxRequest -
-
- Return Value:
-
- None
-
---*/
-{
- FxRequest->Complete(E_NOTIMPL);
-}
-
-void
-CBiometricDevice::OnControlUnit(
- _Inout_ IWDFIoRequest *FxRequest
- )
-/*++
-
- Routine Description:
-
- This method is invoked when the IOCTL_BIOMETRIC_CONTROL_UNIT command is called.
-
- Arguments:
-
- FxRequest -
-
- Return Value:
-
- None
-
---*/
-{
- FxRequest->Complete(E_NOTIMPL);
-}
-
-
-VOID
-CBiometricDevice::CompletePendingRequest(
- HRESULT hr,
- DWORD information
- )
-{
- EnterCriticalSection(&m_RequestLock);
-
- if (m_PendingRequest)
- {
- //
- // Only complete the request if we weren't cancelled. Otherwise, the
- // OnCancel callback will complete the request.
- //
- HRESULT hrUnmark = m_PendingRequest->UnmarkCancelable();
- if (HRESULT_FROM_WIN32(ERROR_OPERATION_ABORTED) != hrUnmark)
- {
- m_PendingRequest->SetInformation(information);
- m_PendingRequest->Complete(hr);
- m_PendingRequest = NULL;
- }
- }
-
- LeaveCriticalSection(&m_RequestLock);
-}
-
-VOID
-STDMETHODCALLTYPE
-CBiometricDevice::OnCancel(
- _In_ IWDFIoRequest *pWdfRequest
- )
-{
- EnterCriticalSection(&m_RequestLock);
-
- if (m_PendingRequest != pWdfRequest)
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Cancelled request does not match pending request.");
- }
-
- //
- // TODO: In a real driver, the device would be reset so that it is no longer in capture mode.
- // Add your code to do so here.
- //
-
- if (m_PendingRequest == NULL)
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_DEVICE,
- "%!FUNC! Pending request is NULL.");
- }
- else
- {
- m_PendingRequest->Complete(HRESULT_FROM_WIN32(ERROR_OPERATION_ABORTED));
- m_PendingRequest = NULL;
- }
-
- LeaveCriticalSection(&m_RequestLock);
-}
diff --git a/biometrics/driver/Device.h b/biometrics/driver/Device.h
deleted file mode 100644
index 690943255..000000000
--- a/biometrics/driver/Device.h
+++ /dev/null
@@ -1,360 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- Device.h
-
-Abstract:
-
- This module contains the type definitions of the Biometric
- device driver.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-
-//
-// TODO: Change this to match your device
-//
-#define NUM_WBDI_ENDPOINTS 3
-
-//
-// Power policy suspend delay time. 10 seconds.
-//
-#define WBDI_SUSPEND_DELAY ((ULONG)(10 * 1000))
-
-//
-// Struct for passing parameters for capture request completion.
-//
-typedef struct _CAPTURE_SLEEP_PARAMS
-{
- DWORD SleepValue;
- HRESULT Hr;
- DWORD Information;
-} CAPTURE_SLEEP_PARAMS, *PCAPTURE_SLEEP_PARAMS;
-
-
-//
-// Class for the Biometric driver.
-//
-
-class CBiometricDevice :
- public CComObjectRootEx,
- public IRequestCallbackRequestCompletion,
- public IRequestCallbackCancel,
- public IPnpCallbackHardware
-{
-public:
-
- DECLARE_NOT_AGGREGATABLE(CBiometricDevice)
-
- BEGIN_COM_MAP(CBiometricDevice)
- COM_INTERFACE_ENTRY(IPnpCallbackHardware)
- COM_INTERFACE_ENTRY(IRequestCallbackRequestCompletion)
- COM_INTERFACE_ENTRY(IRequestCallbackCancel)
- END_COM_MAP()
-
- CBiometricDevice() :
- m_FxDevice(NULL),
- m_IoQueue(NULL),
- m_pIUsbTargetDevice(NULL),
- m_pIUsbInterface(NULL),
- m_pIUsbInputPipe(NULL),
- m_pIUsbOutputPipe(NULL),
- m_pIUsbInterruptPipe(NULL),
- m_PendingRequest(NULL),
- m_Speed(0),
- m_InterruptReadProblem(S_OK),
- m_SleepThread(INVALID_HANDLE_VALUE)
- {
- InitializeCriticalSection(&m_RequestLock);
- }
-
- ~CBiometricDevice()
- {
- DeleteCriticalSection(&m_RequestLock);
- }
-
-//
-// Private data members.
-//
-private:
-
- //
- // Weak reference to framework device object.
- //
- IWDFDevice * m_FxDevice;
-
- //
- // Weak reference to I/O queue
- //
- PCBiometricIoQueue m_IoQueue;
-
- //
- // USB Device I/O Target
- //
- IWDFUsbTargetDevice * m_pIUsbTargetDevice;
-
- //
- // USB Interface
- //
- IWDFUsbInterface * m_pIUsbInterface;
-
- //
- // USB Input pipe for Reads
- //
- IWDFUsbTargetPipe * m_pIUsbInputPipe;
-
- //
- // USB Output pipe for writes
- //
- IWDFUsbTargetPipe * m_pIUsbOutputPipe;
-
- //
- // USB interrupt pipe
- //
- IWDFUsbTargetPipe * m_pIUsbInterruptPipe;
-
- //
- // Device Speed (Low, Full, High)
- //
- UCHAR m_Speed;
-
- //
- // If reads stopped because of a transient problem, the error status
- // is stored here.
- //
-
- HRESULT m_InterruptReadProblem;
-
- //
- // Interrupt message buffer
- //
-
- INTERRUPT_MESSAGE m_InterruptMessage;
-
- //
- // Holds a reference to a pending data I/O request.
- //
-
- IWDFIoRequest *m_PendingRequest;
-
- //
- // Synchronization for m_PendingRequest
- //
-
- CRITICAL_SECTION m_RequestLock;
-
- //
- // Handle to a thread that will sleep before completing a request.
- //
- HANDLE m_SleepThread;
- CAPTURE_SLEEP_PARAMS m_SleepParams;
-
-//
-// Private methods.
-//
-private:
-
- HRESULT
- Initialize(
- _In_ IWDFDriver *FxDriver,
- _In_ IWDFDeviceInitialize *FxDeviceInit
- );
-
- //
- // Helper methods
- //
-
- HRESULT
- CreateUsbIoTargets(
- VOID
- );
-
- HRESULT
- SetPowerManagement(
- VOID
- );
-
- //
- // Helper functions
- //
-
- HRESULT
- SendControlTransferSynchronously(
- _In_ PWINUSB_SETUP_PACKET SetupPacket,
- _Inout_updates_(BufferLength) PBYTE Buffer,
- _In_ ULONG BufferLength,
- _Out_ PULONG LengthTransferred
- );
-
- static
- WDF_IO_TARGET_STATE
- GetTargetState(
- IWDFIoTarget * pTarget
- );
-
- HRESULT
- InitiatePendingRead(
- );
-
-//
-// Public methods
-//
-public:
-
- //
- // The factory method used to create an instance of this driver.
- //
-
- static
- HRESULT
- CreateInstanceAndInitialize(
- _In_ IWDFDriver *FxDriver,
- _In_ IWDFDeviceInitialize *FxDeviceInit,
- _Out_ CBiometricDevice **Device
- );
-
- HRESULT
- Configure(
- VOID
- );
-
-//
-// COM methods
-//
-public:
-
- //
- // IPnpCallbackHardware
- //
-
- virtual
- HRESULT
- STDMETHODCALLTYPE
- OnPrepareHardware(
- _In_ IWDFDevice *FxDevice
- );
-
- virtual
- HRESULT
- STDMETHODCALLTYPE
- OnReleaseHardware(
- _In_ IWDFDevice *FxDevice
- );
-
-
- //
- // IRequestCallbackRequestCompletion
- //
- virtual
- void
- STDMETHODCALLTYPE
- OnCompletion(
- _In_ IWDFIoRequest* FxRequest,
- _In_ IWDFIoTarget* pIoTarget,
- _In_ IWDFRequestCompletionParams* pParams,
- _In_ PVOID pContext
- );
-
- //
- // IRequestCallbackCancel
- //
- virtual
- VOID
- STDMETHODCALLTYPE
- OnCancel(
- _In_ IWDFIoRequest *pWdfRequest
- );
-
-public:
-
- //
- // I/O handlers.
- //
- void
- GetIoRequestParams(
- _In_ IWDFIoRequest *FxRequest,
- _Out_ ULONG *MajorControlCode,
- _Outptr_result_bytebuffer_(*InputBufferSizeInBytes) PUCHAR *InputBuffer,
- _Out_ SIZE_T *InputBufferSizeInBytes,
- _Outptr_result_bytebuffer_(*OutputBufferSizeInBytes) PUCHAR *OutputBuffer,
- _Out_ SIZE_T *OutputBufferSizeInBytes
- );
-
- void
- OnGetAttributes(
- _Inout_ IWDFIoRequest *FxRequest
- );
-
- void
- OnReset(
- _Inout_ IWDFIoRequest *FxRequest
- );
-
- void
- OnCalibrate(
- _Inout_ IWDFIoRequest *FxRequest
- );
-
- void
- OnGetSensorStatus(
- _Inout_ IWDFIoRequest *FxRequest
- );
-
- void
- OnCaptureData(
- _Inout_ IWDFIoRequest *FxRequest
- );
-
- void
- OnUpdateFirmware(
- _Inout_ IWDFIoRequest *FxRequest
- );
-
- void
- OnGetSupportedAlgorithms(
- _Inout_ IWDFIoRequest *FxRequest
- );
-
- void
- OnGetIndicator(
- _Inout_ IWDFIoRequest *FxRequest
- );
-
- void
- OnSetIndicator(
- _Inout_ IWDFIoRequest *FxRequest
- );
-
- void
- OnControlUnit(
- _Inout_ IWDFIoRequest *FxRequest
- );
-
- VOID
- CompletePendingRequest(
- HRESULT hr,
- DWORD information
- );
-
- inline PCAPTURE_SLEEP_PARAMS
- GetCaptureSleepParams()
- {
- return &m_SleepParams;
- }
-
-};
-
-
diff --git a/biometrics/driver/Driver.cpp b/biometrics/driver/Driver.cpp
deleted file mode 100644
index 0d5c0797f..000000000
--- a/biometrics/driver/Driver.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- Driver.cpp
-
-Abstract:
-
- This module contains the implementation of the Biometric
- core driver callback object.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#include "internal.h"
-#include "driver.tmh"
-
-HRESULT
-CBiometricDriver::OnDeviceAdd(
- _In_ IWDFDriver *FxWdfDriver,
- _In_ IWDFDeviceInitialize *FxDeviceInit
- )
-/*++
-
- Routine Description:
-
- The FX invokes this method when it wants to install our driver on a device
- stack. This method creates a device callback object, then calls the Fx
- to create an Fx device object and associate the new callback object with
- it.
-
- Arguments:
-
- FxWdfDriver - the Fx driver object.
-
- FxDeviceInit - the initialization information for the device.
-
- Return Value:
-
- status
-
---*/
-{
- HRESULT hr = S_OK;
- CBiometricDevice *device = NULL;
-
- //
- // Create device callback object
- //
-
- hr = CBiometricDevice::CreateInstanceAndInitialize(FxWdfDriver,
- FxDeviceInit,
- &device);
-
- //
- // Call the device's construct method. This
- // allows the device to create any queues or other structures that it
- // needs now that the corresponding fx device object has been created.
- //
-
- if (SUCCEEDED(hr))
- {
- hr = device->Configure();
- }
-
- return hr;
-}
diff --git a/biometrics/driver/Driver.h b/biometrics/driver/Driver.h
deleted file mode 100644
index 0fc2566a9..000000000
--- a/biometrics/driver/Driver.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- Driver.h
-
-Abstract:
-
- This module contains the type definitions for the Biometric
- driver callback class.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-
-//
-// This class handles driver events for the skeleton sample. In particular
-// it supports the OnDeviceAdd event, which occurs when the driver is called
-// to setup per-device handlers for a new device stack.
-//
-
-EXTERN_C const CLSID CLSID_BiometricUsbSample;
-
-class CBiometricDriver :
- public CComObjectRootEx,
- public CComCoClass,
- public IDriverEntry
-{
-public:
-
- CBiometricDriver()
- {
- }
-
- DECLARE_NO_REGISTRY()
-
- DECLARE_NOT_AGGREGATABLE(CBiometricDriver)
-
- BEGIN_COM_MAP(CBiometricDriver)
- COM_INTERFACE_ENTRY(IDriverEntry)
- END_COM_MAP()
-
-//
-// Public methods
-//
-public:
-
- //
- // IDriverEntry methods
- //
-
- virtual
- HRESULT
- STDMETHODCALLTYPE
- OnInitialize(
- _In_ IWDFDriver *FxWdfDriver
- )
- {
- UNREFERENCED_PARAMETER(FxWdfDriver);
- return S_OK;
- }
-
- virtual
- HRESULT
- STDMETHODCALLTYPE
- OnDeviceAdd(
- _In_ IWDFDriver *FxWdfDriver,
- _In_ IWDFDeviceInitialize *FxDeviceInit
- );
-
- virtual
- VOID
- STDMETHODCALLTYPE
- OnDeinitialize(
- _In_ IWDFDriver *FxWdfDriver
- )
- {
- UNREFERENCED_PARAMETER(FxWdfDriver);
- return;
- }
-
-};
-
-OBJECT_ENTRY_AUTO(CLSID_BiometricUsbSample, CBiometricDriver)
diff --git a/biometrics/driver/Internalsrc.cpp b/biometrics/driver/Internalsrc.cpp
deleted file mode 100644
index 1e8fe6f23..000000000
--- a/biometrics/driver/Internalsrc.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "Internal.h"
\ No newline at end of file
diff --git a/biometrics/driver/IoQueue.cpp b/biometrics/driver/IoQueue.cpp
deleted file mode 100644
index ce8837d92..000000000
--- a/biometrics/driver/IoQueue.cpp
+++ /dev/null
@@ -1,297 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- IoQueue.cpp
-
-Abstract:
-
- This file implements the I/O queue interface and performs
- the ioctl operations.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#include "internal.h"
-#include "ioqueue.tmh"
-
-
-HRESULT
-CBiometricIoQueue::CreateInstanceAndInitialize(
- _In_ IWDFDevice *FxDevice,
- _In_ CBiometricDevice *BiometricDevice,
- _Out_ CBiometricIoQueue** Queue
- )
-/*++
-
-Routine Description:
-
- CreateInstanceAndInitialize creates an instance of the queue object.
-
-Arguments:
-
-
-Return Value:
-
- HRESULT indicating success or failure
-
---*/
-{
- //
- // Create a new instance of the device class
- //
- CComObject *pMyQueue = NULL;
- HRESULT hr = CComObject::CreateInstance( &pMyQueue );
-
- if (SUCCEEDED(hr)) {
-
- //
- // Initialize the instance.
- //
-
- if (NULL != pMyQueue)
- {
- hr = pMyQueue->Initialize(FxDevice, BiometricDevice);
- }
-
- *Queue = pMyQueue;
-
- }
-
- return hr;
-}
-
-HRESULT
-CBiometricIoQueue::Initialize(
- _In_ IWDFDevice *FxDevice,
- _In_ CBiometricDevice *BiometricDevice
- )
-/*++
-
-Routine Description:
-
- Initialize creates a framework queue and sets up I/O for the queue object.
-
-Arguments:
-
- FxDevice - Framework device associated with this queue.
-
- BiometricDevice - Pointer to the Biometric device class object.
-
-Return Value:
-
- HRESULT indicating success or failure
-
---*/
-{
- IWDFIoQueue *fxQueue = NULL;
- HRESULT hr = S_OK;
- IUnknown *unknown = NULL;
-
- //
- // Make sure we have valid parameters.
- //
- if (FxDevice == NULL) {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_QUEUE,
- "%!FUNC!Pointer to framework device object is NULL.");
- return (E_INVALIDARG);
- }
- if (BiometricDevice == NULL) {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_QUEUE,
- "%!FUNC!Pointer to Biometric device is NULL.");
- return (E_INVALIDARG);
- }
-
- //
- // Create the framework queue
- //
-
- if (SUCCEEDED(hr))
- {
- hr = this->QueryInterface(__uuidof(IUnknown), (void **)&unknown);
-
- }
-
- if (SUCCEEDED(hr))
- {
- hr = FxDevice->CreateIoQueue(unknown,
- FALSE, // Default Queue?
- WdfIoQueueDispatchParallel, // Dispatch type
- FALSE, // Power managed?
- FALSE, // Allow zero-length requests?
- &fxQueue); // I/O queue
- BiometricSafeRelease(unknown);
- }
-
- if (FAILED(hr))
- {
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_QUEUE,
- "%!FUNC!Failed to create framework queue.");
- return hr;
- }
-
- //
- // Configure this queue to filter all Device I/O requests.
- //
- hr = FxDevice->ConfigureRequestDispatching(fxQueue,
- WdfRequestDeviceIoControl,
- TRUE);
-
- if (SUCCEEDED(hr))
- {
- m_FxQueue = fxQueue;
- m_BiometricDevice= BiometricDevice;
- }
-
- //
- // Safe to release here. The framework keeps a reference to the Queue
- // for the lifetime of the device.
- //
- BiometricSafeRelease(fxQueue);
-
- return hr;
-}
-
-VOID
-STDMETHODCALLTYPE
-CBiometricIoQueue::OnDeviceIoControl(
- _In_ IWDFIoQueue *FxQueue,
- _In_ IWDFIoRequest *FxRequest,
- _In_ ULONG ControlCode,
- _In_ SIZE_T InputBufferSizeInBytes,
- _In_ SIZE_T OutputBufferSizeInBytes
- )
-/*++
-
-Routine Description:
-
-
- DeviceIoControl dispatch routine
-
-Aruments:
-
- FxQueue - Framework Queue instance
- FxRequest - Framework Request instance
- ControlCode - IO Control Code
- InputBufferSizeInBytes - Lenth of input buffer
- OutputBufferSizeInBytes - Lenth of output buffer
-
- Always succeeds DeviceIoIoctl
-Return Value:
-
- VOID
-
---*/
-{
- UNREFERENCED_PARAMETER(FxQueue);
- UNREFERENCED_PARAMETER(InputBufferSizeInBytes);
- UNREFERENCED_PARAMETER(OutputBufferSizeInBytes);
-
- if (m_BiometricDevice == NULL) {
- // We don't have pointer to device object
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_QUEUE,
- "%!FUNC!NULL pointer to device object.");
- FxRequest->Complete(E_POINTER);
- return;
- }
-
- //
- // Process the IOCTLs
- //
-
- switch (ControlCode) {
-
- //
- // Mandatory IOCTLs
- //
- case IOCTL_BIOMETRIC_GET_ATTRIBUTES:
- m_BiometricDevice->OnGetAttributes(FxRequest);
- break;
-
- case IOCTL_BIOMETRIC_RESET:
- m_BiometricDevice->OnReset(FxRequest);
- break;
-
- case IOCTL_BIOMETRIC_CALIBRATE:
- m_BiometricDevice->OnCalibrate(FxRequest);
- break;
-
- case IOCTL_BIOMETRIC_GET_SENSOR_STATUS:
- m_BiometricDevice->OnGetSensorStatus(FxRequest);
- break;
-
- case IOCTL_BIOMETRIC_CAPTURE_DATA:
- m_BiometricDevice->OnCaptureData(FxRequest);
- break;
-
- //
- // Optional IOCTLs
- //
- case IOCTL_BIOMETRIC_UPDATE_FIRMWARE:
- m_BiometricDevice->OnUpdateFirmware(FxRequest);
- break;
-
- case IOCTL_BIOMETRIC_GET_SUPPORTED_ALGORITHMS:
- m_BiometricDevice->OnGetSupportedAlgorithms(FxRequest);
- break;
-
- case IOCTL_BIOMETRIC_GET_INDICATOR:
- m_BiometricDevice->OnGetIndicator(FxRequest);
- break;
-
- case IOCTL_BIOMETRIC_SET_INDICATOR:
- m_BiometricDevice->OnSetIndicator(FxRequest);
- break;
-
- default:
-
- //
- // First check to see if this is for a BIOMETRIC file.
- //
- if ((ControlCode & CTL_CODE(0xFFFFFFFF, 0, 0, 0)) == CTL_CODE(FILE_DEVICE_BIOMETRIC, 0, 0, 0)) {
-
- if ((ControlCode & IOCTL_BIOMETRIC_VENDOR) == IOCTL_BIOMETRIC_VENDOR) {
- // This is a vendor IOCTL.
- m_BiometricDevice->OnControlUnit(FxRequest);
- break;
- }
-
- } else {
-
- // This is a legacy IOCTL - non-Windows Biometric Framework
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_QUEUE,
- "%!FUNC!Legacy control units not supported by the driver.");
-
- }
-
- //
- // Didn't match any of the above.
- //
- TraceEvents(TRACE_LEVEL_ERROR,
- BIOMETRIC_TRACE_QUEUE,
- "%!FUNC! Unsupported IOCTL - 0x%x.",
- ControlCode);
- FxRequest->Complete(HRESULT_FROM_WIN32(ERROR_INVALID_FUNCTION));
- break;
-
- }
-
- return;
-
-}
-
diff --git a/biometrics/driver/IoQueue.h b/biometrics/driver/IoQueue.h
deleted file mode 100644
index 1a68416b1..000000000
--- a/biometrics/driver/IoQueue.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- IoQueue.h
-
-Abstract:
-
- This file defines the queue callback interface.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-
-//
-// Queue Callback Object.
-//
-
-class CBiometricIoQueue :
- public CComObjectRootEx,
- public IQueueCallbackDeviceIoControl
-{
-
-public:
-
- DECLARE_NOT_AGGREGATABLE(CBiometricIoQueue)
-
- BEGIN_COM_MAP(CBiometricIoQueue)
- COM_INTERFACE_ENTRY(IQueueCallbackDeviceIoControl)
- END_COM_MAP()
-
- CBiometricIoQueue() :
- m_FxQueue(NULL),
- m_BiometricDevice(NULL)
- {
- }
-
- ~CBiometricIoQueue()
- {
- // empty
- }
-
- HRESULT
- Initialize(
- _In_ IWDFDevice *FxDevice,
- _In_ CBiometricDevice *BiometricDevice
- );
-
- static
- HRESULT
- CreateInstanceAndInitialize(
- _In_ IWDFDevice *FxDevice,
- _In_ CBiometricDevice *BiometricDevice,
- _Out_ CBiometricIoQueue** Queue
- );
-
- HRESULT
- Configure(
- VOID
- )
- {
- return S_OK;
- }
-
- VOID
- Start(
- )
- {
- m_FxQueue->Start();
- }
-
- VOID
- StopSynchronously(
- )
- {
- m_FxQueue->StopSynchronously();
- }
-
- //
- // Wdf Callbacks
- //
-
- //
- // IQueueCallbackDeviceIoControl
- //
- virtual
- VOID
- STDMETHODCALLTYPE
- OnDeviceIoControl(
- _In_ IWDFIoQueue *pWdfQueue,
- _In_ IWDFIoRequest *pWdfRequest,
- _In_ ULONG ControlCode,
- _In_ SIZE_T InputBufferSizeInBytes,
- _In_ SIZE_T OutputBufferSizeInBytes
- );
-
-//
-// Private member variables.
-//
-private:
-
- //
- // Weak reference to framework queue object.
- //
- IWDFIoQueue * m_FxQueue;
-
- //
- // Pointer to device class.
- //
- CBiometricDevice * m_BiometricDevice;
-
-};
diff --git a/biometrics/driver/RequestHelper.h b/biometrics/driver/RequestHelper.h
deleted file mode 100644
index 89a8747c7..000000000
--- a/biometrics/driver/RequestHelper.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- RequestHelper.h
-
-Abstract:
-
- This module contains the class definition and implementation
- of an RAII Request object helper class.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-
-//
-// This class handles RAII for IWdfIoRequest pointers.
-// A function can declare this class at the beginning, and
-// set the HRESULT for the request completion.
-//
-// The destructor is always called on function exit.
-// It will complete the request only if the HRESULT
-// is something besides HRESULT_FROM_WIN32(ERROR_IO_PENDING)
-//
-// If the function does not want to complete the request,
-// it should not call SetCompletionHr. Then the request
-// will remain pending.
-//
-
-class CRequestHelper
-{
-
-//
-// Public methods
-//
-public:
-
- CRequestHelper(
- IWDFIoRequest *FxRequest
- )
- {
- m_Request = FxRequest;
- m_Hr = HRESULT_FROM_WIN32(ERROR_IO_PENDING);
- }
-
- ~CRequestHelper()
- {
- if (m_Hr != HRESULT_FROM_WIN32(ERROR_IO_PENDING))
- {
- m_Request->Complete(m_Hr);
- }
- }
-
- void
- SetCompletionHr(
- HRESULT Hr
- )
- {
- m_Hr = Hr;
- }
-
- void
- SetInformation(
- SIZE_T Information
- )
- {
- m_Request->SetInformation(Information);
- }
-
-//
-// Private members
-//
-private:
-
- IWDFIoRequest * m_Request;
- HRESULT m_Hr;
-
-};
diff --git a/biometrics/driver/WudfBioUsbSample.inx b/biometrics/driver/WudfBioUsbSample.inx
deleted file mode 100644
index 71f9277b3..000000000
Binary files a/biometrics/driver/WudfBioUsbSample.inx and /dev/null differ
diff --git a/biometrics/driver/WudfBioUsbSample.vcxproj b/biometrics/driver/WudfBioUsbSample.vcxproj
deleted file mode 100644
index d2e16ca52..000000000
--- a/biometrics/driver/WudfBioUsbSample.vcxproj
+++ /dev/null
@@ -1,327 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
-
- {474A1976-0414-48E7-9F2B-4FDED5BA700C}
- $(MSBuildProjectName)
- 1
- 1
- false
- true
- Debug
- Win32
- {446E3007-2D5F-41DF-80D9-3B5FD3ACBF57}
-
-
-
- Windows10
- False
- Desktop
- UMDF
- WindowsUserModeDriver10.0
- DynamicLibrary
-
-
- Windows10
- True
- Desktop
- UMDF
- WindowsUserModeDriver10.0
- DynamicLibrary
-
-
- Windows10
- False
- Desktop
- UMDF
- WindowsUserModeDriver10.0
- DynamicLibrary
-
-
- Windows10
- True
- Desktop
- UMDF
- WindowsUserModeDriver10.0
- DynamicLibrary
-
-
-
- $(IntDir)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- true
- internal.h
- ;%(AdditionalIncludeDirectories)
- Internal.h
- Use
- $(IntDir)\Internal.h.pch
-
-
- true
- true
- internal.h
- ;%(AdditionalIncludeDirectories)
- Internal.h
- Use
- $(IntDir)\Internal.h.pch
-
-
- true
- true
- internal.h
- ;%(AdditionalIncludeDirectories)
- Internal.h
- Use
- $(IntDir)\Internal.h.pch
-
-
- true
- true
- internal.h
- ;%(AdditionalIncludeDirectories)
- Internal.h
- Use
- $(IntDir)\Internal.h.pch
-
-
- $(InfArch)
- true
- .\$(IntDir)\WudfBioUsbSample.inf
-
-
- true
- true
- internal.h
-
-
-
- WudfBioUsbSample
- 0x0A00
- 0x0A000000
- Dynamic
-
-
- WudfBioUsbSample
- 0x0A00
- 0x0A000000
- Dynamic
-
-
- WudfBioUsbSample
- 0x0A00
- 0x0A000000
- Dynamic
-
-
- WudfBioUsbSample
- 0x0A00
- 0x0A000000
- Dynamic
-
-
-
- true
- Level4
- %(DisableSpecificWarnings);4201
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- true
- Level4
- %(DisableSpecificWarnings);4201
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- true
- Level4
- %(DisableSpecificWarnings);4201
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- true
- Level4
- %(DisableSpecificWarnings);4201
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- %(PreprocessorDefinitions);_UNICODE;UNICODE
-
-
- _DllMainCRTStartup@12
- _DllMainCRTStartup
-
-
-
-
- %(AdditionalIncludeDirectories);inc;$(DDK_INC_PATH)
-
-
- %(AdditionalIncludeDirectories);inc;$(DDK_INC_PATH)
-
-
-
-
- %(AdditionalIncludeDirectories);inc;$(DDK_INC_PATH)
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;ole32.lib;oleaut32.lib;strsafe.lib;user32.lib;uuid.lib
- exports.def
-
-
- sha256
-
-
-
-
- %(AdditionalIncludeDirectories);inc;$(DDK_INC_PATH)
-
-
- %(AdditionalIncludeDirectories);inc;$(DDK_INC_PATH)
-
-
-
-
- %(AdditionalIncludeDirectories);inc;$(DDK_INC_PATH)
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;ole32.lib;oleaut32.lib;strsafe.lib;user32.lib;uuid.lib
- exports.def
-
-
- sha256
-
-
-
-
- %(AdditionalIncludeDirectories);inc;$(DDK_INC_PATH)
-
-
- %(AdditionalIncludeDirectories);inc;$(DDK_INC_PATH)
-
-
-
-
- %(AdditionalIncludeDirectories);inc;$(DDK_INC_PATH)
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;ole32.lib;oleaut32.lib;strsafe.lib;user32.lib;uuid.lib
- exports.def
-
-
- sha256
-
-
-
-
- %(AdditionalIncludeDirectories);inc;$(DDK_INC_PATH)
-
-
- %(AdditionalIncludeDirectories);inc;$(DDK_INC_PATH)
-
-
-
-
- %(AdditionalIncludeDirectories);inc;$(DDK_INC_PATH)
-
-
- %(AdditionalDependencies);advapi32.lib;kernel32.lib;ole32.lib;oleaut32.lib;strsafe.lib;user32.lib;uuid.lib
- exports.def
-
-
- sha256
-
-
-
-
- ;%(AdditionalIncludeDirectories)
- Internal.h
- Create
- $(IntDir)\Internal.h.pch
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/biometrics/driver/WudfBioUsbSample.vcxproj.Filters b/biometrics/driver/WudfBioUsbSample.vcxproj.Filters
deleted file mode 100644
index f4bbd976f..000000000
--- a/biometrics/driver/WudfBioUsbSample.vcxproj.Filters
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*
- {E6E929B2-2CDF-41CF-9E24-FC00BD508586}
-
-
- h;hpp;hxx;hm;inl;inc;xsd
- {4197754B-41E9-46E9-BB6C-32A9FD55F25C}
-
-
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml
- {216999F8-06DE-407C-B349-8709AD141CCF}
-
-
- inf;inv;inx;mof;mc;
- {41FD81A3-D683-4D3C-91BE-D00EB56515FE}
-
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- Driver Files
-
-
-
-
- Resource Files
-
-
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
-
-
- Source Files
-
-
-
\ No newline at end of file
diff --git a/biometrics/driver/dllsup.cpp b/biometrics/driver/dllsup.cpp
deleted file mode 100644
index 8030a1c0b..000000000
--- a/biometrics/driver/dllsup.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- Dllsup.cpp
-
-Abstract:
-
- This module contains the implementation of the Driver DLL entry point.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#include "internal.h"
-#include "dllsup.tmh"
-
-//
-// TODO - define a new GUID here
-// This GUID goes in the inf file in the DriverCLSID value for the service binary
-// {F1CB3C15-A916-47bc-BEA1-D5D4163BC6AE}
-//
-const CLSID CLSID_BiometricUsbSample =
-{ 0xf1cb3c15, 0xa916, 0x47bc, { 0xbe, 0xa1, 0xd5, 0xd4, 0x16, 0x3b, 0xc6, 0xae } };
-
-
-
-HINSTANCE g_hInstance = NULL;
-
-class CBiometricDriverModule :
- public CAtlDllModuleT< CBiometricDriverModule >
-{
-};
-
-CBiometricDriverModule _AtlModule;
-
-//
-// DLL Entry Point
-//
-
-extern "C"
-BOOL
-WINAPI
-DllMain(
- HINSTANCE hInstance,
- DWORD dwReason,
- LPVOID lpReserved
- )
-{
- if (dwReason == DLL_PROCESS_ATTACH) {
- WPP_INIT_TRACING(MYDRIVER_TRACING_ID);
-
- g_hInstance = hInstance;
- DisableThreadLibraryCalls(hInstance);
-
- } else if (dwReason == DLL_PROCESS_DETACH) {
- WPP_CLEANUP();
- }
-
- return _AtlModule.DllMain(dwReason, lpReserved);
-}
-
-
-//
-// Returns a class factory to create an object of the requested type
-//
-
-STDAPI
-DllGetClassObject(
- _In_ REFCLSID rclsid,
- _In_ REFIID riid,
- _Outptr_ LPVOID FAR* ppv
- )
-{
- return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
-}
-
-
diff --git a/biometrics/driver/exports.def b/biometrics/driver/exports.def
deleted file mode 100644
index 37b136229..000000000
--- a/biometrics/driver/exports.def
+++ /dev/null
@@ -1,10 +0,0 @@
-; Exports.def : Declares the module parameters.
-
-;
-; TODO: Change the library name here to match your binary name.
-;
-
-LIBRARY "WudfBioUsbSample.DLL"
-
-EXPORTS
- DllGetClassObject PRIVATE
diff --git a/biometrics/driver/inc/public.h b/biometrics/driver/inc/public.h
deleted file mode 100644
index 11a7e8fa1..000000000
--- a/biometrics/driver/inc/public.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- public.h
-
-Abstract:
-
- Public definitions for the Biometric Device.
-
-Environment:
-
- User & Kernel mode
-
---*/
-
-#ifndef _PUBLIC_H
-#define _PUBLIC_H
-
-#include
-
-//
-// INTERRUPT_MESSAGE
-//
-
-typedef struct _INTERRUPT_MESSAGE
-{
-
- //
- // TODO: Fill this in with your device specific fields.
- //
-
-} INTERRUPT_MESSAGE, *PINTERRUPT_MESSAGE;
-
-#endif
diff --git a/biometrics/driver/inc/usb_hw.h b/biometrics/driver/inc/usb_hw.h
deleted file mode 100644
index 299e7a02f..000000000
--- a/biometrics/driver/inc/usb_hw.h
+++ /dev/null
@@ -1,238 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- Usb.h
-
-Abstract:
-
- Contains prototypes for interfacing with a USB connected device. These
- are copied from the KMDF WDFUSB.H header file (but with the WDF specific
- portions removed)
-
-Environment:
-
- kernel mode only
-
---*/
-
-#pragma once
-
-typedef enum _WINUSB_BMREQUEST_DIRECTION {
- BmRequestHostToDevice = BMREQUEST_HOST_TO_DEVICE,
- BmRequestDeviceToHost = BMREQUEST_DEVICE_TO_HOST,
-} WINUSB_BMREQUEST_DIRECTION;
-
-typedef enum _WINUSB_BMREQUEST_TYPE {
- BmRequestStandard = BMREQUEST_STANDARD,
- BmRequestClass = BMREQUEST_CLASS,
- BmRequestVendor = BMREQUEST_VENDOR,
-} WINUSB_BMREQUEST_TYPE;
-
-typedef enum _WINUSB_BMREQUEST_RECIPIENT {
- BmRequestToDevice = BMREQUEST_TO_DEVICE,
- BmRequestToInterface = BMREQUEST_TO_INTERFACE,
- BmRequestToEndpoint = BMREQUEST_TO_ENDPOINT,
- BmRequestToOther = BMREQUEST_TO_OTHER,
-} WINUSB_BMREQUEST_RECIPIENT;
-
-typedef enum _WINUSB_DEVICE_TRAITS {
- WINUSB_DEVICE_TRAIT_SELF_POWERED = 0x00000001,
- WINUSB_DEVICE_TRAIT_REMOTE_WAKE_CAPABLE = 0x00000002,
- WINUSB_DEVICE_TRAIT_AT_HIGH_SPEED = 0x00000004,
-} WINUSB_DEVICE_TRAITS;
-
-typedef enum _WdfUsbTargetDeviceSelectInterfaceType {
- WdfUsbTargetDeviceSelectInterfaceTypeInterface = 0x10,
- WdfUsbTargetDeviceSelectInterfaceTypeUrb = 0x11,
-} WdfUsbTargetDeviceSelectInterfaceType;
-
-
-
-typedef union _WINUSB_CONTROL_SETUP_PACKET {
- struct {
- union {
- #pragma warning(disable:4214) // bit field types other than int
- struct {
- //
- // Valid values are BMREQUEST_TO_DEVICE, BMREQUEST_TO_INTERFACE,
- // BMREQUEST_TO_ENDPOINT, BMREQUEST_TO_OTHER
- //
- BYTE Recipient:2;
-
- BYTE Reserved:3;
-
- //
- // Valid values are BMREQUEST_STANDARD, BMREQUEST_CLASS,
- // BMREQUEST_VENDOR
- //
- BYTE Type:2;
-
- //
- // Valid values are BMREQUEST_HOST_TO_DEVICE,
- // BMREQUEST_DEVICE_TO_HOST
- //
- BYTE Dir:1;
- } Request;
- #pragma warning(default:4214) // bit field types other than int
- BYTE Byte;
- } bm;
-
- BYTE bRequest;
-
- union {
- struct {
- BYTE LowByte;
- BYTE HiByte;
- } Bytes;
- USHORT Value;
- } wValue;
-
- union {
- struct {
- BYTE LowByte;
- BYTE HiByte;
- } Bytes;
- USHORT Value;
- } wIndex;
-
- USHORT wLength;
- } Packet;
-
- struct {
- BYTE Bytes[8];
- } Generic;
-
- WINUSB_SETUP_PACKET WinUsb;
-
-} WINUSB_CONTROL_SETUP_PACKET, *PWINUSB_CONTROL_SETUP_PACKET;
-
-VOID
-FORCEINLINE
-WINUSB_CONTROL_SETUP_PACKET_INIT(
- PWINUSB_CONTROL_SETUP_PACKET Packet,
- WINUSB_BMREQUEST_DIRECTION Direction,
- WINUSB_BMREQUEST_RECIPIENT Recipient,
- BYTE Request,
- USHORT Value,
- USHORT Index
- )
-{
- RtlZeroMemory(Packet, sizeof(WINUSB_CONTROL_SETUP_PACKET));
-
- Packet->Packet.bm.Request.Dir = (BYTE) Direction;
- Packet->Packet.bm.Request.Type = (BYTE) BmRequestStandard;
- Packet->Packet.bm.Request.Recipient = (BYTE) Recipient;
-
- Packet->Packet.bRequest = Request;
- Packet->Packet.wValue.Value = Value;
- Packet->Packet.wIndex.Value = Index;
-
- // Packet->Packet.wLength will be set by the formatting function
-}
-
-VOID
-FORCEINLINE
-WINUSB_CONTROL_SETUP_PACKET_INIT_CLASS(
- PWINUSB_CONTROL_SETUP_PACKET Packet,
- WINUSB_BMREQUEST_DIRECTION Direction,
- WINUSB_BMREQUEST_RECIPIENT Recipient,
- BYTE Request,
- USHORT Value,
- USHORT Index
- )
-{
- RtlZeroMemory(Packet, sizeof(WINUSB_CONTROL_SETUP_PACKET));
-
- Packet->Packet.bm.Request.Dir = (BYTE) Direction;
- Packet->Packet.bm.Request.Type = (BYTE) BmRequestClass;
- Packet->Packet.bm.Request.Recipient = (BYTE) Recipient;
-
- Packet->Packet.bRequest = Request;
- Packet->Packet.wValue.Value = Value;
- Packet->Packet.wIndex.Value = Index;
-
- // Packet->Packet.wLength will be set by the formatting function
-}
-
-VOID
-FORCEINLINE
-WINUSB_CONTROL_SETUP_PACKET_INIT_VENDOR(
- PWINUSB_CONTROL_SETUP_PACKET Packet,
- WINUSB_BMREQUEST_DIRECTION Direction,
- WINUSB_BMREQUEST_RECIPIENT Recipient,
- BYTE Request,
- USHORT Value,
- USHORT Index
- )
-{
- RtlZeroMemory(Packet, sizeof(WINUSB_CONTROL_SETUP_PACKET));
-
- Packet->Packet.bm.Request.Dir = (BYTE) Direction;
- Packet->Packet.bm.Request.Type = (BYTE) BmRequestVendor;
- Packet->Packet.bm.Request.Recipient = (BYTE) Recipient;
-
- Packet->Packet.bRequest = Request;
- Packet->Packet.wValue.Value = Value;
- Packet->Packet.wIndex.Value = Index;
-
- // Packet->Packet.wLength will be set by the formatting function
-}
-
-VOID
-FORCEINLINE
-WINUSB_CONTROL_SETUP_PACKET_INIT_FEATURE(
- PWINUSB_CONTROL_SETUP_PACKET Packet,
- WINUSB_BMREQUEST_RECIPIENT BmRequestRecipient,
- USHORT FeatureSelector,
- USHORT Index,
- BOOLEAN SetFeature
- )
-{
- RtlZeroMemory(Packet, sizeof(WINUSB_CONTROL_SETUP_PACKET));
-
- Packet->Packet.bm.Request.Dir = (BYTE) BmRequestHostToDevice;
- Packet->Packet.bm.Request.Type = (BYTE) BmRequestStandard;
- Packet->Packet.bm.Request.Recipient = (BYTE) BmRequestRecipient;
-
- if (SetFeature) {
- Packet->Packet.bRequest = USB_REQUEST_SET_FEATURE;
- }
- else {
- Packet->Packet.bRequest = USB_REQUEST_CLEAR_FEATURE;
- }
-
- Packet->Packet.wValue.Value = FeatureSelector;
- Packet->Packet.wIndex.Value = Index;
-
- // Packet->Packet.wLength will be set by the formatting function
-}
-
-VOID
-FORCEINLINE
-WINUSB_CONTROL_SETUP_PACKET_INIT_GET_STATUS(
- PWINUSB_CONTROL_SETUP_PACKET Packet,
- WINUSB_BMREQUEST_RECIPIENT BmRequestRecipient,
- USHORT Index
- )
-{
- RtlZeroMemory(Packet, sizeof(WINUSB_CONTROL_SETUP_PACKET));
-
- Packet->Packet.bm.Request.Dir = (BYTE) BmRequestDeviceToHost;
- Packet->Packet.bm.Request.Type = (BYTE) BmRequestStandard;
- Packet->Packet.bm.Request.Recipient = (BYTE) BmRequestRecipient;
-
- Packet->Packet.bRequest = USB_REQUEST_GET_STATUS;
- Packet->Packet.wIndex.Value = Index;
- Packet->Packet.wValue.Value = 0;
-
- // Packet->Packet.wLength will be set by the formatting function
-}
-
diff --git a/biometrics/driver/internal.h b/biometrics/driver/internal.h
deleted file mode 100644
index bbccbdba0..000000000
--- a/biometrics/driver/internal.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*++
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved
-
-Module Name:
-
- Internal.h
-
-Abstract:
-
- This module contains necessary include directives, WPP tracing macros,
- and string definitions for the Biometric driver sample.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-
-//
-// ATL support
-//
-#include "atlbase.h"
-#include "atlcom.h"
-
-//
-// Include the WUDF Headers
-//
-
-#include "wudfddi.h"
-
-//
-// Use specstrings for in/out annotation of function parameters.
-//
-
-#include "specstrings.h"
-
-//
-// Get limits on common data types (ULONG_MAX for example)
-//
-
-#include "limits.h"
-
-//
-// We need usb I/O targets to talk to the USB device.
-//
-
-#include "wudfusb.h"
-
-//
-// WinUsb structures.
-//
-
-#include "usb_hw.h"
-
-//
-// Public definitions.
-//
-#include "public.h"
-
-//
-// GUID include
-//
-#include
-
-//
-// Windows IOCTL definitions.
-//
-#include "winioctl.h"
-
-//
-// WinBio includes
-//
-#include "winbio_types.h"
-#include "winbio_err.h"
-#include "winbio_ioctl.h"
-
-//
-// RAII helper class for requests
-//
-#include "RequestHelper.h"
-
-//
-// Define the tracing flags.
-//
-// Tracing GUID defined in BioUsbSample.ctl - 864936A6-DB79-451e-B764-E720D61A9361
-//
-// TODO: Generate a new tracing GUID for your driver, and replace all
-// instances of the GUID above with your new GUID.
-//
-
-#define WPP_CONTROL_GUIDS \
- WPP_DEFINE_CONTROL_GUID( \
- WudfBioUsbSampleTraceGuid, (864936A6,DB79,451e,B764,E720D61A9361), \
- \
- WPP_DEFINE_BIT(MYDRIVER_ALL_INFO) \
- WPP_DEFINE_BIT(BIOMETRIC_TRACE_DRIVER) \
- WPP_DEFINE_BIT(BIOMETRIC_TRACE_DEVICE) \
- WPP_DEFINE_BIT(BIOMETRIC_TRACE_QUEUE) \
- )
-
-#define WPP_FLAG_LEVEL_LOGGER(flag, level) \
- WPP_LEVEL_LOGGER(flag)
-
-#define WPP_FLAG_LEVEL_ENABLED(flag, level) \
- (WPP_LEVEL_ENABLED(flag) && \
- WPP_CONTROL(WPP_BIT_ ## flag).Level >= level)
-
-#define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) \
- WPP_LEVEL_LOGGER(flags)
-
-#define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) \
- (WPP_LEVEL_ENABLED(flags) && WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl)
-
-//
-// This comment block is scanned by the trace preprocessor to define our
-// Trace function.
-//
-// begin_wpp config
-// FUNC Trace{FLAG=MYDRIVER_ALL_INFO}(LEVEL, MSG, ...);
-// FUNC TraceEvents(LEVEL, FLAGS, MSG, ...);
-// end_wpp
-//
-
-//
-// Forward definition of queue.
-//
-typedef class CBiometricIoQueue *PCBiometricIoQueue;
-
-//
-// Include the type specific headers.
-//
-#include "Driver.h"
-#include "Device.h"
-#include "IoQueue.h"
-
-//
-// Driver specific #defines
-// TODO: Put strings specific to your device here.
-//
-
-#define MYDRIVER_TRACING_ID L"Microsoft\\UMDF\\Biometric USB Sample V1.0"
-
-#define SAMPLE_MANUFACTURER_NAME L"Biometric Sample Manufacturer"
-#define SAMPLE_MODEL_NAME L"Biometric Sample Model"
-#define SAMPLE_SERIAL_NUMBER L"000-000-000"
-
-
-template
-inline void BiometricSafeRelease(T *&t)
-{
- if (t)
- {
- t->Release();
- }
- t = NULL;
-}
diff --git a/biometrics/driver/resource.h b/biometrics/driver/resource.h
deleted file mode 100644
index 09e852e8e..000000000
--- a/biometrics/driver/resource.h
+++ /dev/null
@@ -1,4 +0,0 @@
-//
-// Copyright (C) Microsoft. All rights reserved.
-//
-#define IDR_MYDRIVER_CLASSINFO 101