summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Mao <[email protected]>2023-01-11 13:05:27 -0800
committerWei Mao <[email protected]>2023-01-13 00:25:05 -0800
commitadb6644fc7de6b42215ff2ceaded3f65e8e40504 (patch)
tree1f34087012280647408f37f072f11f3b30847260
parentf0514c905ed3b8c82ec5a3340e8e5d1977ac444e (diff)
[UMDF v1] Remove general/toaster/toastDrv/umdf/func, Toastmon
-rw-r--r--general/toaster/toastDrv/Package/package.VcxProj6
-rw-r--r--general/toaster/toastDrv/README.md88
-rw-r--r--general/toaster/toastDrv/toaster.sln30
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/Device.cpp318
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/Device.h162
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/Driver.cpp207
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/Driver.h146
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/RemoteTarget.cpp538
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/RemoteTarget.h228
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/ToastMon.rc21
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/WUDFToastMon.inxbin4034 -> 0 bytes
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/WUDFToastMon.vcxproj285
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/WUDFToastMon.vcxproj.Filters46
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/comsup.cpp344
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/comsup.h215
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/dllsup.cpp174
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/exports.def4
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/internal.h109
-rw-r--r--general/toaster/toastDrv/umdf/Toastmon/list.h77
-rw-r--r--general/toaster/toastDrv/umdf/func/Device.cpp228
-rw-r--r--general/toaster/toastDrv/umdf/func/Device.h78
-rw-r--r--general/toaster/toastDrv/umdf/func/Driver.cpp205
-rw-r--r--general/toaster/toastDrv/umdf/func/Driver.h59
-rw-r--r--general/toaster/toastDrv/umdf/func/Queue.cpp283
-rw-r--r--general/toaster/toastDrv/umdf/func/Queue.h96
-rw-r--r--general/toaster/toastDrv/umdf/func/WUDFToaster.cpp88
-rw-r--r--general/toaster/toastDrv/umdf/func/WUDFToaster.ctl2
-rw-r--r--general/toaster/toastDrv/umdf/func/WUDFToaster.def6
-rw-r--r--general/toaster/toastDrv/umdf/func/WUDFToaster.idl40
-rw-r--r--general/toaster/toastDrv/umdf/func/WUDFToaster.inxbin4510 -> 0 bytes
-rw-r--r--general/toaster/toastDrv/umdf/func/WUDFToaster.rc22
-rw-r--r--general/toaster/toastDrv/umdf/func/WUDFToaster.vcxproj338
-rw-r--r--general/toaster/toastDrv/umdf/func/WUDFToaster.vcxproj.Filters55
-rw-r--r--general/toaster/toastDrv/umdf/func/internal.h114
-rw-r--r--general/toaster/toastDrv/umdf/func/resource.h13
-rw-r--r--general/toaster/toastDrv/umdf/func/stdAfxsrc.cpp1
-rw-r--r--general/toaster/toastDrv/umdf/func/stdafx.cpp27
-rw-r--r--general/toaster/toastDrv/umdf/func/stdafx.h47
38 files changed, 1 insertions, 4699 deletions
diff --git a/general/toaster/toastDrv/Package/package.VcxProj b/general/toaster/toastDrv/Package/package.VcxProj
index 572e08b5..85af0a9a 100644
--- a/general/toaster/toastDrv/Package/package.VcxProj
+++ b/general/toaster/toastDrv/Package/package.VcxProj
@@ -40,12 +40,6 @@
<ProjectReference Include="..\kmdf\toastmon\wdftoastmon.vcxproj">
<Project>{D15FD911-F2DA-4644-8142-6D22756AD287}</Project>
</ProjectReference>
- <ProjectReference Include="..\umdf\func\WUDFToaster.vcxproj">
- <Project>{3A32C2D4-D40F-4DB8-9F25-ABB21CEB7C7F}</Project>
- </ProjectReference>
- <ProjectReference Include="..\umdf\Toastmon\WUDFToastMon.vcxproj">
- <Project>{F575419D-099B-4DA0-B80C-88D766DD7542}</Project>
- </ProjectReference>
</ItemGroup>
<PropertyGroup Label="PropertySheets">
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
diff --git a/general/toaster/toastDrv/README.md b/general/toaster/toastDrv/README.md
index fc84c39d..4c5b52bc 100644
--- a/general/toaster/toastDrv/README.md
+++ b/general/toaster/toastDrv/README.md
@@ -10,7 +10,7 @@ products:
# Toaster Sample Driver
-The Toaster collection is an iterative series of samples that demonstrate fundamental aspects of Windows driver development for both Kernel-Mode Driver Framework (KMDF) and User-Mode Driver Framework (UMDF) version 1.
+The Toaster collection is an iterative series of samples that demonstrate fundamental aspects of Windows driver development for both Kernel-Mode Driver Framework (KMDF).
All the samples work with a hypothetical toaster bus, over which toaster devices can be connected to a PC.
@@ -76,89 +76,3 @@ As an alternative to building the Toaster sample in Visual Studio, you can build
For more information about using MSBuild to build a driver package, see [Building a Driver with Visual Studio and the WDK](https://docs.microsoft.com/windows-hardware/drivers/develop/building-a-driver).
-## UMDF Toaster File Manifest
-
-### WUDFToaster.idl
-
-Component Interface file
-
-### WUDFToaster.cpp
-
-DLL Support code - provides the DLL's entry point as well as the DllGetClassObject export.
-
-### WUDFToaster.def
-
-This file lists the functions that the driver DLL exports.
-
-### stdafx.h
-
-This is the main header file for the sample driver.
-
-### driver.cpp and driver.h (WUDFToaster)
-
-Definition and implementation of the IDriverEntry callbacks in CDriver class.
-
-### device.cpp and device.h (WUDFToaster)
-
-Definition and implementation of various interfaces and their callbacks in CDevice class. Add your PnP and Power interfaces specific for your hardware.
-
-### queue.cpp and queue.h
-
-Definition and implementation of the base queue callback class (CQueue). IQueueCallbackDevicekIoControl, IQueueCallbackRead and IQueueCallBackWrite callbacks are implemented to handle I/O control requests.
-
-### WUDFToaster.rc
-
-This file defines resource information for the WUDF Toaster sample driver.
-
-### WUDFToaster.inf
-
-Sample INF for installing the sample WUDF Toaster driver under the Toaster class of devices.
-
-### WUDFtoaster.ctl, internal.h
-
-This file lists the WPP trace control GUID(s) for the sample driver. This file can be used with the tracelog command's -guid flag to enable the collection of these trace events within an established trace session.
-These GUIDs must remain in sync with the trace control guids defined in internal.h.
-
-## Toastmon File Manifest
-
-### comsup.cpp and comsup.h
-
-Boilerplate COM Support code - specifically base classes which provide implementations for the standard COM interfaces IUnknown and IClassFactory which are used throughout the sample.
-The implementation of IClassFactory is designed to create instances of the CMyDriver class. If you should change the name of your base driver class, you would also need to modify this file.
-
-### dllsup.cpp
-
-Boilerplate DLL Support code - provides the DLL's entry point as well as the single required export (DllGetClassObject).
-These depend on comsup.cpp to perform the necessary class creation.
-
-### exports.def
-
-This file lists the functions that the driver DLL exports.
-
-### internal.h
-
-This is the main header file for the ToastMon driver
-
-### driver.cpp and driver.h (Toastmon)
-
-Definition and implementation of the driver callback class for the ToastMon sample.
-
-### device.cpp and device.h (Toastmon)
-
-Definition and implementation of the device callback class for the ToastMon sample. This is mostly boilerplate, but also registers for RemoteInterface Arrival notifications. When a RemoteInterface arrival callback occurs, it calls CreateRemoteInterface and creates a CMyRemoteTarget callback object to handle I/O on that RemoteInterface.
-
-### RemoteTarget.cpp and RemoteTarget.h
-
-Definition and implementation of the remote target callback class for the ToastMon sample.
-
-### list.h
-
-Doubly-linked-list code
-
-### ToastMon.rc
-
-This file defines resource information for the ToastMon sample driver.
-
-### UMDFToastMon.inf
-
-Sample INF for installing the Skeleton driver to control a root enumerated device with a hardware ID of UMDFSamples\\ToastMon
diff --git a/general/toaster/toastDrv/toaster.sln b/general/toaster/toastDrv/toaster.sln
index 0d1c2e6c..551f7a75 100644
--- a/general/toaster/toastDrv/toaster.sln
+++ b/general/toaster/toastDrv/toaster.sln
@@ -37,12 +37,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bus", "Bus", "{320825A6-82C
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dynamic", "Dynamic", "{4A994F2B-05BD-4CED-9157-45B29777740D}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Toastmon", "Toastmon", "{16ECEF20-C217-4477-8C88-E8A231CC23B8}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Umdf", "Umdf", "{82276D55-C8B4-4C84-98FE-83F10C898FA0}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Func", "Func", "{9BEE50D5-9D78-4CA3-A535-75904B21C448}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "package", "Package\package.VcxProj", "{30FFB863-CECC-4E27-85F1-8DAC2256FC2F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WmiToast", "exe\wmi\WmiToast.vcxproj", "{869C08D1-A32F-49C7-9831-2ADB52F241B6}"
@@ -67,10 +61,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatBus", "kmdf\bus\static\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dynambus", "kmdf\bus\dynamic\dynambus.vcxproj", "{E5E1F492-05BB-45A3-B09F-F643DC1C6B03}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WUDFToastMon", "umdf\Toastmon\WUDFToastMon.vcxproj", "{F575419D-099B-4DA0-B80C-88D766DD7542}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WUDFToaster", "umdf\func\WUDFToaster.vcxproj", "{3A32C2D4-D40F-4DB8-9F25-ABB21CEB7C7F}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -175,22 +165,6 @@ Global
{E5E1F492-05BB-45A3-B09F-F643DC1C6B03}.Debug|x64.Build.0 = Debug|x64
{E5E1F492-05BB-45A3-B09F-F643DC1C6B03}.Release|x64.ActiveCfg = Release|x64
{E5E1F492-05BB-45A3-B09F-F643DC1C6B03}.Release|x64.Build.0 = Release|x64
- {F575419D-099B-4DA0-B80C-88D766DD7542}.Debug|Win32.ActiveCfg = Debug|Win32
- {F575419D-099B-4DA0-B80C-88D766DD7542}.Debug|Win32.Build.0 = Debug|Win32
- {F575419D-099B-4DA0-B80C-88D766DD7542}.Release|Win32.ActiveCfg = Release|Win32
- {F575419D-099B-4DA0-B80C-88D766DD7542}.Release|Win32.Build.0 = Release|Win32
- {F575419D-099B-4DA0-B80C-88D766DD7542}.Debug|x64.ActiveCfg = Debug|x64
- {F575419D-099B-4DA0-B80C-88D766DD7542}.Debug|x64.Build.0 = Debug|x64
- {F575419D-099B-4DA0-B80C-88D766DD7542}.Release|x64.ActiveCfg = Release|x64
- {F575419D-099B-4DA0-B80C-88D766DD7542}.Release|x64.Build.0 = Release|x64
- {3A32C2D4-D40F-4DB8-9F25-ABB21CEB7C7F}.Debug|Win32.ActiveCfg = Debug|Win32
- {3A32C2D4-D40F-4DB8-9F25-ABB21CEB7C7F}.Debug|Win32.Build.0 = Debug|Win32
- {3A32C2D4-D40F-4DB8-9F25-ABB21CEB7C7F}.Release|Win32.ActiveCfg = Release|Win32
- {3A32C2D4-D40F-4DB8-9F25-ABB21CEB7C7F}.Release|Win32.Build.0 = Release|Win32
- {3A32C2D4-D40F-4DB8-9F25-ABB21CEB7C7F}.Debug|x64.ActiveCfg = Debug|x64
- {3A32C2D4-D40F-4DB8-9F25-ABB21CEB7C7F}.Debug|x64.Build.0 = Debug|x64
- {3A32C2D4-D40F-4DB8-9F25-ABB21CEB7C7F}.Release|x64.ActiveCfg = Release|x64
- {3A32C2D4-D40F-4DB8-9F25-ABB21CEB7C7F}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -208,8 +182,6 @@ Global
{B39F6628-73BA-4AC3-863A-EA20892F1EFD} = {9577224D-E994-4E6E-BE11-FF456B8A4D46}
{6C6E0C23-5B37-4BBB-8909-435078D49364} = {A69FDC71-8327-494A-9840-CF684E74965C}
{E5E1F492-05BB-45A3-B09F-F643DC1C6B03} = {4A994F2B-05BD-4CED-9157-45B29777740D}
- {F575419D-099B-4DA0-B80C-88D766DD7542} = {16ECEF20-C217-4477-8C88-E8A231CC23B8}
- {3A32C2D4-D40F-4DB8-9F25-ABB21CEB7C7F} = {9BEE50D5-9D78-4CA3-A535-75904B21C448}
{C1205C19-4601-4DF6-A222-91CC30C12284} = {B1177A9B-61C5-4747-B40A-9F36D83CE9A0}
{26B8AB05-2BE2-4266-AB19-BA912C0ACFA1} = {B1177A9B-61C5-4747-B40A-9F36D83CE9A0}
{D2F3C374-F164-4E08-A5FE-F902972C57F9} = {B1177A9B-61C5-4747-B40A-9F36D83CE9A0}
@@ -224,7 +196,5 @@ Global
{A69FDC71-8327-494A-9840-CF684E74965C} = {320825A6-82C4-42DE-91A3-EE5994B74EC3}
{320825A6-82C4-42DE-91A3-EE5994B74EC3} = {57D2095B-0A01-4F4C-A5D8-50F40DC155D0}
{4A994F2B-05BD-4CED-9157-45B29777740D} = {320825A6-82C4-42DE-91A3-EE5994B74EC3}
- {16ECEF20-C217-4477-8C88-E8A231CC23B8} = {82276D55-C8B4-4C84-98FE-83F10C898FA0}
- {9BEE50D5-9D78-4CA3-A535-75904B21C448} = {82276D55-C8B4-4C84-98FE-83F10C898FA0}
EndGlobalSection
EndGlobal
diff --git a/general/toaster/toastDrv/umdf/Toastmon/Device.cpp b/general/toaster/toastDrv/umdf/Toastmon/Device.cpp
deleted file mode 100644
index 5b2bde41..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/Device.cpp
+++ /dev/null
@@ -1,318 +0,0 @@
-/*++
-
-Copyright (C) Microsoft Corporation, All Rights Reserved.
-
-Module Name:
-
- Device.cpp
-
-Abstract:
-
- This module contains the implementation of the UMDF sample driver's
- device callback object.
-
- This sample demonstrates how to register for PnP event notification
- for an interface class, and how to handle arrival events.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#include "internal.h"
-#include "device.tmh"
-
-HRESULT
-CMyDevice::CreateInstance(
- _In_ IWDFDriver * FxDriver,
- _In_ IWDFDeviceInitialize * FxDeviceInit,
- _Out_ PCMyDevice * MyDevice
- )
-/*++
-
- Routine Description:
-
- This method creates and initializs an instance of the driver's
- device callback object.
-
- Arguments:
-
- FxDeviceInit - the settings for the device.
-
- MyDevice - a location to store the referenced pointer to the device object.
-
- Return Value:
-
- Status
-
---*/
-{
- PCMyDevice myDevice;
- HRESULT hr;
-
- //
- // Allocate a new instance of the device class.
- //
-
- myDevice = new CMyDevice();
-
- if (NULL == myDevice)
- {
- return E_OUTOFMEMORY;
- }
-
- //
- // Initialize the instance.
- //
-
- hr = myDevice->Initialize(FxDriver, FxDeviceInit);
-
- if (SUCCEEDED(hr))
- {
- *MyDevice = myDevice;
- }
- else
- {
- myDevice->Release();
- }
-
- return hr;
-}
-
-HRESULT
-CMyDevice::Initialize(
- _In_ IWDFDriver * FxDriver,
- _In_ IWDFDeviceInitialize * FxDeviceInit
- )
-/*++
-
- Routine Description:
-
- This method initializes the device callback object and creates the
- partner device object.
-
- Then it registers for toaster device notifications.
-
-
- Arguments:
-
- FxDeviceInit - the settings for this device.
-
- Return Value:
-
- status.
-
---*/
-{
- CComPtr<IWDFDevice> fxDevice;
- HRESULT hr;
-
- //
- // Save a weak reference to the Fx driver object. We'll need it to create
- // CMyRemoteTarget objects.
- //
-
- m_FxDriver = FxDriver;
-
- //
- // QueryIUnknown references the IUnknown interface that it returns
- // (which is the same as referencing the device). We pass that to
- // CreateDevice, which takes its own reference if everything works.
- //
-
- {
- IUnknown *unknown = this->QueryIUnknown();
-
- //
- // Create a new FX device object and assign the new callback object to
- // handle any device level events that occur.
- //
- hr = FxDriver->CreateDevice(FxDeviceInit, unknown, &fxDevice);
-
- unknown->Release();
- }
-
- //
- // If that succeeded then set our FxDevice member variable.
- //
-
- CComPtr<IWDFDevice2> fxDevice2;
- if (SUCCEEDED(hr))
- {
- //
- // Q.I. for the latest version of this interface.
- //
- hr = fxDevice->QueryInterface(IID_PPV_ARGS(&fxDevice2));
- }
-
- if (SUCCEEDED(hr))
- {
- //
- // Store a weak reference to the IWDFDevice2 interface. Since this object
- // is partnered with the framework object they have the same lifespan -
- // there is no need for an additional reference.
- //
-
- m_FxDevice = fxDevice2;
- }
-
- return hr;
-}
-
-HRESULT
-CMyDevice::Configure(
- VOID
- )
-/*++
-
- Routine Description:
-
- This method is called after the device callback object has been initialized
- and returned to the driver.
-
- Return Value:
-
- status
-
---*/
-{
- HRESULT hr = S_OK;
-
- //
- // Register for TOASTER device interface change notification.
- // We will get OnRemoteInterfaceArrival() calls when a remote toaster
- // device is started.
- //
- // Arrival notification will be sent for all existing and future toaster
- // devices.
- //
- // The framework will take care of unregistration when the device unloads.
- //
- hr = m_FxDevice->RegisterRemoteInterfaceNotification(&GUID_DEVINTERFACE_TOASTER,
- true);
-
- return hr;
-}
-
-
-HRESULT
-CMyDevice::QueryInterface(
- _In_ REFIID InterfaceId,
- _Out_ PVOID *Object
- )
-/*++
-
- Routine Description:
-
- This method is called to get a pointer to one of the object's callback
- interfaces.
-
- Arguments:
-
- InterfaceId - the interface being requested
-
- Object - a location to store the interface pointer if successful
-
- Return Value:
-
- S_OK or E_NOINTERFACE
-
---*/
-{
- HRESULT hr;
-
- if(IsEqualIID(InterfaceId, __uuidof(IPnpCallbackRemoteInterfaceNotification)))
- {
- *Object = QueryIPnpCallbackRemoteInterfaceNotification();
- hr = S_OK;
- }
- else
- {
- hr = CUnknown::QueryInterface(InterfaceId, Object);
- }
-
- return hr;
-}
-
-//
-// IPnpCallbackRemoteInterfaceNotification
-//
-
-void
-STDMETHODCALLTYPE
-CMyDevice::OnRemoteInterfaceArrival(
- _In_ IWDFRemoteInterfaceInitialize * FxRemoteInterfaceInit
- )
-/*++
-
- Routine Description:
-
- This method is called by the framework when a new remote interface has come
- online. These calls will only occur one at a time.
-
- Arguments:
-
- FxRemoteInterfaceInit - An identifier for the remote interface.
-
---*/
-{
- HRESULT hr = S_OK;
-
-
- //
- // Create a new FX remote interface object and assign a NULL callback
- // object since we don't care to handle any remote interface level events
- // that occur.
- //
-
- CComPtr<IWDFRemoteInterface> fxRemoteInterface;
-
- hr = m_FxDevice->CreateRemoteInterface(FxRemoteInterfaceInit,
- NULL,
- &fxRemoteInterface);
-
- //
- // Create an instance of CMyRemoteTarget which will open the remote device
- // and post I/O requests to it.
- //
-
- PCMyRemoteTarget myRemoteTarget = NULL;
- if (SUCCEEDED(hr))
- {
- hr = CMyRemoteTarget::CreateInstance(this,
- m_FxDriver,
- m_FxDevice,
- fxRemoteInterface,
- &myRemoteTarget);
- }
-
- if (SUCCEEDED(hr))
- {
- if (myRemoteTarget != NULL)
- {
- //
- // Add to our list
- //
- InsertHeadList(&m_MyRemoteTargets, &myRemoteTarget->m_Entry);
-
- //
- // Release, since framework will keep a reference
- //
- myRemoteTarget->Release();
- }
- }
-
- if (FAILED(hr))
- {
- if (fxRemoteInterface != NULL)
- {
- //
- // We failed to create the CMyRemoteTarget, delete the
- // RemoteInterface object
- //
- fxRemoteInterface->DeleteWdfObject();
- }
- }
-}
-
diff --git a/general/toaster/toastDrv/umdf/Toastmon/Device.h b/general/toaster/toastDrv/umdf/Toastmon/Device.h
deleted file mode 100644
index c457a8da..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/Device.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*++
-
-Copyright (C) Microsoft Corporation, All Rights Reserved
-
-Module Name:
-
- Device.h
-
-Abstract:
-
- This module contains the type definitions for the UMDF sample
- driver's device callback class.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-#include "initguid.h"
-
-
-//{781EF630-72B2-11d2-B852-00C04FAD5171}
-DEFINE_GUID(GUID_DEVINTERFACE_TOASTER, 0x781EF630, 0x72B2, 0x11d2, 0xB8, 0x52, 0x00, 0xC0, 0x4F, 0xAD, 0x51, 0x71);
-
-
-//
-// Class for the sample device.
-//
-
-class CMyDevice : public CUnknown,
- public IPnpCallbackRemoteInterfaceNotification
-{
- //
- // Private data members.
- //
-private:
-
- //
- // Weak reference to the WDF device object.
- //
-
- IWDFDevice2 *m_FxDevice;
-
- //
- // Weak reference to the WDF driver object
- //
-
- IWDFDriver *m_FxDriver;
-
- //
- // Head of remote target list
- //
-
- LIST_ENTRY m_MyRemoteTargets;
-
- //
- // Private methods.
- //
-private:
-
- //
- // Protected methods
- //
-protected:
- CMyDevice(
- VOID
- ) :
- m_FxDevice(NULL),
- m_FxDriver(NULL)
- {
- InitializeListHead(&m_MyRemoteTargets);
- }
-
- HRESULT
- Initialize(
- _In_ IWDFDriver * FxDriver,
- _In_ IWDFDeviceInitialize * FxDeviceInit
- );
-
- //
- // Public methods
- //
-public:
-
- //
- // The factory method used to create an instance of this driver.
- //
- static
- HRESULT
- CreateInstance(
- _In_ IWDFDriver * FxDriver,
- _In_ IWDFDeviceInitialize * FxDeviceInit,
- _Out_ PCMyDevice * MyDevice
- );
-
- HRESULT
- Configure(
- VOID
- );
-
- ~CMyDevice(
- VOID
- )
- {
- ATLASSERT(IsListEmpty(&m_MyRemoteTargets));
- }
-
- //
- // COM methods
- //
-public:
-
- //
- // IUnknown methods.
- //
- virtual
- ULONG
- STDMETHODCALLTYPE
- AddRef(
- VOID
- )
- {
- return __super::AddRef();
- }
- _At_(this, __drv_freesMem(object))
- virtual
- ULONG
- STDMETHODCALLTYPE
- Release(
- VOID
- )
- {
- return __super::Release();
- }
- virtual
- HRESULT
- STDMETHODCALLTYPE
- QueryInterface(
- _In_ REFIID InterfaceId,
- _Out_ PVOID *Object
- );
-
- //
- // IPnpCallbackRemoteInterfaceNotification
- //
- void
- STDMETHODCALLTYPE
- OnRemoteInterfaceArrival(
- _In_ IWDFRemoteInterfaceInitialize * FxRemoteInterfaceInit
- );
- IPnpCallbackRemoteInterfaceNotification *
- QueryIPnpCallbackRemoteInterfaceNotification(
- VOID
- )
- {
- AddRef();
- return static_cast<IPnpCallbackRemoteInterfaceNotification*>(this);
- }
-
-};
diff --git a/general/toaster/toastDrv/umdf/Toastmon/Driver.cpp b/general/toaster/toastDrv/umdf/Toastmon/Driver.cpp
deleted file mode 100644
index adf74dc0..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/Driver.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-/*++
-
-Copyright (C) Microsoft Corporation, All Rights Reserved.
-
-Module Name:
-
- Driver.cpp
-
-Abstract:
-
- This module contains the implementation of the UMDF Sample's
- core driver callback object.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#include "internal.h"
-#include "driver.tmh"
-
-HRESULT
-CMyDriver::CreateInstance(
- _Out_ PCMyDriver * MyDriver
- )
-/*++
-
- Routine Description:
-
- This static method is invoked in order to create and initialize a new
- instance of the driver class. The caller should arrange for the object
- to be released when it is no longer in use.
-
- Arguments:
-
- MyDriver - a location to store a referenced pointer to the new instance
-
- Return Value:
-
- S_OK if successful, or error otherwise.
-
---*/
-{
- PCMyDriver myDriver;
- HRESULT hr;
-
- //
- // Allocate the callback object.
- //
-
- myDriver = new CMyDriver();
-
- if (NULL == myDriver)
- {
- return E_OUTOFMEMORY;
- }
-
- //
- // Initialize the callback object.
- //
-
- hr = myDriver->Initialize();
-
- if (SUCCEEDED(hr))
- {
- //
- // Store a pointer to the new, initialized object in the output
- // parameter.
- //
-
- *MyDriver = myDriver;
- }
- else
- {
-
- //
- // Release the reference on the driver object to get it to delete
- // itself.
- //
-
- myDriver->Release();
- }
-
- return hr;
-}
-
-HRESULT
-CMyDriver::Initialize(
- VOID
- )
-/*++
-
- Routine Description:
-
- This method is called to initialize a newly created driver callback object
- before it is returned to the creator. Unlike the constructor, the
- Initialize method contains operations which could potentially fail.
-
- Arguments:
-
- None
-
- Return Value:
-
- None
-
---*/
-{
- return S_OK;
-}
-
-HRESULT
-CMyDriver::QueryInterface(
- _In_ REFIID InterfaceId,
- _Out_ PVOID *Interface
- )
-/*++
-
- Routine Description:
-
- This method returns a pointer to the requested interface on the callback
- object.
-
- Arguments:
-
- InterfaceId - the IID of the interface to query/reference
-
- Interface - a location to store the interface pointer.
-
- Return Value:
-
- S_OK if the interface is supported.
- E_NOINTERFACE if it is not supported.
-
---*/
-{
- if (IsEqualIID(InterfaceId, __uuidof(IDriverEntry)))
- {
- *Interface = QueryIDriverEntry();
- return S_OK;
- }
- else
- {
- return CUnknown::QueryInterface(InterfaceId, Interface);
- }
-}
-
-HRESULT
-CMyDriver::OnDeviceAdd(
- _In_ IWDFDriver *FxDriver,
- _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
-
---*/
-{
- PCMyDevice myDevice = NULL;
-
- HRESULT hr;
-
- //
- // Create a new instance of our device callback object
- //
-
- hr = CMyDevice::CreateInstance(FxDriver, FxDeviceInit, &myDevice);
-
- //
- // If that succeeded then 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 = myDevice->Configure();
- }
-
- //
- // Release the reference on the device callback object now that it's been
- // associated with an fx device object.
- //
-
- if (NULL != myDevice)
- {
- myDevice->Release();
- }
-
- return hr;
-}
diff --git a/general/toaster/toastDrv/umdf/Toastmon/Driver.h b/general/toaster/toastDrv/umdf/Toastmon/Driver.h
deleted file mode 100644
index aecb9765..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/Driver.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*++
-
-Copyright (C) Microsoft Corporation, All Rights Reserved
-
-Module Name:
-
- Driver.h
-
-Abstract:
-
- This module contains the type definitions for the UMDF sample's
- driver callback class.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-
-
-//
-// This class handles driver events for the 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.
-//
-
-class CMyDriver : public CUnknown,
- public IDriverEntry
-{
- //
- // Private data members.
- //
-private:
-
- //
- // Private methods.
- //
-private:
-
- //
- // Returns a referenced pointer to the IDriverEntry interface.
- //
- IDriverEntry *
- QueryIDriverEntry(
- VOID
- )
- {
- AddRef();
- return static_cast<IDriverEntry*>(this);
- }
-
- HRESULT
- Initialize(
- VOID
- );
-
-//
-// Public methods
-//
-public:
-
- //
- // The factory method used to create an instance of this driver.
- //
-
- static
- HRESULT
- CreateInstance(
- _Out_ PCMyDriver * MyDriver
- );
-
- //
- // COM methods
- //
-public:
-
- //
- // IDriverEntry methods
- //
-
- virtual
- HRESULT
- STDMETHODCALLTYPE
- OnInitialize(
- _In_ IWDFDriver * /* FxDriver */
- )
- {
- return S_OK;
- }
-
- virtual
- HRESULT
- STDMETHODCALLTYPE
- OnDeviceAdd(
- _In_ IWDFDriver * FxDriver,
- _In_ IWDFDeviceInitialize * FxDeviceInit
- );
-
- virtual
- VOID
- STDMETHODCALLTYPE
- OnDeinitialize(
- _In_ IWDFDriver * /* FxDriver */
- )
- {
- return;
- }
-
- //
- // IUnknown methods.
- //
- // We have to implement basic ones here that redirect to the
- // base class because of the multiple inheritance.
- //
-
- virtual
- ULONG
- STDMETHODCALLTYPE
- AddRef(
- VOID
- )
- {
- return __super::AddRef();
- }
-
- _At_(this, __drv_freesMem(object))
- virtual
- ULONG
- STDMETHODCALLTYPE
- Release(
- VOID
- )
- {
- return __super::Release();
- }
-
- virtual
- HRESULT
- STDMETHODCALLTYPE
- QueryInterface(
- _In_ REFIID InterfaceId,
- _Out_ PVOID *Object
- );
-};
diff --git a/general/toaster/toastDrv/umdf/Toastmon/RemoteTarget.cpp b/general/toaster/toastDrv/umdf/Toastmon/RemoteTarget.cpp
deleted file mode 100644
index 88ea7f8a..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/RemoteTarget.cpp
+++ /dev/null
@@ -1,538 +0,0 @@
-/*++
-
-Copyright (C) Microsoft Corporation, All Rights Reserved.
-
-Module Name:
-
- RemoteTarget.cpp
-
-Abstract:
-
- This module contains the implementation of the UMDF sample driver's
- remote interface and remote target callback object.
-
- This sample demonstrates how to open the remote target and register
- and respond to device change notification.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#include "internal.h"
-#include "remotetarget.tmh"
-
-
-DWORD WINAPI _ThreadProc(
- _In_ LPVOID lpParameter
- )
-{
- CMyRemoteTarget *MyRemoteTarget = (CMyRemoteTarget*)lpParameter;
-
- return MyRemoteTarget->ThreadProc();
-}
-
-HRESULT
-CMyRemoteTarget::CreateInstance(
- _In_ CMyDevice * MyDevice,
- _In_ IWDFDriver * FxDriver,
- _In_ IWDFDevice2 * FxDevice,
- _In_ IWDFRemoteInterface * FxRemoteInterface,
- _Out_ PCMyRemoteTarget * MyRemoteTarget
- )
-/*++
-
- Routine Description:
-
- This method creates and initializs an instance of the driver's
- remote target callback object.
-
- Arguments:
-
- FxRemoteInterfaceInit - An identifier that specifies the remote toaster device.
-
- MyDevice - a location to store the referenced pointer to the device object.
-
- Return Value:
-
- Status
-
---*/
-{
- PCMyRemoteTarget myRemoteTarget;
- HRESULT hr;
-
- //
- // Allocate a new instance of the remote target class.
- //
-
- myRemoteTarget = new CMyRemoteTarget();
-
- if (NULL == myRemoteTarget)
- {
- return E_OUTOFMEMORY;
- }
-
- //
- // Initialize the instance.
- //
-
- hr = myRemoteTarget->Initialize(MyDevice,
- FxDriver,
- FxDevice,
- FxRemoteInterface);
-
- if (SUCCEEDED(hr))
- {
- *MyRemoteTarget = myRemoteTarget;
- }
- else
- {
- myRemoteTarget->Release();
- }
-
- return hr;
-}
-
-HRESULT
-CMyRemoteTarget::Initialize(
- _In_ CMyDevice * MyDevice,
- _In_ IWDFDriver * FxDriver,
- _In_ IWDFDevice2 * FxDevice,
- _In_ IWDFRemoteInterface * FxRemoteInterface
- )
-/*++
-
- Routine Description:
-
- This method initializes the remote target callback object and creates
- the partner remote target object.
-
- Arguments:
-
- FxRemoteInterface - the identifier for the remote toaster device.
-
- Return Value:
-
- status.
-
---*/
-{
- HRESULT hr;
-
- CComPtr<IWDFIoRequest> fxWriteRequest;
- CComPtr<IWDFIoRequest> fxReadRequest;
-
- //
- // Save a weak reference to the class that created us
- // so we can notify it when we get removed
- //
-
- m_MyDevice = MyDevice;
-
- //
- // QueryIUnknown references the IUnknown interface that it returns
- // (which is the same as referencing the CMyRemoteTarget). We pass that
- // to the various Create* calls, which take their own reference if
- // everything works.
- //
-
- IUnknown * unknown = this->QueryIUnknown();
-
-
- //
- // Create a new FX remote target object and assign the new callback
- // object to handle any remote target level events that occur.
- //
- hr = FxDevice->CreateRemoteTarget(unknown,
- FxRemoteInterface,
- &m_FxTarget);
-
- if (SUCCEEDED(hr))
- {
- //
- // Open and start the remote target. Note that this sample doesn't
- // perform any impersonation, so we're running as "Local Service"
- // since that is what UMDF driver runs as.
- //
- // Make sure that your Toaster devices all have security ACLs that
- // permit "Local Service" to access the device. The Win7 toaster
- // sample driver INFs have been updated for this. However, if you
- // had previously installed pre-Win7 versions of the Toaster sample
- // driver, the security settings will not be updated by a new driver
- // install, unless the Toaster device class key is deleted.
- //
-
- hr = m_FxTarget->OpenRemoteInterface(FxRemoteInterface,
- NULL,
- GENERIC_READ | GENERIC_WRITE,
- NULL);
- }
-
- if (SUCCEEDED(hr))
- {
- //
- // Create a new FX request object and assign the new callback
- // object to handle any request level events that occur.
- //
- hr = FxDevice->CreateRequest(unknown,
- FxRemoteInterface,
- &fxWriteRequest);
- }
-
- if (SUCCEEDED(hr))
- {
- //
- // We want to save the newer IWDFIoRequest2 interface instead.
- //
- hr = fxWriteRequest->QueryInterface(IID_PPV_ARGS(&m_FxWriteRequest));
- }
-
- if (SUCCEEDED(hr))
- {
- //
- // Create a buffer for the write request
- //
- hr = FxDriver->CreateWdfMemory(WRITE_BUF_SIZE,
- NULL,
- FxRemoteInterface,
- &m_FxWriteMemory);
- }
-
- if (SUCCEEDED(hr))
- {
- //
- // Create a new FX remote target object and assign the new callback
- // object to handle any remote target level events that occur.
- //
- hr = FxDevice->CreateRequest(unknown,
- FxRemoteInterface,
- &fxReadRequest);
- }
-
- if (SUCCEEDED(hr))
- {
- //
- // We want to save the newer IWDFIoRequest2 interface instead.
- //
- hr = fxReadRequest->QueryInterface(IID_PPV_ARGS(&m_FxReadRequest));
- }
-
- if (SUCCEEDED(hr))
- {
- //
- // Create a buffer for the read request
- //
- hr = FxDriver->CreateWdfMemory(READ_BUF_SIZE,
- NULL,
- FxRemoteInterface,
- &m_FxReadMemory);
- }
-
- if (SUCCEEDED(hr))
- {
- //
- // Create/Start the thread which will post I/O requests to the remote
- // target.
- //
- // NOTE: This would not be a typical driver pattern. Normally, your
- // driver would receive some I/O from another caller and you'd
- // use this I/O as a trigger to post I/O to the remote target.
- // You may choose to forward the request directly with no changes,
- // modify the request before sending, or create an entirely
- // separate request.
- //
- m_hThread = CreateThread(NULL,
- 0,
- _ThreadProc,
- this,
- 0,
- NULL);
-
- if (m_hThread == NULL)
- {
- hr = HRESULT_FROM_WIN32(GetLastError());
- }
- }
-
- unknown->Release();
-
- return hr;
-}
-
-DWORD WINAPI CMyRemoteTarget::ThreadProc(
- VOID
- )
-/*++
-
- Routine Description:
-
- This method is the main loop for a thread that posts I/O requests to
- the remote target. The main loop continues until the remote target
- is deleted, which happens in the Dispose() method.
-
---*/
-{
- BOOL bContinue = TRUE;
-
- while(bContinue)
- {
- Sleep(100);
-
- switch(m_FxTarget->GetState())
- {
- case WdfIoTargetStarted:
- PostIoRequests();
- break;
-
- case WdfIoTargetClosedForQueryRemove:
- break;
-
- case WdfIoTargetClosed:
- case WdfIoTargetDeleted:
- default:
- bContinue = false;
- break;
- }
- }
-
- return 0;
-}
-
-void
-CMyRemoteTarget::PostIoRequests(
- VOID
- )
-{
- HRESULT hr;
-
- if (!m_WriteInProgress)
- {
- //
- // Mark that the request has been sent, so we don't try to send
- // again before the completion routine runs.
- //
- m_WriteInProgress = true;
-
- hr = m_FxTarget->FormatRequestForWrite(m_FxWriteRequest,
- NULL,
- m_FxWriteMemory,
- 0,
- 0);
-
- if (SUCCEEDED(hr))
- {
- m_FxWriteRequest->SetCompletionCallback(this, NULL);
-
- hr = m_FxWriteRequest->Send(m_FxTarget, 0, 0);
- }
-
- if (FAILED(hr))
- {
- m_WriteInProgress = false;
- }
- }
-
- if (!m_ReadInProgress)
- {
- //
- // Mark that the request has been sent, so we don't try to send
- // again before the completion routine runs.
- //
- m_ReadInProgress = true;
-
- hr = m_FxTarget->FormatRequestForRead(m_FxReadRequest,
- NULL,
- m_FxReadMemory,
- 0,
- 0);
-
- if (SUCCEEDED(hr))
- {
- m_FxReadRequest->SetCompletionCallback(this, NULL);
-
- hr = m_FxReadRequest->Send(m_FxTarget, 0, 0);
- }
-
- if (FAILED(hr))
- {
- m_ReadInProgress = true;
- }
- }
-}
-
-HRESULT
-CMyRemoteTarget::QueryInterface(
- _In_ REFIID InterfaceId,
- _Out_ PVOID * Object
- )
-/*++
-
- Routine Description:
-
- This method is called to get a pointer to one of the object's callback
- interfaces.
-
- Arguments:
-
- InterfaceId - the interface being requested
-
- Object - a location to store the interface pointer if successful
-
- Return Value:
-
- S_OK or E_NOINTERFACE
-
---*/
-{
- HRESULT hr;
-
- if(IsEqualIID(InterfaceId, __uuidof(IRequestCallbackRequestCompletion)))
- {
- *Object = QueryIRequestCallbackRequestCompletion();
- hr = S_OK;
- }
- else if(IsEqualIID(InterfaceId, __uuidof(IRemoteTargetCallbackRemoval)))
- {
- *Object = QueryIRemoteTargetCallbackRemoval();
- hr = S_OK;
- }
- else if(IsEqualIID(InterfaceId, __uuidof(IObjectCleanup)))
- {
- *Object = QueryIObjectCleanup();
- hr = S_OK;
- }
- else
- {
- hr = CUnknown::QueryInterface(InterfaceId, Object);
- }
-
- return hr;
-}
-
-//
-// IRequestCallbackRequestCompletion
-//
-void
-STDMETHODCALLTYPE
-CMyRemoteTarget::OnCompletion(
- _In_ IWDFIoRequest * FxRequest,
- _In_ IWDFIoTarget * /* FxTarget */,
- _In_ IWDFRequestCompletionParams * /* Params */,
- _In_ void* /* Context */
- )
-{
- IWDFRequestCompletionParams * CompletionParams;
-
- FxRequest->GetCompletionParams(&CompletionParams);
-
- if (CompletionParams->GetCompletedRequestType() == WdfRequestRead)
- {
- m_FxReadRequest->Reuse(E_FAIL);
- m_ReadInProgress = false;
- }
- if (CompletionParams->GetCompletedRequestType() == WdfRequestWrite)
- {
- m_FxWriteRequest->Reuse(E_FAIL);
- m_WriteInProgress = false;
- }
-
- CompletionParams->Release();
-}
-
-//
-// IRemoteTargetCallbackRemoval
-//
-BOOL
-STDMETHODCALLTYPE
-CMyRemoteTarget::OnRemoteTargetQueryRemove(
- _In_ IWDFRemoteTarget * /* FxTarget */
- )
-{
- m_FxTarget->CloseForQueryRemove();
-
- //
- // Return FALSE if you want to VETO the Query
- //
-
- return TRUE;
-}
-
-VOID
-STDMETHODCALLTYPE
-CMyRemoteTarget::OnRemoteTargetRemoveCanceled(
- _In_ IWDFRemoteTarget * /* FxTarget */
- )
-{
- if (FAILED(m_FxTarget->Reopen()))
- {
- m_FxTarget->Close();
- }
-}
-
-VOID
-STDMETHODCALLTYPE
-CMyRemoteTarget::OnRemoteTargetRemoveComplete(
- _In_ IWDFRemoteTarget * /* FxTarget */
- )
-{
- //
- // The remote device has been removed, so we close the target for good.
- // The rest of cleanup will occur when the framework handles the removal
- // of the RemoteInterface
- //
-
- m_FxTarget->Close();
-}
-
-
-//
-// IObjectCleanup
-//
-
-void
-STDMETHODCALLTYPE
-CMyRemoteTarget::OnCleanup(
- _In_ IWDFObject * /* FxObject */
- )
-{
- if (m_hThread != NULL)
- {
- if (m_FxTarget->GetState() != WdfIoTargetClosed)
- {
- //
- // Close the target if it's still open.
- //
- // If the target has already gone through RemoveComplete, it should
- // already be closed.
- //
- // If the Target interface is disabled without the device being
- // removed, the target will still be open until now.
- //
- // If the ToastMon device itself is removed while a target is
- // still active, we'll now close it.
- //
- m_FxTarget->Close();
- }
-
- //
- // Wait for the Thread to complete
- //
- WaitForSingleObject(m_hThread, INFINITE);
-
- CloseHandle(m_hThread);
-
- m_hThread = NULL;
-
- //
- // Remove ourselves from the list of Remote Targets
- //
- RemoveEntryList(&m_Entry);
- }
-
- m_FxTarget = NULL;
- m_FxWriteRequest = NULL;
- m_FxReadRequest = NULL;
-}
-
diff --git a/general/toaster/toastDrv/umdf/Toastmon/RemoteTarget.h b/general/toaster/toastDrv/umdf/Toastmon/RemoteTarget.h
deleted file mode 100644
index 15d91dad..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/RemoteTarget.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/*++
-
-Copyright (C) Microsoft Corporation, All Rights Reserved
-
-Module Name:
-
- RemoteTarget.h
-
-Abstract:
-
- This module contains the type definitions for the UMDF sample
- driver's remote target callback class.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-
-
-#define READ_BUF_SIZE 100
-#define WRITE_BUF_SIZE 120
-
-
-class CMyRemoteTarget : public CUnknown,
- public IRequestCallbackRequestCompletion,
- public IRemoteTargetCallbackRemoval,
- public IObjectCleanup
-{
- //
- // Public data members.
- //
-public:
-
- //
- // This is the Entry for the list of Remote Targets.
- // The List head is held by CMyDevice.
- //
- LIST_ENTRY m_Entry;
-
-
- //
- // Private data members.
- //
-private:
-
- CMyDevice * m_MyDevice; // Weak reference
-
- //
- // The handle for a thread to post I/O requests to the remote target
- //
- HANDLE m_hThread;
-
- CComPtr<IWDFRemoteTarget> m_FxTarget;
-
- bool m_WriteInProgress;
- CComPtr<IWDFIoRequest2> m_FxWriteRequest;
- CComPtr<IWDFMemory> m_FxWriteMemory;
-
- bool m_ReadInProgress;
- CComPtr<IWDFIoRequest2> m_FxReadRequest;
- CComPtr<IWDFMemory> m_FxReadMemory;
-
- //
- // Private methods.
- //
-private:
-
- void
- PostIoRequests(
- VOID
- );
-
- //
- // Protected methods
- //
-protected:
-
- CMyRemoteTarget(
- VOID
- ) :
- m_MyDevice(NULL),
- m_hThread(NULL),
- m_WriteInProgress(false),
- m_ReadInProgress(false)
-
- {
- }
-
- HRESULT
- Initialize(
- _In_ CMyDevice * MyDevice,
- _In_ IWDFDriver * FxDriver,
- _In_ IWDFDevice2 * FxDevice,
- _In_ IWDFRemoteInterface * FxRemoteInterface
- );
-
- //
- // Public methods
- //
-public:
-
- //
- // The factory method used to create an instance of this driver.
- //
- static
- HRESULT
- CreateInstance(
- _In_ CMyDevice * MyDevice,
- _In_ IWDFDriver * FxDriver,
- _In_ IWDFDevice2 * FxDevice,
- _In_ IWDFRemoteInterface * FxRemoteInterface,
- _Out_ PCMyRemoteTarget * MyRemoteTarget
- );
-
- ~CMyRemoteTarget(
- VOID
- )
- {
- }
-
- DWORD WINAPI
- ThreadProc(
- VOID
- );
-
- //
- // COM methods
- //
-public:
-
- //
- // IUnknown methods.
- //
- virtual
- ULONG
- STDMETHODCALLTYPE
- AddRef(
- VOID
- )
- {
- return __super::AddRef();
- }
- _At_(this, __drv_freesMem(object))
- virtual
- ULONG
- STDMETHODCALLTYPE
- Release(
- VOID
- )
- {
- return __super::Release();
- }
- virtual
- HRESULT
- STDMETHODCALLTYPE
- QueryInterface(
- _In_ REFIID InterfaceId,
- _Out_ PVOID * Object
- );
-
- //
- // IRequestCallbackRequestCompletion
- //
- void
- STDMETHODCALLTYPE
- OnCompletion(
- _In_ IWDFIoRequest * FxRequest,
- _In_ IWDFIoTarget * /* FxTarget */,
- _In_ IWDFRequestCompletionParams * /* Params */,
- _In_ void* /* Context */
- );
- IRequestCallbackRequestCompletion *
- QueryIRequestCallbackRequestCompletion(
- VOID
- )
- {
- AddRef();
- return static_cast<IRequestCallbackRequestCompletion*>(this);
- }
-
- //
- // IRemoteTargetCallbackRemoval
- //
- BOOL
- STDMETHODCALLTYPE
- OnRemoteTargetQueryRemove(
- _In_ IWDFRemoteTarget * /* FxTarget */
- );
- VOID
- STDMETHODCALLTYPE
- OnRemoteTargetRemoveCanceled(
- _In_ IWDFRemoteTarget * /* FxTarget */
- );
- VOID
- STDMETHODCALLTYPE
- OnRemoteTargetRemoveComplete(
- _In_ IWDFRemoteTarget * /* FxTarget */
- );
- IRemoteTargetCallbackRemoval *
- QueryIRemoteTargetCallbackRemoval(
- VOID
- )
- {
- AddRef();
- return static_cast<IRemoteTargetCallbackRemoval*>(this);
- }
-
- //
- // IObjectCleanup
- //
- void
- STDMETHODCALLTYPE
- OnCleanup(
- _In_ IWDFObject* /* FxObject */
- );
- IObjectCleanup *
- QueryIObjectCleanup(
- VOID
- )
- {
- AddRef();
- return static_cast<IObjectCleanup*>(this);
- }
-
-};
diff --git a/general/toaster/toastDrv/umdf/Toastmon/ToastMon.rc b/general/toaster/toastDrv/umdf/Toastmon/ToastMon.rc
deleted file mode 100644
index 57983bbc..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/ToastMon.rc
+++ /dev/null
@@ -1,21 +0,0 @@
-//---------------------------------------------------------------------------
-// ToastMon.rc
-//
-// Copyright (c) Microsoft Corporation, All Rights Reserved
-//---------------------------------------------------------------------------
-
-
-#include <windows.h>
-#include <ntverp.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 "WDF:UMDF ToastMon User-Mode Driver Sample"
-#define VER_INTERNALNAME_STR "ToastMon"
-#define VER_ORIGINALFILENAME_STR "ToastMon.dll"
-
-#include "common.ver"
diff --git a/general/toaster/toastDrv/umdf/Toastmon/WUDFToastMon.inx b/general/toaster/toastDrv/umdf/Toastmon/WUDFToastMon.inx
deleted file mode 100644
index eba3c794..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/WUDFToastMon.inx
+++ /dev/null
Binary files differ
diff --git a/general/toaster/toastDrv/umdf/Toastmon/WUDFToastMon.vcxproj b/general/toaster/toastDrv/umdf/Toastmon/WUDFToastMon.vcxproj
deleted file mode 100644
index 3648d85f..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/WUDFToastMon.vcxproj
+++ /dev/null
@@ -1,285 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{F575419D-099B-4DA0-B80C-88D766DD7542}</ProjectGuid>
- <RootNamespace>$(MSBuildProjectName)</RootNamespace>
- <UMDF_VERSION_MAJOR>1</UMDF_VERSION_MAJOR>
- <SupportsPackaging>false</SupportsPackaging>
- <RequiresPackageProject>true</RequiresPackageProject>
- <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
- <Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{439EDE87-12DD-4F6D-8C22-A8AC9DAEF4B2}</SampleGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <TargetVersion>Windows10</TargetVersion>
- <UseDebugLibraries>False</UseDebugLibraries>
- <DriverTargetPlatform>Desktop</DriverTargetPlatform>
- <DriverType>UMDF</DriverType>
- <PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <TargetVersion>Windows10</TargetVersion>
- <UseDebugLibraries>True</UseDebugLibraries>
- <DriverTargetPlatform>Desktop</DriverTargetPlatform>
- <DriverType>UMDF</DriverType>
- <PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <TargetVersion>Windows10</TargetVersion>
- <UseDebugLibraries>False</UseDebugLibraries>
- <DriverTargetPlatform>Desktop</DriverTargetPlatform>
- <DriverType>UMDF</DriverType>
- <PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <TargetVersion>Windows10</TargetVersion>
- <UseDebugLibraries>True</UseDebugLibraries>
- <DriverTargetPlatform>Desktop</DriverTargetPlatform>
- <DriverType>UMDF</DriverType>
- <PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <OutDir>$(IntDir)</OutDir>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
- </ImportGroup>
- <ItemGroup Label="WrappedTaskItems">
- <ClCompile Include="comsup.cpp; dllsup.cpp; driver.cpp; device.cpp; remotetarget.cpp">
- <WppEnabled>true</WppEnabled>
- <WppDllMacro>true</WppDllMacro>
- <WppScanConfigurationData>internal.h</WppScanConfigurationData>
- </ClCompile>
- <Inf Include="WUDFToastMon.inx">
- <Architecture>$(InfArch)</Architecture>
- <SpecifyArchitecture>true</SpecifyArchitecture>
- <CopyOutput>.\$(IntDir)\WUDFToastMon.inf</CopyOutput>
- </Inf>
- <OtherWpp Include="ToastMon.rc">
- <WppEnabled>true</WppEnabled>
- <WppDllMacro>true</WppDllMacro>
- <WppScanConfigurationData>internal.h</WppScanConfigurationData>
- </OtherWpp>
- </ItemGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <TargetName>WUDFToastMon</TargetName>
- <UseOfAtl>Dynamic</UseOfAtl>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <TargetName>WUDFToastMon</TargetName>
- <UseOfAtl>Dynamic</UseOfAtl>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <TargetName>WUDFToastMon</TargetName>
- <UseOfAtl>Dynamic</UseOfAtl>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <TargetName>WUDFToastMon</TargetName>
- <UseOfAtl>Dynamic</UseOfAtl>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- </ResourceCompile>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- </ClCompile>
- <Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- </Midl>
- <DriverSign>
- <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
- </DriverSign>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- </ResourceCompile>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- </ClCompile>
- <Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- </Midl>
- <DriverSign>
- <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
- </DriverSign>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- </ResourceCompile>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- </ClCompile>
- <Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- </Midl>
- <DriverSign>
- <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
- </DriverSign>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- </ResourceCompile>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- </ClCompile>
- <Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- </Midl>
- <DriverSign>
- <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
- </DriverSign>
- </ItemDefinitionGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <WIN32_WINNT_VERSION>0x0A00</WIN32_WINNT_VERSION>
- <NTDDI_VERSION>0x0A000000</NTDDI_VERSION>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <WIN32_WINNT_VERSION>0x0A00</WIN32_WINNT_VERSION>
- <NTDDI_VERSION>0x0A000000</NTDDI_VERSION>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <WIN32_WINNT_VERSION>0x0A00</WIN32_WINNT_VERSION>
- <NTDDI_VERSION>0x0A000000</NTDDI_VERSION>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <WIN32_WINNT_VERSION>0x0A00</WIN32_WINNT_VERSION>
- <NTDDI_VERSION>0x0A000000</NTDDI_VERSION>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Link>
- <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
- <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Link>
- <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
- <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
- <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Link>
- <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
- <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <TreatWarningAsError>true</TreatWarningAsError>
- <WarningLevel>Level4</WarningLevel>
- <ExceptionHandling>
- </ExceptionHandling>
- </ClCompile>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\strsafe.lib;$(SDK_LIB_PATH)\kernel32.lib;$(SDK_LIB_PATH)\advapi32.lib;$(SDK_LIB_PATH)\oleaut32.lib</AdditionalDependencies>
- <ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <TreatWarningAsError>true</TreatWarningAsError>
- <WarningLevel>Level4</WarningLevel>
- <ExceptionHandling>
- </ExceptionHandling>
- </ClCompile>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\strsafe.lib;$(SDK_LIB_PATH)\kernel32.lib;$(SDK_LIB_PATH)\advapi32.lib;$(SDK_LIB_PATH)\oleaut32.lib</AdditionalDependencies>
- <ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <TreatWarningAsError>true</TreatWarningAsError>
- <WarningLevel>Level4</WarningLevel>
- <ExceptionHandling>
- </ExceptionHandling>
- </ClCompile>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\strsafe.lib;$(SDK_LIB_PATH)\kernel32.lib;$(SDK_LIB_PATH)\advapi32.lib;$(SDK_LIB_PATH)\oleaut32.lib</AdditionalDependencies>
- <ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <TreatWarningAsError>true</TreatWarningAsError>
- <WarningLevel>Level4</WarningLevel>
- <ExceptionHandling>
- </ExceptionHandling>
- </ClCompile>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\strsafe.lib;$(SDK_LIB_PATH)\kernel32.lib;$(SDK_LIB_PATH)\advapi32.lib;$(SDK_LIB_PATH)\oleaut32.lib</AdditionalDependencies>
- <ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ResourceCompile Include="ToastMon.rc" />
- </ItemGroup>
- <ItemGroup>
- <Inf Exclude="@(Inf)" Include="*.inf" />
- <FilesToPackage Include="$(TargetPath)" Condition="'$(ConfigurationType)'=='Driver' or '$(ConfigurationType)'=='DynamicLibrary'" />
- </ItemGroup>
- <ItemGroup>
- <None Exclude="@(None)" Include="*.txt;*.htm;*.html" />
- <None Exclude="@(None)" Include="*.ico;*.cur;*.bmp;*.dlg;*.rct;*.gif;*.jpg;*.jpeg;*.wav;*.jpe;*.tiff;*.tif;*.png;*.rc2" />
- <None Exclude="@(None)" Include="*.def;*.bat;*.hpj;*.asmx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
diff --git a/general/toaster/toastDrv/umdf/Toastmon/WUDFToastMon.vcxproj.Filters b/general/toaster/toastDrv/umdf/Toastmon/WUDFToastMon.vcxproj.Filters
deleted file mode 100644
index 890e83d6..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/WUDFToastMon.vcxproj.Filters
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{FDA736D6-A855-4CED-9C9E-B6FF707C26E1}</UniqueIdentifier>
- </Filter>
- <Filter Include="Header Files">
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{03AC1F65-1B83-4D8E-9D06-DF35B5085EA7}</UniqueIdentifier>
- </Filter>
- <Filter Include="Resource Files">
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{E8FFB961-9B2B-4A4A-8F75-5F933AF32C60}</UniqueIdentifier>
- </Filter>
- <Filter Include="Driver Files">
- <Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{C6C8B61F-CD41-4ACB-AC13-2E7A02CC94A0}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="comsup.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="device.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="dllsup.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="remotetarget.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <None Include="exports.def">
- <Filter>Source Files</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="ToastMon.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/general/toaster/toastDrv/umdf/Toastmon/comsup.cpp b/general/toaster/toastDrv/umdf/Toastmon/comsup.cpp
deleted file mode 100644
index fd298470..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/comsup.cpp
+++ /dev/null
@@ -1,344 +0,0 @@
-/*++
-
-Copyright (C) Microsoft Corporation, All Rights Reserved
-
-Module Name:
-
- ComSup.cpp
-
-Abstract:
-
- This module contains implementations for the functions and methods
- used for providing COM support.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#include "internal.h"
-
-#include "comsup.tmh"
-
-//
-// Implementation of CUnknown methods.
-//
-
-CUnknown::CUnknown(
- VOID
- ) : m_ReferenceCount(1)
-/*++
-
- Routine Description:
-
- Constructor for an instance of the CUnknown class. This simply initializes
- the reference count of the object to 1. The caller is expected to
- call Release() if it wants to delete the object once it has been allocated.
-
- Arguments:
-
- None
-
- Return Value:
-
- None
-
---*/
-{
- // do nothing.
-}
-
-HRESULT
-STDMETHODCALLTYPE
-CUnknown::QueryInterface(
- _In_ REFIID InterfaceId,
- _Out_ PVOID *Object
- )
-/*++
-
- Routine Description:
-
- This method provides the basic support for query interface on CUnknown.
- If the interface requested is IUnknown it references the object and
- returns an interface pointer. Otherwise it returns an error.
-
- Arguments:
-
- InterfaceId - the IID being requested
-
- Object - a location to store the interface pointer to return.
-
- Return Value:
-
- S_OK or E_NOINTERFACE
-
---*/
-{
- if (IsEqualIID(InterfaceId, __uuidof(IUnknown)))
- {
- *Object = QueryIUnknown();
- return S_OK;
- }
- else
- {
- *Object = NULL;
- return E_NOINTERFACE;
- }
-}
-
-IUnknown *
-CUnknown::QueryIUnknown(
- VOID
- )
-/*++
-
- Routine Description:
-
- This helper method references the object and returns a pointer to the
- object's IUnknown interface.
-
- This allows other methods to convert a CUnknown pointer into an IUnknown
- pointer without a typecast and without calling QueryInterface and dealing
- with the return value.
-
- Arguments:
-
- None
-
- Return Value:
-
- A pointer to the object's IUnknown interface.
-
---*/
-{
- AddRef();
- return static_cast<IUnknown *>(this);
-}
-
-ULONG
-STDMETHODCALLTYPE
-CUnknown::AddRef(
- VOID
- )
-/*++
-
- Routine Description:
-
- This method adds one to the object's reference count.
-
- Arguments:
-
- None
-
- Return Value:
-
- The new reference count. The caller should only use this for debugging
- as the object's actual reference count can change while the caller
- examines the return value.
-
---*/
-{
- return InterlockedIncrement(&m_ReferenceCount);
-}
-
-ULONG
-STDMETHODCALLTYPE
-CUnknown::Release(
- VOID
- )
-/*++
-
- Routine Description:
-
- This method subtracts one to the object's reference count. If the count
- goes to zero, this method deletes the object.
-
- Arguments:
-
- None
-
- Return Value:
-
- The new reference count. If the caller uses this value it should only be
- to check for zero (i.e. this call caused or will cause deletion) or
- non-zero (i.e. some other call may have caused deletion, but this one
- didn't).
-
---*/
-{
- ULONG count = InterlockedDecrement(&m_ReferenceCount);
-
- if (count == 0)
- {
- delete this;
- }
- return count;
-}
-
-//
-// Implementation of CClassFactory methods.
-//
-
-//
-// Define storage for the factory's static lock count variable.
-//
-
-LONG CClassFactory::s_LockCount = 0;
-
-IClassFactory *
-CClassFactory::QueryIClassFactory(
- VOID
- )
-/*++
-
- Routine Description:
-
- This helper method references the object and returns a pointer to the
- object's IClassFactory interface.
-
- This allows other methods to convert a CClassFactory pointer into an
- IClassFactory pointer without a typecast and without dealing with the
- return value QueryInterface.
-
- Arguments:
-
- None
-
- Return Value:
-
- A referenced pointer to the object's IClassFactory interface.
-
---*/
-{
- AddRef();
- return static_cast<IClassFactory *>(this);
-}
-
-HRESULT
-CClassFactory::QueryInterface(
- _In_ REFIID InterfaceId,
- _Out_ PVOID *Object
- )
-/*++
-
- Routine Description:
-
- This method attempts to retrieve the requested interface from the object.
-
- If the interface is found then the reference count on that interface (and
- thus the object itself) is incremented.
-
- Arguments:
-
- InterfaceId - the interface the caller is requesting.
-
- Object - a location to store the interface pointer.
-
- Return Value:
-
- S_OK or E_NOINTERFACE
-
---*/
-{
- //
- // This class only supports IClassFactory so check for that.
- //
-
- if (IsEqualIID(InterfaceId, __uuidof(IClassFactory)))
- {
- *Object = QueryIClassFactory();
- return S_OK;
- }
- else
- {
- //
- // See if the base class supports the interface.
- //
-
- return CUnknown::QueryInterface(InterfaceId, Object);
- }
-}
-
-HRESULT
-STDMETHODCALLTYPE
-CClassFactory::CreateInstance(
- _In_opt_ IUnknown * /* OuterObject */,
- _In_ REFIID InterfaceId,
- _Out_ PVOID *Object
- )
-/*++
-
- Routine Description:
-
- This COM method is the factory routine - it creates instances of the driver
- callback class and returns the specified interface on them.
-
- Arguments:
-
- OuterObject - only used for aggregation, which our driver callback class
- does not support.
-
- InterfaceId - the interface ID the caller would like to get from our
- new object.
-
- Object - a location to store the referenced interface pointer to the new
- object.
-
- Return Value:
-
- Status.
-
---*/
-{
- HRESULT hr;
-
- PCMyDriver driver;
-
- *Object = NULL;
-
- hr = CMyDriver::CreateInstance(&driver);
-
- if (SUCCEEDED(hr))
- {
- hr = driver->QueryInterface(InterfaceId, Object);
- driver->Release();
- }
-
- return hr;
-}
-
-HRESULT
-STDMETHODCALLTYPE
-CClassFactory::LockServer(
- _In_ BOOL Lock
- )
-/*++
-
- Routine Description:
-
- This COM method can be used to keep the DLL in memory. However since the
- driver's DllCanUnloadNow function always returns false, this has little
- effect. Still it tracks the number of lock and unlock operations.
-
- Arguments:
-
- Lock - Whether the caller wants to lock or unlock the "server"
-
- Return Value:
-
- S_OK
-
---*/
-{
- if (Lock)
- {
- InterlockedIncrement(&s_LockCount);
- }
- else
- {
- InterlockedDecrement(&s_LockCount);
- }
- return S_OK;
-}
-
diff --git a/general/toaster/toastDrv/umdf/Toastmon/comsup.h b/general/toaster/toastDrv/umdf/Toastmon/comsup.h
deleted file mode 100644
index b96fd982..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/comsup.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/*++
-
-Copyright (C) Microsoft Corporation, All Rights Reserved
-
-Module Name:
-
- ComSup.h
-
-Abstract:
-
- This module contains classes and functions use for providing COM support
- code.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-
-//
-// Forward type declarations. They are here rather than in internal.h as
-// you only need them if you choose to use these support classes.
-//
-
-typedef class CUnknown *PCUnknown;
-typedef class CClassFactory *PCClassFactory;
-
-//
-// Base class to implement IUnknown. You can choose to derive your COM
-// classes from this class, or simply implement IUnknown in each of your
-// classes.
-//
-
-class CUnknown : public IUnknown
-{
-
-//
-// Private data members and methods. These are only accessible by the methods
-// of this class.
-//
-private:
-
- //
- // The reference count for this object. Initialized to 1 in the
- // constructor.
- //
-
- LONG m_ReferenceCount;
-
-//
-// Protected data members and methods. These are accessible by the subclasses
-// but not by other classes.
-//
-protected:
-
- //
- // The constructor and destructor are protected to ensure that only the
- // subclasses of CUnknown can create and destroy instances.
- //
-
- CUnknown(
- VOID
- );
-
- //
- // The destructor MUST be virtual. Since any instance of a CUnknown
- // derived class should only be deleted from within CUnknown::Release,
- // the destructor MUST be virtual or only CUnknown::~CUnknown will get
- // invoked on deletion.
- //
- // If you see that your CMyDevice specific destructor is never being
- // called, make sure you haven't deleted the virtual destructor here.
- //
-
- virtual
- ~CUnknown(
- VOID
- )
- {
- // Do nothing
- }
-
-//
-// Public Methods. These are accessible by any class.
-//
-public:
-
- IUnknown *
- QueryIUnknown(
- VOID
- );
-
-//
-// COM Methods.
-//
-public:
-
- //
- // IUnknown methods
- //
-
- virtual
- ULONG
- STDMETHODCALLTYPE
- AddRef(
- VOID
- );
-
- virtual
- ULONG
- STDMETHODCALLTYPE
- Release(
- VOID
- );
-
- virtual
- HRESULT
- STDMETHODCALLTYPE
- QueryInterface(
- _In_ REFIID InterfaceId,
- _Out_ PVOID *Object
- );
-};
-
-//
-// Class factory support class. Create an instance of this from your
-// DllGetClassObject method and modify the implementation to create
-// an instance of your driver event handler class.
-//
-
-class CClassFactory : public CUnknown, public IClassFactory
-{
-//
-// Private data members and methods. These are only accessible by the methods
-// of this class.
-//
-private:
-
- //
- // The lock count. This is shared across all instances of IClassFactory
- // and can be queried through the public IsLocked method.
- //
-
- static LONG s_LockCount;
-
-//
-// Public Methods. These are accessible by any class.
-//
-public:
-
- IClassFactory *
- QueryIClassFactory(
- VOID
- );
-
-//
-// COM Methods.
-//
-public:
-
- //
- // IUnknown methods
- //
-
- virtual
- ULONG
- STDMETHODCALLTYPE
- AddRef(
- VOID
- )
- {
- return __super::AddRef();
- }
-
- _At_(this, __drv_freesMem(object))
- virtual
- ULONG
- STDMETHODCALLTYPE
- Release(
- VOID
- )
- {
- return __super::Release();
- }
-
- virtual
- HRESULT
- STDMETHODCALLTYPE
- QueryInterface(
- _In_ REFIID InterfaceId,
- _Out_ PVOID *Object
- );
-
- //
- // IClassFactory methods.
- //
-
- virtual
- HRESULT
- STDMETHODCALLTYPE
- CreateInstance(
- _In_opt_ IUnknown *OuterObject,
- _In_ REFIID InterfaceId,
- _Out_ PVOID *Object
- );
-
- virtual
- HRESULT
- STDMETHODCALLTYPE
- LockServer(
- _In_ BOOL Lock
- );
-};
diff --git a/general/toaster/toastDrv/umdf/Toastmon/dllsup.cpp b/general/toaster/toastDrv/umdf/Toastmon/dllsup.cpp
deleted file mode 100644
index 8b4b5426..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/dllsup.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/*++
-
-Copyright (C) Microsoft Corporation, All Rights Reserved.
-
-Module Name:
-
- dllsup.cpp
-
-Abstract:
-
- This module contains the implementation of the UMDF Sample
- Driver's entry point and its exported functions for providing COM support.
-
- This module can be copied without modification to a new UMDF driver. It
- depends on some of the code in comsup.cpp & comsup.h to handle DLL
- registration and creating the first class factory.
-
- This module is dependent on the following defines:
-
- MYDRIVER_TRACING_ID - A wide string passed to WPP when initializing
- tracing. See internal.h for definition.
-
- MYDRIVER_CLASS_ID - A GUID encoded in struct format used to
- initialize the driver's ClassID.
-
- These are defined in internal.h for the sample. If you choose
- to use a different primary include file, you should ensure they are
- defined there as well.
-
-Environment:
-
- WDF User-Mode Driver Framework (WDF:UMDF)
-
---*/
-
-#include "internal.h"
-#include "dllsup.tmh"
-
-const GUID CLSID_MyDriverCoClass = MYDRIVER_CLASS_ID;
-
-BOOL
-WINAPI
-DllMain(
- HINSTANCE ModuleHandle,
- DWORD Reason,
- PVOID /* Reserved */
- )
-/*++
-
- Routine Description:
-
- This is the entry point and exit point for the I/O trace driver. This
- does very little as the I/O trace driver has minimal global data.
-
- This method initializes tracing.
-
- Arguments:
-
- ModuleHandle - the DLL handle for this module.
-
- Reason - the reason this entry point was called.
-
- Reserved - unused
-
- Return Value:
-
- TRUE
-
---*/
-{
- if (DLL_PROCESS_ATTACH == Reason)
- {
- //
- // Initialize tracing.
- //
-
- WPP_INIT_TRACING(MYDRIVER_TRACING_ID);
-
- DisableThreadLibraryCalls(ModuleHandle);
- }
- else if (DLL_PROCESS_DETACH == Reason)
- {
- //
- // Cleanup tracing.
- //
-
- WPP_CLEANUP();
- }
-
- return TRUE;
-}
-
-HRESULT
-STDAPICALLTYPE
-DllGetClassObject(
- _In_ REFCLSID ClassId,
- _In_ REFIID InterfaceId,
- _Outptr_ LPVOID *Interface
- )
-/*++
-
- Routine Description:
-
- This routine is called by COM in order to instantiate the
- driver callback object and do an initial query interface on it.
-
- This method only creates an instance of the driver's class factory, as this
- is the minimum required to support UMDF.
-
- Arguments:
-
- ClassId - the CLSID of the object being "gotten"
-
- InterfaceId - the interface the caller wants from that object.
-
- Interface - a location to store the referenced interface pointer
-
- Return Value:
-
- S_OK if the function succeeds or error indicating the cause of the
- failure.
-
---*/
-{
- PCClassFactory factory;
-
- HRESULT hr = S_OK;
-
- *Interface = NULL;
-
- //
- // If the CLSID doesn't match that of our "coclass" (defined in the IDL
- // file) then we can't create the object the caller wants. This may
- // indicate that the COM registration is incorrect, and another CLSID
- // is referencing this drvier.
- //
-
- if (IsEqualCLSID(ClassId, CLSID_MyDriverCoClass) == false)
- {
- Trace(
- TRACE_LEVEL_ERROR,
- L"ERROR: Called to create instance of unrecognized class (%!GUID!)",
- &ClassId
- );
-
- return CLASS_E_CLASSNOTAVAILABLE;
- }
-
- //
- // Create an instance of the class factory for the caller.
- //
-
- factory = new CClassFactory();
-
- if (NULL == factory)
- {
- hr = E_OUTOFMEMORY;
- }
-
- //
- // Query the object we created for the interface the caller wants. After
- // that we release the object. This will drive the reference count to
- // 1 (if the QI succeeded an referenced the object) or 0 (if the QI failed).
- // In the later case the object is automatically deleted.
- //
-
- if (SUCCEEDED(hr))
- {
- hr = factory->QueryInterface(InterfaceId, Interface);
- factory->Release();
- }
-
- return hr;
-}
diff --git a/general/toaster/toastDrv/umdf/Toastmon/exports.def b/general/toaster/toastDrv/umdf/Toastmon/exports.def
deleted file mode 100644
index f8ac59f6..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/exports.def
+++ /dev/null
@@ -1,4 +0,0 @@
-; Exports.def : Declares the module parameters.
-
-EXPORTS
- DllGetClassObject PRIVATE
diff --git a/general/toaster/toastDrv/umdf/Toastmon/internal.h b/general/toaster/toastDrv/umdf/Toastmon/internal.h
deleted file mode 100644
index 5a8fc9e2..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/internal.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*++
-
-Copyright (C) Microsoft Corporation, All Rights Reserved
-
-Module Name:
-
- Internal.h
-
-Abstract:
-
- This module contains the local type definitions for the
- driver sample.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
-#endif
-
-//
-// Include the WUDF DDI
-//
-
-#include "wudfddi.h"
-
-//
-// Use specstrings for in/out annotation of function parameters.
-//
-
-#include "specstrings.h"
-
-//
-// Include ATL to provide basic COM support.
-//
-
-#define _ATL_FREE_THREADED
-#define _ATL_NO_AUTOMATIC_NAMESPACE
-
-#include <atlbase.h>
-#include <atlcom.h>
-
-using namespace ATL;
-
-extern CComModule _Module;
-//
-// Forward definitions of classes in the other header files.
-//
-
-typedef class CMyDriver *PCMyDriver;
-typedef class CMyDevice *PCMyDevice;
-typedef class CMyRemoteTarget *PCMyRemoteTarget;
-
-//
-// Define the tracing flags.
-//
-// TODO: Choose a different trace control GUID
-//
-
-#define WPP_CONTROL_GUIDS \
- WPP_DEFINE_CONTROL_GUID( \
- MyDriverTraceControl, (dee2c67c,6328,48d9,876b,64682c4e9e9b), \
- \
- WPP_DEFINE_BIT(MYDRIVER_ALL_INFO) \
- )
-
-#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)
-
-//
-// 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, ...);
-// end_wpp
-//
-
-//
-// Driver specific #defines
-//
-// TODO: Change these values to be appropriate for your driver.
-//
-
-#define MYDRIVER_TRACING_ID L"Microsoft\\UMDF\\ToastMon"
-#define MYDRIVER_CLASS_ID { 0x8d4ec202, 0x1076, 0x4895, {0xa0, 0x72, 0x29, 0x7d, 0xa8, 0x8e, 0x60, 0x05} }
-
-//
-// Include simple doubly-linked list macros
-//
-#include "list.h"
-
-//
-// Include the type specific headers.
-//
-
-#include "comsup.h"
-#include "driver.h"
-#include "remotetarget.h"
-#include "device.h"
diff --git a/general/toaster/toastDrv/umdf/Toastmon/list.h b/general/toaster/toastDrv/umdf/Toastmon/list.h
deleted file mode 100644
index 38d0b1e9..00000000
--- a/general/toaster/toastDrv/umdf/Toastmon/list.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*++
-
-Copyright (C) Microsoft Corporation, All Rights Reserved
-
-Module Name:
-
- list.h
-
-Abstract:
-
- This module contains doubly linked list macros
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-
-
-FORCEINLINE
-VOID
-InitializeListHead(
- IN PLIST_ENTRY ListHead
- )
-{
- ListHead->Flink = ListHead->Blink = ListHead;
-}
-
-FORCEINLINE
-BOOLEAN
-RemoveEntryList(
- IN PLIST_ENTRY Entry
- )
-{
- PLIST_ENTRY Blink;
- PLIST_ENTRY Flink;
-
- Flink = Entry->Flink;
- Blink = Entry->Blink;
- Blink->Flink = Flink;
- Flink->Blink = Blink;
- return (BOOLEAN)(Flink == Blink);
-}
-
-FORCEINLINE
-VOID
-InsertHeadList(
- IN PLIST_ENTRY ListHead,
- IN PLIST_ENTRY Entry
- )
-{
- PLIST_ENTRY Flink;
-
- Flink = ListHead->Flink;
- Entry->Flink = Flink;
- Entry->Blink = ListHead;
- Flink->Blink = Entry;
- ListHead->Flink = Entry;
-}
-
-FORCEINLINE
-VOID
-InsertTailList(
- IN PLIST_ENTRY ListHead,
- IN PLIST_ENTRY Entry
- )
-{
- PLIST_ENTRY Blink;
-
- Blink = ListHead->Blink;
- Entry->Flink = ListHead;
- Entry->Blink = Blink;
- Blink->Flink = Entry;
- ListHead->Blink = Entry;
-}
diff --git a/general/toaster/toastDrv/umdf/func/Device.cpp b/general/toaster/toastDrv/umdf/func/Device.cpp
deleted file mode 100644
index eaf0a545..00000000
--- a/general/toaster/toastDrv/umdf/func/Device.cpp
+++ /dev/null
@@ -1,228 +0,0 @@
-/*++
-
- Copyright (c) Microsoft Corporation, All Rights Reserved
-
- Module Name:
-
- Device.cpp
-
- Abstract:
-
- This file contains the device callback object implementation.
-
- Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-#include "stdafx.h"
-#include "Device.h"
-
-#include "internal.h"
-#include "device.tmh"
-
-HRESULT
-CDevice::QueryInterface(
- _In_ REFIID riid,
- _Out_ LPVOID* ppvObject
- )
-/*++
-
-Routine Description:
-
- The framework calls this function to determine which callback
- interfaces we support.
-
-Arguments:
-
- riid - GUID for a given callback interface.
- ppvObject - We set this pointer to our object if we support the
- interface indicated by riid.
-
-Return Value:
-
- HRESULT S_OK - Interface is supported.
-
---*/
-{
- if (ppvObject == NULL)
- {
- return E_INVALIDARG;
- }
-
- *ppvObject = NULL;
-
- if ( riid == _uuidof(IUnknown) )
- {
- *ppvObject = static_cast<IPnpCallbackHardware*>(this);
- }
- else if ( riid == _uuidof(IPnpCallbackHardware) )
- {
- *ppvObject = static_cast<IPnpCallbackHardware *>(this);
- }
- else
- {
- return E_NOINTERFACE;
- }
-
- this->AddRef();
-
- return S_OK;
-}
-
-
-ULONG CDevice::AddRef()
-/*++
-
-Routine Description:
-
- Increments the ref count on this object.
-
-Arguments:
-
- None.
-
-Return Value:
-
- ULONG - new ref count.
-
---*/
-{
- LONG cRefs = InterlockedIncrement( &m_cRefs );
-
- return cRefs;
-}
-
-
-_At_(this, __drv_freesMem(object))
-ULONG CDevice::Release()
-/*++
-
-Routine Description:
-
- Decrements the ref count on this object.
-
-Arguments:
-
- None.
-
-Return Value:
-
- ULONG - new ref count.
-
---*/
-{
- LONG cRefs;
-
- cRefs = InterlockedDecrement( &m_cRefs );
-
- if( 0 == cRefs )
- {
- delete this;
- }
-
- return cRefs;
-}
-
-
-HRESULT
-CDevice::OnPrepareHardware(
- _In_ IWDFDevice* pDevice)
-/*++
-
-Routine Description:
-
- The framework calls this function after IDriverEntry::OnDeviceAdd
- returns and before the device enters the working power state.
- This callback prepares the device and the driver to enter the working
- state after enumeration.
-
-Arguments:
-
- pWdfDevice - A pointer to the IWDFDevice interface for the device
- object of the device to make accessible.
-
-Return Value:
-
- S_OK in case of success
- HRESULT correponding to one of the error codes that are defined in Winerror.h.
-
---*/
-{
- PWSTR deviceName = NULL;
- DWORD deviceNameCch = 0;
-
- HRESULT hr;
-
- Trace(TRACE_LEVEL_INFORMATION,"%!FUNC!");
-
- //
- // Get the device name.
- // Get the length to allocate first
- //
-
- hr = pDevice->RetrieveDeviceName(NULL, &deviceNameCch);
-
- //
- // Allocate the buffer
- //
-
- if (SUCCEEDED(hr))
- {
- deviceName = new WCHAR[deviceNameCch];
-
- if (deviceName == NULL)
- {
- hr = E_OUTOFMEMORY;
- }
- }
-
- //
- // Get the actual name
- //
-
- if (SUCCEEDED(hr))
- {
- hr = pDevice->RetrieveDeviceName(deviceName, &deviceNameCch);
-
- }
-
- //
- // Do your hardware operations here
- //
-
- delete[] deviceName;
-
- return hr;
-}
-
-HRESULT
-CDevice::OnReleaseHardware(
- _In_ IWDFDevice* /*pDevice*/)
-/*++
-
-Routine Description:
-
- This routine is invoked when the device is being removed or stopped
- It releases all resources allocated for this device. The framework
- calls this callback after the device exits from the working power
- state but before its queues are purged.
-
-
-Arguments:
-
- pWdfDevice - A pointer to the IWDFDevice interface for the device object
- of the device that is no longer accessible.
-
-
-Return Value:
- HRESULT - Always succeeds.
---*/
-{
- Trace(TRACE_LEVEL_INFORMATION,"%!FUNC!");
-
- return S_OK;
-}
-
-
-
diff --git a/general/toaster/toastDrv/umdf/func/Device.h b/general/toaster/toastDrv/umdf/func/Device.h
deleted file mode 100644
index 4bb68dc7..00000000
--- a/general/toaster/toastDrv/umdf/func/Device.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*++
-
- Copyright (c) Microsoft Corporation, All Rights Reserved
-
- Module Name:
-
- Device.h
-
- Abstract:
-
- This file contains the class definition for device callback object.
-
- Environment:
-
- Windows User-Mode Driver Framework (UMDF)
-
---*/
-
-#pragma once
-#include "resource.h"
-#include "WUDFToaster.h"
-
-//
-// To inform the framework about the callbacks we are interested in, we
-// simply derive from the desired set of interfaces.
-//
-class CDevice : public IPnpCallbackHardware
-{
-public:
- CDevice() : m_cRefs(0)
- {
- }
-
-
-public:
-
- //
- // Static method that creates a device callback object.
- //
- static HRESULT CreateInstance(_Out_ IUnknown ** ppUnkwn)
- {
- *ppUnkwn = NULL;
-
-#pragma warning( suppress : 6014 )// PFD ISSUE: counted memory locks
- CDevice *pMyDevice = new CDevice();
-
- if (NULL == pMyDevice)
- {
- return E_OUTOFMEMORY;
- }
-
- return (pMyDevice->QueryInterface( __uuidof(IUnknown), (void **) ppUnkwn ));
- }
-
- //
- // IUnknown
- //
- virtual HRESULT __stdcall QueryInterface(_In_ REFIID riid, _Out_ LPVOID* ppvObject);
- virtual ULONG __stdcall AddRef();
- _At_(this, __drv_freesMem(object))
- virtual ULONG __stdcall Release();
-
-
- // IPnpCallbackHardware
- //
- virtual HRESULT __stdcall OnPrepareHardware(_In_ IWDFDevice* pDevice);
- virtual HRESULT __stdcall OnReleaseHardware(_In_ IWDFDevice* pDevice);
-
- //
- // TODO: Add your interfaces here
- //
-
-private:
-
- LONG m_cRefs;
-
-};
-
diff --git a/general/toaster/toastDrv/umdf/func/Driver.cpp b/general/toaster/toastDrv/umdf/func/Driver.cpp
deleted file mode 100644
index 053217b9..00000000
--- a/general/toaster/toastDrv/umdf/func/Driver.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-/*++
-
- Copyright (c) Microsoft Corporation, All Rights Reserved
-
- Module Name:
-
- Driver.cpp
-
- Abstract:
-
- This file contains the implementation for the driver object.
-
- Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#include "stdafx.h"
-#include "Driver.h"
-#include "Device.h"
-#include "Queue.h"
-
-#include "internal.h"
-#include "driver.tmh"
-
-//Idle setting for the Toaster device
-#define IDLEWAKE_TIMEOUT_MSEC 6000
-
-
-HRESULT
-CDriver::OnDeviceAdd(
- _In_ IWDFDriver* pDriver,
- _In_ IWDFDeviceInitialize* pDeviceInit
- )
-/*++
-
-Routine Description:
-
- The framework calls this function when a device is being added to
- the driver stack.
-
-Arguments:
-
- IWDFDriver - Framework interface. The driver uses this
- interface to create device objects.
- IWDFDeviceInitialize - Framework interface. The driver uses this
- interface to set device parameters before
- creating the device obeject.
-
-Return Value:
-
- HRESULT S_OK - Device added successfully
-
---*/
-{
- IUnknown *pDeviceCallback = NULL;
- IWDFDevice *pIWDFDevice = NULL;
- IWDFDevice2 *pIWDFDevice2 = NULL;
- IUnknown *pIUnkQueue = NULL;
-
- //
- // UMDF Toaster is a function driver so set is as the power policy owner (PPO)
- //
- pDeviceInit->SetPowerPolicyOwnership(TRUE);
-
- //
- // Create our device callback object.
- //
- HRESULT hr = CDevice::CreateInstance(&pDeviceCallback);
-
- //
- // Ask the framework to create a device object for us.
- // We pass in the callback object and device init object
- // as creation parameters.
- //
- if (SUCCEEDED(hr))
- {
- hr = pDriver->CreateDevice(pDeviceInit,
- pDeviceCallback,
- &pIWDFDevice);
- }
-
- //
- // Create the queue callback object.
- //
-
- if (SUCCEEDED(hr))
- {
- hr = CQueue::CreateInstance(&pIUnkQueue);
- }
-
- //
- // Configure the default queue. We pass in our queue callback
- // object to inform the framework about the callbacks we want.
- //
-
- if (SUCCEEDED(hr))
- {
- IWDFIoQueue * pDefaultQueue = NULL;
- hr = pIWDFDevice->CreateIoQueue(
- pIUnkQueue,
- TRUE, // bDefaultQueue
- WdfIoQueueDispatchParallel,
- TRUE, // bPowerManaged
- FALSE, // bAllowZeroLengthRequests
- &pDefaultQueue);
- SAFE_RELEASE(pDefaultQueue);
- }
-
- //
- // Enable the device interface.
- //
-
- if (SUCCEEDED(hr))
- {
- hr = pIWDFDevice->CreateDeviceInterface(&GUID_DEVINTERFACE_TOASTER,
- NULL);
- }
-
- //
- // IWDFDevice2 interface is an extension of IWDFDevice interface that enables
- // Idle and Wake support.
- //
-
- //
- // Get a pointer to IWDFDevice2 interface
- //
-
- if (SUCCEEDED(hr))
- {
- hr = pIWDFDevice->QueryInterface(__uuidof(IWDFDevice2), (void**) &pIWDFDevice2);
- }
-
- //
- // Since this is a virtual device we tell the framework that we cannot wake
- // ourself if we sleep in S0. Only way the device can be brought to D0 is if
- // the device recieves an I/O from the system.
- //
-
- if (SUCCEEDED(hr))
- {
-
- hr = pIWDFDevice2->AssignS0IdleSettings(
- IdleCannotWakeFromS0,
- PowerDeviceD3, //the lowest-powered device sleeping state
- IDLEWAKE_TIMEOUT_MSEC, //idle timeout
- IdleAllowUserControl, //user can control the device's idle behavior.
- WdfTrue);
-
- }
-
- //
- // TODO: Add the Idle and Wake suupport specific for your hardware
- //
-
- SAFE_RELEASE(pDeviceCallback);
- SAFE_RELEASE(pIWDFDevice);
- SAFE_RELEASE(pIWDFDevice2);
- SAFE_RELEASE(pIUnkQueue);
-
- return hr;
-}
-
-VOID
-CDriver::OnDeinitialize(
- _In_ IWDFDriver * /* pDriver */
- )
-/*++
-
-Routine Description:
-
- The framework calls this function just before de-initializing itself. All
- WDF framework resources should be released by driver before returning from this call.
-
-Arguments:
-
-Return Value:
-
---*/
-{
- return ;
-}
-
-HRESULT
-CDriver::OnInitialize(
- _In_ IWDFDriver * /* pDriver */
- )
-/*++
-
-Routine Description:
-
- The framework calls this function just after loading the driver. The driver can
- perform any global, device independent intialization in this routine.
-
-Arguments:
-
-Return Value:
-
---*/
-{
- return S_OK;
-}
-
-
diff --git a/general/toaster/toastDrv/umdf/func/Driver.h b/general/toaster/toastDrv/umdf/func/Driver.h
deleted file mode 100644
index b60cffb5..00000000
--- a/general/toaster/toastDrv/umdf/func/Driver.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*++
-
- Copyright (c) Microsoft Corporation, All Rights Reserved
-
- Module Name:
-
- Driver.h
-
- Abstract:
-
- This file contains the class definition for the driver object.
-
- Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-#include "resource.h"
-#include "WUDFToaster.h"
-
-class ATL_NO_VTABLE CDriver :
- public CComObjectRootEx<CComMultiThreadModel>,
- public CComCoClass<CDriver, &CLSID_WUDFToaster>,
- public IDriverEntry
-{
-public:
- CDriver()
- {
- }
-
- DECLARE_REGISTRY_RESOURCEID(IDR_TOASTERDRIVER)
- DECLARE_NOT_AGGREGATABLE(CDriver)
-
- //
- // The driver object suppports the IDriverEntry interface.
- //
- BEGIN_COM_MAP(CDriver)
- COM_INTERFACE_ENTRY(IDriverEntry)
- END_COM_MAP()
-
-public:
- //
- // IDriverEntry
- //
- STDMETHOD (OnDeviceAdd)(
- _In_ IWDFDriver *pDriver,
- _In_ IWDFDeviceInitialize *pDeviceInit
- );
- STDMETHOD (OnInitialize)(
- _In_ IWDFDriver* pDriver
- );
- STDMETHOD_ (void, OnDeinitialize)(
- _In_ IWDFDriver* pDriver
- );
-};
-
-OBJECT_ENTRY_AUTO(__uuidof(WUDFToaster), CDriver)
diff --git a/general/toaster/toastDrv/umdf/func/Queue.cpp b/general/toaster/toastDrv/umdf/func/Queue.cpp
deleted file mode 100644
index dec296a0..00000000
--- a/general/toaster/toastDrv/umdf/func/Queue.cpp
+++ /dev/null
@@ -1,283 +0,0 @@
-/*++
-
- Copyright (c) Microsoft Corporation, All Rights Reserved
-
- Module Name:
-
- Queue.cpp
-
- Abstract:
-
- This file contains the queue callback object implementation.
-
- Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#include "stdafx.h"
-#include "Queue.h"
-#include <devioctl.h>
-#include <public.h>
-
-
-#include "internal.h"
-#include "queue.tmh"
-
-HRESULT
-CQueue::QueryInterface(
- _In_ REFIID riid,
- _Out_ LPVOID* ppvObject
- )
-/*++
-
-Routine Description:
-
- The framework calls this function to determine which callback
- interfaces we support.
-
-Arguments:
-
- riid - GUID for a given callback interface.
- ppvObject - We set this pointer to our object if we support the
- interface indicated by riid.
-
-Return Value:
-
- HRESULT S_OK - Interface is supported.
-
---*/
-{
- if (ppvObject == NULL)
- {
- return E_INVALIDARG;
- }
- *ppvObject = NULL;
-
- if ( riid == _uuidof(IUnknown) )
- {
- *ppvObject = static_cast<IQueueCallbackDeviceIoControl *> (this);
- }
- else if ( riid == _uuidof(IQueueCallbackDeviceIoControl) )
- {
- *ppvObject = static_cast<IQueueCallbackDeviceIoControl *>(this);
- }
- else if ( riid == _uuidof(IQueueCallbackRead) )
- {
- *ppvObject = static_cast<IQueueCallbackRead *>(this);
- }
- else if ( riid == _uuidof(IQueueCallbackWrite) )
- {
- *ppvObject = static_cast<IQueueCallbackWrite *>(this);
- }
- else
- {
- return E_NOINTERFACE;
- }
-
- this->AddRef();
-
- return S_OK;
-}
-
-
-
-ULONG CQueue::AddRef()
-/*++
-
-Routine Description:
-
- Increments the ref count on this object.
-
-Arguments:
-
- None.
-
-Return Value:
-
- ULONG - new ref count.
-
---*/
-{
- LONG cRefs = InterlockedIncrement( &m_cRefs );
- return cRefs;
-}
-
-_At_(this, __drv_freesMem(object))
-ULONG CQueue::Release()
-/*++
-
-Routine Description:
-
- Decrements the ref count on this object.
-
-Arguments:
-
- None.
-
-Return Value:
-
- ULONG - new ref count.
-
---*/
-{
- LONG cRefs;
-
- cRefs = InterlockedDecrement( &m_cRefs );
-
- if( 0 == cRefs )
- {
- delete this;
- }
-
- return cRefs;
-}
-
-
-void
-CQueue::OnDeviceIoControl(
- _In_ IWDFIoQueue* pQueue,
- _In_ IWDFIoRequest* pRequest,
- _In_ ULONG ControlCode,
- _In_ SIZE_T /*InputBufferSizeInBytes*/,
- _In_ SIZE_T /*OutputBufferSizeInBytes*/
- )
-/*++
-
-Routine Description:
-
- The framework calls this function when somone has called
- DeviceIoControl on the device.
-
-Arguments:
-
-Return Value:
- None
-
---*/
-{
- HRESULT hr = S_OK;
- IWDFDevice *pDevice = NULL;
-
- Trace(TRACE_LEVEL_INFORMATION,"%!FUNC!");
-
- //
- // Retrieve the queue's parent device object
- //
- pQueue->GetDevice(&pDevice);
-
- WUDF_TEST_DRIVER_ASSERT(pDevice);
-
- switch (ControlCode)
- {
- case IOCTL_TOASTER_DONT_DISPLAY_IN_UI_DEVICE:
-
- //
- // This is just an example on how to hide your device in the
- // device manager. Please remove your code when you adapt this
- // sample for your hardware.
- //
- pDevice->SetPnpState(WdfPnpStateDontDisplayInUI, WdfTrue);
- pDevice->CommitPnpState();
-
- break;
-
- default:
- hr = E_FAIL; //invalid request
-
- Trace(TRACE_LEVEL_ERROR,"%!FUNC! Invalid IOCTL %!hresult!",hr);
- }
- pRequest->Complete(hr);
-
- return;
-}
-
-void
-CQueue::OnRead(
- _In_ IWDFIoQueue* /* pQueue */,
- _In_ IWDFIoRequest* pRequest,
- _In_ SIZE_T SizeInBytes
- )
-/*++
-
-Routine Description:
-
-
- Read dispatch routine
- IQueueCallbackRead
-
-Arguments:
-
- pQueue - Framework Queue instance
- pRequest - Framework Request instance
- SizeInBytes - Length of bytes in the read buffer
-
- Copy available data into the read buffer
-
-Return Value:
- None.
-
---*/
-{
- Trace(TRACE_LEVEL_INFORMATION,"%!FUNC!");
-
- //
- // No need to check for zero-length reads.
- //
- // The framework queue is created with the flag bAllowZeroLengthRequests = FALSE.
- // FALSE indicates that the framework completes zero-length I/O requests instead
- // of putting them in the I/O queue.
- //
-
- //
- // TODO: Put your Read request processing here
- //
-
- pRequest->CompleteWithInformation(S_OK, SizeInBytes);
-
- return;
-
-}
-
-void
-CQueue::OnWrite(
- _In_ IWDFIoQueue * /* pQueue */,
- _In_ IWDFIoRequest * pRequest,
- _In_ SIZE_T BytesToWrite
- )
-/*++
-
-Routine Description:
-
- Write dispatch routine
- IQueueCallbackWrite
-
-Arguments:
-
- pQueue - Framework Queue instance
- pRequest - Framework Request instance
- BytesToWrite - Length of bytes in the write buffer
-
- Allocate and copy data to local buffer
-
-Return Value:
- None.
-
---*/
-{
- Trace(TRACE_LEVEL_INFORMATION,"%!FUNC!");
-
- //
- // No need to check for zero-length writes.
- //
-
- //
- // TODO: Put your Write request processing here
- //
-
- pRequest->CompleteWithInformation(S_OK, BytesToWrite);
-
- return;
-}
-
diff --git a/general/toaster/toastDrv/umdf/func/Queue.h b/general/toaster/toastDrv/umdf/func/Queue.h
deleted file mode 100644
index 6668ac35..00000000
--- a/general/toaster/toastDrv/umdf/func/Queue.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*++
-
- Copyright (c) Microsoft Corporation, All Rights Reserved
-
- Module Name:
-
- Queue.h
-
- Abstract:
-
- This file contains the class definition for the queue
- callback object.
-
- Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-#include "WUDFToaster.h"
-
-class CQueue :
- public IQueueCallbackDeviceIoControl,
- public IQueueCallbackRead,
- public IQueueCallbackWrite
-{
- public:
-
- CQueue() : m_cRefs(0)
- {
- }
-
- public:
-
- //
- // Static method that creates a queue callback object.
- //
- static HRESULT CreateInstance(_Out_ IUnknown **ppUkwn)
- {
- *ppUkwn = NULL;
-
-#pragma warning( suppress : 6014 )// PFD ISSUE: counted memory locks
- CQueue *pMyQueue = new CQueue();
-
- if (NULL == pMyQueue)
- {
- return E_OUTOFMEMORY;
- }
- return (pMyQueue->QueryInterface(__uuidof(IUnknown), (void **)ppUkwn ));
- }
-
- //
- // IUnknown
- //
- virtual HRESULT __stdcall QueryInterface(_In_ REFIID riid, _Out_ LPVOID* ppvObject);
- virtual ULONG __stdcall AddRef();
- _At_(this, __drv_freesMem(object))
- virtual ULONG __stdcall Release();
-
- //
- // IQueueCallbackDeviceIoControl
- //
- virtual void __stdcall OnDeviceIoControl(
- _In_ IWDFIoQueue* pQueue,
- _In_ IWDFIoRequest* pRequest,
- _In_ ULONG ControlCode,
- _In_ SIZE_T InputBufferSizeInBytes,
- _In_ SIZE_T OutputBufferSizeInBytes
- );
-
- //
- // IQueueCallbackRead
- //
- virtual void __stdcall OnRead(
- _In_ IWDFIoQueue *pWdfQueue,
- _In_ IWDFIoRequest *pWdfRequest,
- _In_ SIZE_T NumOfBytesToRead
- );
-
- //
- // IQueueCallbackWrite
- //
- virtual void __stdcall OnWrite(
- _In_ IWDFIoQueue *pWdfQueue,
- _In_ IWDFIoRequest *pWdfRequest,
- _In_ SIZE_T NumOfBytesToWrite
- );
-
- //
- // TODO: Add your interfaces here
- //
-
- private:
- LONG m_cRefs;
-};
diff --git a/general/toaster/toastDrv/umdf/func/WUDFToaster.cpp b/general/toaster/toastDrv/umdf/func/WUDFToaster.cpp
deleted file mode 100644
index fd66163d..00000000
--- a/general/toaster/toastDrv/umdf/func/WUDFToaster.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*++
-
- Copyright (c) Microsoft Corporation, All Rights Reserved
-
- Module Name:
-
- WUDFToaster.cpp
-
- Abstract:
-
- Implementation of DLL Exports.
-
- Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#include "stdafx.h"
-#include "resource.h"
-
-#include "WUDFToaster.h"
-
-#include "internal.h"
-#include "WUDFToaster.tmh"
-
-const GUID CLSID_MyDriverCoClass = MYDRIVER_CLASS_ID;
-
-class CToasterDriverModule : public CAtlDllModuleT< CToasterDriverModule >
-{
-public :
- DECLARE_LIBID(LIBID_WUDFToasterLib)
-};
-
-CToasterDriverModule _AtlModule;
-
-// DLL Entry Point
-extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
-{
- hInstance;
-
- if(dwReason == DLL_PROCESS_ATTACH)
- {
- //
- // Initialize tracing.
- //
-
- WPP_INIT_TRACING(MYDRIVER_TRACING_ID);
- }
- else if(dwReason == DLL_PROCESS_DETACH)
- {
- //
- // Cleanup tracing.
- //
-
- WPP_CLEANUP();
- }
-
- return _AtlModule.DllMain(dwReason, lpReserved);
-}
-
-// Returns a class factory to create an object of the requested type
-_Check_return_
-STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ LPVOID* ppv)
-{
- return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
-}
-
-// Used to determine whether the DLL can be unloaded by OLE
-STDAPI DllCanUnloadNow(void)
-{
- return _AtlModule.DllCanUnloadNow();
-}
-
-// DllRegisterServer - Adds entries to the system registry
-STDAPI DllRegisterServer(void)
-{
- // registers object, typelib and all interfaces in typelib
- HRESULT hr = _AtlModule.DllRegisterServer();
- return hr;
-}
-
-// DllUnregisterServer - Removes entries from the system registry
-STDAPI DllUnregisterServer(void)
-{
- HRESULT hr = _AtlModule.DllUnregisterServer();
- return hr;
-}
diff --git a/general/toaster/toastDrv/umdf/func/WUDFToaster.ctl b/general/toaster/toastDrv/umdf/func/WUDFToaster.ctl
deleted file mode 100644
index cfcbb866..00000000
--- a/general/toaster/toastDrv/umdf/func/WUDFToaster.ctl
+++ /dev/null
@@ -1,2 +0,0 @@
-9B6DE419-5658-46c9-A358-54FDEBB6B89D WudfToasterTraceGuid
-
diff --git a/general/toaster/toastDrv/umdf/func/WUDFToaster.def b/general/toaster/toastDrv/umdf/func/WUDFToaster.def
deleted file mode 100644
index 4aa746ad..00000000
--- a/general/toaster/toastDrv/umdf/func/WUDFToaster.def
+++ /dev/null
@@ -1,6 +0,0 @@
-; WUDFToaster.def : Declares the module parameters.
-
-LIBRARY "WUDFToaster.DLL"
-
-EXPORTS
- DllGetClassObject PRIVATE
diff --git a/general/toaster/toastDrv/umdf/func/WUDFToaster.idl b/general/toaster/toastDrv/umdf/func/WUDFToaster.idl
deleted file mode 100644
index da21b41e..00000000
--- a/general/toaster/toastDrv/umdf/func/WUDFToaster.idl
+++ /dev/null
@@ -1,40 +0,0 @@
-/*++
-
- Copyright (c) Microsoft Corporation, All Rights Reserved
-
- Module Name:
-
- WUDFToaster.idl
-
- Abstract:
-
- Definition of the WUDF Toaster sample's COM class
-
- Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-import "oaidl.idl";
-import "ocidl.idl";
-import "wudfddi.idl";
-
-[
- uuid(04170C5A-388E-410f-9BAA-E7724196AD17),
- version(1.0),
- helpstring("WUDF Toaster Driver 1.0 Type Library")
-]
-library WUDFToasterLib
-{
- importlib("stdole2.tlb");
- [
- uuid(5ED5997F-FAED-4a35-BA74-FCF7B43AEBA7),
- helpstring("WudfToaster Class")
- ]
- coclass WUDFToaster
- {
- [default] interface IDriverEntry;
- };
-};
-
diff --git a/general/toaster/toastDrv/umdf/func/WUDFToaster.inx b/general/toaster/toastDrv/umdf/func/WUDFToaster.inx
deleted file mode 100644
index 9874becf..00000000
--- a/general/toaster/toastDrv/umdf/func/WUDFToaster.inx
+++ /dev/null
Binary files differ
diff --git a/general/toaster/toastDrv/umdf/func/WUDFToaster.rc b/general/toaster/toastDrv/umdf/func/WUDFToaster.rc
deleted file mode 100644
index 74453a02..00000000
--- a/general/toaster/toastDrv/umdf/func/WUDFToaster.rc
+++ /dev/null
@@ -1,22 +0,0 @@
-//---------------------------------------------------------------------------
-// Skeleton.rc
-//
-// Copyright (c) Microsoft Corporation, All Rights Reserved
-//---------------------------------------------------------------------------
-
-
-#include <windows.h>
-#include <ntverp.h>
-#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 "WDF:UMDF User-Mode Toaster Driver Sample"
-#define VER_INTERNALNAME_STR "WUDFToaster"
-#define VER_ORIGINALFILENAME_STR "WUDFToaster.dll"
-
-#include "common.ver"
diff --git a/general/toaster/toastDrv/umdf/func/WUDFToaster.vcxproj b/general/toaster/toastDrv/umdf/func/WUDFToaster.vcxproj
deleted file mode 100644
index e9c01e32..00000000
--- a/general/toaster/toastDrv/umdf/func/WUDFToaster.vcxproj
+++ /dev/null
@@ -1,338 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{3A32C2D4-D40F-4DB8-9F25-ABB21CEB7C7F}</ProjectGuid>
- <RootNamespace>$(MSBuildProjectName)</RootNamespace>
- <UMDF_VERSION_MAJOR>1</UMDF_VERSION_MAJOR>
- <SupportsPackaging>false</SupportsPackaging>
- <RequiresPackageProject>true</RequiresPackageProject>
- <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
- <Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{8FD6D25D-F593-45DB-AF96-6F358E01587B}</SampleGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <TargetVersion>Windows10</TargetVersion>
- <UseDebugLibraries>False</UseDebugLibraries>
- <DriverTargetPlatform>Desktop</DriverTargetPlatform>
- <DriverType>UMDF</DriverType>
- <PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <TargetVersion>Windows10</TargetVersion>
- <UseDebugLibraries>True</UseDebugLibraries>
- <DriverTargetPlatform>Desktop</DriverTargetPlatform>
- <DriverType>UMDF</DriverType>
- <PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <TargetVersion>Windows10</TargetVersion>
- <UseDebugLibraries>False</UseDebugLibraries>
- <DriverTargetPlatform>Desktop</DriverTargetPlatform>
- <DriverType>UMDF</DriverType>
- <PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <TargetVersion>Windows10</TargetVersion>
- <UseDebugLibraries>True</UseDebugLibraries>
- <DriverTargetPlatform>Desktop</DriverTargetPlatform>
- <DriverType>UMDF</DriverType>
- <PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <OutDir>$(IntDir)</OutDir>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
- </ImportGroup>
- <ItemGroup Label="WrappedTaskItems">
- <ClCompile Include=".\$(IntDir)\WUDFToaster_i.c">
- <WppEnabled>true</WppEnabled>
- <WppDllMacro>true</WppDllMacro>
- <WppScanConfigurationData>internal.h</WppScanConfigurationData>
- </ClCompile>
- <ClCompile Include="WUDFToaster.cpp">
- <WppEnabled>true</WppEnabled>
- <WppDllMacro>true</WppDllMacro>
- <WppScanConfigurationData>internal.h</WppScanConfigurationData>
- <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreCompiledHeaderFile>stdAfx.h</PreCompiledHeaderFile>
- <PreCompiledHeader>Use</PreCompiledHeader>
- <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile>
- </ClCompile>
- <ClCompile Include="stdafx.cpp">
- <WppEnabled>true</WppEnabled>
- <WppDllMacro>true</WppDllMacro>
- <WppScanConfigurationData>internal.h</WppScanConfigurationData>
- <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreCompiledHeaderFile>stdAfx.h</PreCompiledHeaderFile>
- <PreCompiledHeader>Use</PreCompiledHeader>
- <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile>
- </ClCompile>
- <ClCompile Include="Driver.cpp">
- <WppEnabled>true</WppEnabled>
- <WppDllMacro>true</WppDllMacro>
- <WppScanConfigurationData>internal.h</WppScanConfigurationData>
- <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreCompiledHeaderFile>stdAfx.h</PreCompiledHeaderFile>
- <PreCompiledHeader>Use</PreCompiledHeader>
- <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile>
- </ClCompile>
- <ClCompile Include="Device.cpp">
- <WppEnabled>true</WppEnabled>
- <WppDllMacro>true</WppDllMacro>
- <WppScanConfigurationData>internal.h</WppScanConfigurationData>
- <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreCompiledHeaderFile>stdAfx.h</PreCompiledHeaderFile>
- <PreCompiledHeader>Use</PreCompiledHeader>
- <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile>
- </ClCompile>
- <ClCompile Include="Queue.cpp">
- <WppEnabled>true</WppEnabled>
- <WppDllMacro>true</WppDllMacro>
- <WppScanConfigurationData>internal.h</WppScanConfigurationData>
- <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreCompiledHeaderFile>stdAfx.h</PreCompiledHeaderFile>
- <PreCompiledHeader>Use</PreCompiledHeader>
- <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile>
- </ClCompile>
- <Inf Include="WUDFToaster.inx">
- <Architecture>$(InfArch)</Architecture>
- <SpecifyArchitecture>true</SpecifyArchitecture>
- <Verbose>true</Verbose>
- <CopyOutput>.\$(IntDir)\WUDFToaster.inf</CopyOutput>
- </Inf>
- <OtherWpp Include="WUDFToaster.rc; WUDFTOaster.idl">
- <WppEnabled>true</WppEnabled>
- <WppDllMacro>true</WppDllMacro>
- <WppScanConfigurationData>internal.h</WppScanConfigurationData>
- </OtherWpp>
- </ItemGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <TargetName>WUDFToaster</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <TargetName>WUDFToaster</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <TargetName>WUDFToaster</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <TargetName>WUDFToaster</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="!('$(UseDebugLibraries)'=='false')">%(PreprocessorDefinitions);DEBUG</PreprocessorDefinitions>
- <TreatWarningAsError>true</TreatWarningAsError>
- <WarningLevel>Level4</WarningLevel>
- </ClCompile>
- <Midl>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="!('$(UseDebugLibraries)'=='false')">%(PreprocessorDefinitions);DEBUG</PreprocessorDefinitions>
- </Midl>
- <ResourceCompile>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="!('$(UseDebugLibraries)'=='false')">%(PreprocessorDefinitions);DEBUG</PreprocessorDefinitions>
- </ResourceCompile>
- <Link>
- <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
- <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
- </Link>
- <DriverSign>
- <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
- </DriverSign>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="!('$(UseDebugLibraries)'=='false')">%(PreprocessorDefinitions);DEBUG</PreprocessorDefinitions>
- <TreatWarningAsError>true</TreatWarningAsError>
- <WarningLevel>Level4</WarningLevel>
- </ClCompile>
- <Midl>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="!('$(UseDebugLibraries)'=='false')">%(PreprocessorDefinitions);DEBUG</PreprocessorDefinitions>
- </Midl>
- <ResourceCompile>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="!('$(UseDebugLibraries)'=='false')">%(PreprocessorDefinitions);DEBUG</PreprocessorDefinitions>
- </ResourceCompile>
- <Link>
- <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
- <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
- </Link>
- <DriverSign>
- <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
- </DriverSign>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="!('$(UseDebugLibraries)'=='false')">%(PreprocessorDefinitions);DEBUG</PreprocessorDefinitions>
- <TreatWarningAsError>true</TreatWarningAsError>
- <WarningLevel>Level4</WarningLevel>
- </ClCompile>
- <Midl>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="!('$(UseDebugLibraries)'=='false')">%(PreprocessorDefinitions);DEBUG</PreprocessorDefinitions>
- </Midl>
- <ResourceCompile>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="!('$(UseDebugLibraries)'=='false')">%(PreprocessorDefinitions);DEBUG</PreprocessorDefinitions>
- </ResourceCompile>
- <Link>
- <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
- <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
- </Link>
- <DriverSign>
- <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
- </DriverSign>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="!('$(UseDebugLibraries)'=='false')">%(PreprocessorDefinitions);DEBUG</PreprocessorDefinitions>
- <TreatWarningAsError>true</TreatWarningAsError>
- <WarningLevel>Level4</WarningLevel>
- </ClCompile>
- <Midl>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="!('$(UseDebugLibraries)'=='false')">%(PreprocessorDefinitions);DEBUG</PreprocessorDefinitions>
- </Midl>
- <ResourceCompile>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="!('$(UseDebugLibraries)'=='false')">%(PreprocessorDefinitions);DEBUG</PreprocessorDefinitions>
- </ResourceCompile>
- <Link>
- <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
- <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
- </Link>
- <DriverSign>
- <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
- </DriverSign>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.;.\$(IntDir);..\..\inc</AdditionalIncludeDirectories>
- </ResourceCompile>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.;.\$(IntDir);..\..\inc</AdditionalIncludeDirectories>
- <ExceptionHandling>
- </ExceptionHandling>
- </ClCompile>
- <Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.;.\$(IntDir);..\..\inc</AdditionalIncludeDirectories>
- </Midl>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\strsafe.lib;$(SDK_LIB_PATH)\kernel32.lib;$(SDK_LIB_PATH)\ole32.lib;$(SDK_LIB_PATH)\oleaut32.lib;$(SDK_LIB_PATH)\uuid.lib;$(SDK_LIB_PATH)\user32.lib;$(SDK_LIB_PATH)\advapi32.lib</AdditionalDependencies>
- <ModuleDefinitionFile>WUDFToaster.def</ModuleDefinitionFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.;.\$(IntDir);..\..\inc</AdditionalIncludeDirectories>
- </ResourceCompile>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.;.\$(IntDir);..\..\inc</AdditionalIncludeDirectories>
- <ExceptionHandling>
- </ExceptionHandling>
- </ClCompile>
- <Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.;.\$(IntDir);..\..\inc</AdditionalIncludeDirectories>
- </Midl>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\strsafe.lib;$(SDK_LIB_PATH)\kernel32.lib;$(SDK_LIB_PATH)\ole32.lib;$(SDK_LIB_PATH)\oleaut32.lib;$(SDK_LIB_PATH)\uuid.lib;$(SDK_LIB_PATH)\user32.lib;$(SDK_LIB_PATH)\advapi32.lib</AdditionalDependencies>
- <ModuleDefinitionFile>WUDFToaster.def</ModuleDefinitionFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.;.\$(IntDir);..\..\inc</AdditionalIncludeDirectories>
- </ResourceCompile>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.;.\$(IntDir);..\..\inc</AdditionalIncludeDirectories>
- <ExceptionHandling>
- </ExceptionHandling>
- </ClCompile>
- <Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.;.\$(IntDir);..\..\inc</AdditionalIncludeDirectories>
- </Midl>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\strsafe.lib;$(SDK_LIB_PATH)\kernel32.lib;$(SDK_LIB_PATH)\ole32.lib;$(SDK_LIB_PATH)\oleaut32.lib;$(SDK_LIB_PATH)\uuid.lib;$(SDK_LIB_PATH)\user32.lib;$(SDK_LIB_PATH)\advapi32.lib</AdditionalDependencies>
- <ModuleDefinitionFile>WUDFToaster.def</ModuleDefinitionFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.;.\$(IntDir);..\..\inc</AdditionalIncludeDirectories>
- </ResourceCompile>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.;.\$(IntDir);..\..\inc</AdditionalIncludeDirectories>
- <ExceptionHandling>
- </ExceptionHandling>
- </ClCompile>
- <Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.;.\$(IntDir);..\..\inc</AdditionalIncludeDirectories>
- </Midl>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\strsafe.lib;$(SDK_LIB_PATH)\kernel32.lib;$(SDK_LIB_PATH)\ole32.lib;$(SDK_LIB_PATH)\oleaut32.lib;$(SDK_LIB_PATH)\uuid.lib;$(SDK_LIB_PATH)\user32.lib;$(SDK_LIB_PATH)\advapi32.lib</AdditionalDependencies>
- <ModuleDefinitionFile>WUDFToaster.def</ModuleDefinitionFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="stdAfxsrc.cpp">
- <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreCompiledHeaderFile>stdAfx.h</PreCompiledHeaderFile>
- <PreCompiledHeader>Create</PreCompiledHeader>
- <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile>
- </ClCompile>
- <Midl Include="WUDFTOaster.idl" />
- <ResourceCompile Include="WUDFToaster.rc" />
- </ItemGroup>
- <ItemGroup>
- <Inf Exclude="@(Inf)" Include="*.inf" />
- <FilesToPackage Include="$(TargetPath)" Condition="'$(ConfigurationType)'=='Driver' or '$(ConfigurationType)'=='DynamicLibrary'" />
- </ItemGroup>
- <ItemGroup>
- <None Exclude="@(None)" Include="*.txt;*.htm;*.html" />
- <None Exclude="@(None)" Include="*.ico;*.cur;*.bmp;*.dlg;*.rct;*.gif;*.jpg;*.jpeg;*.wav;*.jpe;*.tiff;*.tif;*.png;*.rc2" />
- <None Exclude="@(None)" Include="*.def;*.bat;*.hpj;*.asmx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
diff --git a/general/toaster/toastDrv/umdf/func/WUDFToaster.vcxproj.Filters b/general/toaster/toastDrv/umdf/func/WUDFToaster.vcxproj.Filters
deleted file mode 100644
index b64202cf..00000000
--- a/general/toaster/toastDrv/umdf/func/WUDFToaster.vcxproj.Filters
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{9ACEB224-90E2-40F2-838C-9F279873D314}</UniqueIdentifier>
- </Filter>
- <Filter Include="Header Files">
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{150AE92E-5F8C-4B90-B7BE-352ECA0434CD}</UniqueIdentifier>
- </Filter>
- <Filter Include="Resource Files">
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{BBE5A5E9-E1F7-47E7-91B7-111A3D0BAE2A}</UniqueIdentifier>
- </Filter>
- <Filter Include="Driver Files">
- <Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{CCF62242-AF1C-424F-942F-E11D79A0EF79}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include=".\Debug\\WUDFToaster_i.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Device.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Driver.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Queue.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="stdAfxsrc.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="WUDFToaster.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <Midl Include="WUDFTOaster.idl">
- <Filter>Source Files</Filter>
- </Midl>
- <None Include="WUDFToaster.def">
- <Filter>Source Files</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="WUDFToaster.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/general/toaster/toastDrv/umdf/func/internal.h b/general/toaster/toastDrv/umdf/func/internal.h
deleted file mode 100644
index 1a098a19..00000000
--- a/general/toaster/toastDrv/umdf/func/internal.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*++
-
-Copyright (C) Microsoft Corporation, All Rights Reserved
-
-Module Name:
-
- Internal.h
-
-Abstract:
-
- This module contains the local type definitions for the UMDF Toaster
- driver sample.
-
-Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-#pragma once
-
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
-#endif
-
-//
-// Include the WUDF DDI
-//
-
-#include "wudfddi.h"
-
-//
-// Use specstrings for in/out annotation of function parameters.
-//
-
-#include "specstrings.h"
-
-//
-// Forward definitions of classes in the other header files.
-//
-
-typedef class CDriver *PCDriver;
-typedef class CDevice *PCDevice;
-typedef class CQueue *PCQueue;
-
-//
-// Define the tracing flags.
-//
-// TODO: Choose a different trace control GUID
-//
-
-#define WPP_CONTROL_GUIDS \
- WPP_DEFINE_CONTROL_GUID( \
- MyDriverTraceControl, (9B6DE419,5658,46c9,A358,54FDEBB6B89D), \
- \
- WPP_DEFINE_BIT(MYDRIVER_ALL_INFO) \
- )
-
-#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)
-
-//
-// 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, ...);
-// end_wpp
-//
-
-//
-// Driver specific #defines
-//
-// TODO: Change these values to be appropriate for your driver.
-//
-
-#define MYDRIVER_TRACING_ID L"Microsoft\\WUDF\\Toaster"
-#define MYDRIVER_CLASS_ID {0x7ab7dcf5, 0xd1d4, 0x4085, {0x95, 0x47, 0x1d, 0xb9, 0x68, 0xcc, 0xa7, 0x20}}
-
-//
-// Include the type specific headers.
-//
-
-#include "driver.h"
-#include "device.h"
-#include "queue.h"
-
-__forceinline
-#ifdef _PREFAST_
-__declspec(noreturn)
-#endif
-VOID
-WdfTestNoReturn(
- VOID
- )
-{
- // do nothing.
-}
-
-#define WUDF_TEST_DRIVER_ASSERT(p) \
-{ \
- if ( !(p) ) \
- { \
- DebugBreak(); \
- WdfTestNoReturn(); \
- } \
-}
-
-
-
diff --git a/general/toaster/toastDrv/umdf/func/resource.h b/general/toaster/toastDrv/umdf/func/resource.h
deleted file mode 100644
index 800c5a81..00000000
--- a/general/toaster/toastDrv/umdf/func/resource.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#define IDS_PROJNAME 100
-#define IDR_TOASTERDRIVER 101
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 201
-#define _APS_NEXT_COMMAND_VALUE 32768
-#define _APS_NEXT_CONTROL_VALUE 201
-#define _APS_NEXT_SYMED_VALUE 105
-#endif
-#endif
diff --git a/general/toaster/toastDrv/umdf/func/stdAfxsrc.cpp b/general/toaster/toastDrv/umdf/func/stdAfxsrc.cpp
deleted file mode 100644
index 15f34744..00000000
--- a/general/toaster/toastDrv/umdf/func/stdAfxsrc.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "stdAfx.h" \ No newline at end of file
diff --git a/general/toaster/toastDrv/umdf/func/stdafx.cpp b/general/toaster/toastDrv/umdf/func/stdafx.cpp
deleted file mode 100644
index 16521f2a..00000000
--- a/general/toaster/toastDrv/umdf/func/stdafx.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-/*++
-
- Copyright (c) Microsoft Corporation, All Rights Reserved
-
- Module Name:
-
- stdafx.cpp
-
- Abstract:
-
- This is used to build the precompiled header.
-
- Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-
-#include "stdafx.h"
-
-#include "initguid.h"
-
-DEFINE_GUID (GUID_DEVINTERFACE_TOASTER,
- 0x781EF630, 0x72B2, 0x11d2, 0xB8, 0x52, 0x00, 0xC0, 0x4F, 0xAD, 0x51, 0x71);
-//{781EF630-72B2-11d2-B852-00C04FAD5171}
-
diff --git a/general/toaster/toastDrv/umdf/func/stdafx.h b/general/toaster/toastDrv/umdf/func/stdafx.h
deleted file mode 100644
index 7e432496..00000000
--- a/general/toaster/toastDrv/umdf/func/stdafx.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*++
-
- Copyright (c) Microsoft Corporation, All Rights Reserved
-
- Module Name:
-
- stdafx.h
-
- Abstract:
-
- Include file for standard system include filesor project specific
- include files that are used frequently, but are changed infrequently
-
- Environment:
-
- Windows User-Mode Driver Framework (WUDF)
-
---*/
-
-
-#pragma once
-
-#ifndef STRICT
-#define STRICT
-#endif
-
-
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501 // Windows XP and newer.
-#endif
-
-#define _ATL_FREE_THREADED
-#define _ATL_NO_AUTOMATIC_NAMESPACE
-
-// turns off ATL's hiding of some common and often safely ignored warning messages
-#define _ATL_ALL_WARNINGS
-
-#define SAFE_RELEASE(p) {if ((p)) { (p)->Release(); (p) = NULL; }}
-
-#include "resource.h"
-#include <atlbase.h>
-#include <atlcom.h>
-
-extern const GUID GUID_DEVINTERFACE_TOASTER;
-
-using namespace ATL;
-