From 24f280dc4a700f00f5fbb8f13815b941620adb8e Mon Sep 17 00:00:00 2001 From: zlockard Date: Wed, 31 Jan 2024 13:45:54 -0800 Subject: Fixes for sample build errors and updates to the execution script to use new build flags (#1078) * Fixes for sample build errors * Fix additional sample * Add additional sample * Updated comments in Build-Sample.ps1 * Adjusting exclusions.csv to be accurate for GE. Still issues for NI that we need to understand better * Merge from develop branch * Merge from develop branch * Merge from develop branch * Delete WPD samples * Separate infverif additional options for old vs new WDK * Delete WPD samples entry in our CODEOWNERS file * Fix spelling error * For 22621 WDK Remove the /samples flag --------- Co-authored-by: Zac Lockard Co-authored-by: Jakob Lichtenberg (170957) --- wpd/WpdServiceSampleDriver/Device.h | 91 ------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 wpd/WpdServiceSampleDriver/Device.h (limited to 'wpd/WpdServiceSampleDriver/Device.h') diff --git a/wpd/WpdServiceSampleDriver/Device.h b/wpd/WpdServiceSampleDriver/Device.h deleted file mode 100644 index cf7fdc03..00000000 --- a/wpd/WpdServiceSampleDriver/Device.h +++ /dev/null @@ -1,91 +0,0 @@ -#pragma once - -#include "resource.h" -#include "WpdServiceSampleDriver.h" - -class ATL_NO_VTABLE CDevice : - public CComObjectRootEx, - public IPnpCallback, - public IPnpCallbackSelfManagedIo, - public IPnpCallbackHardware -{ -public: - CDevice() : - m_pWpdBaseDriver(NULL) - { - } - - DECLARE_NOT_AGGREGATABLE(CDevice) - - BEGIN_COM_MAP(CDevice) - COM_INTERFACE_ENTRY(IPnpCallback) - COM_INTERFACE_ENTRY(IPnpCallbackSelfManagedIo) - COM_INTERFACE_ENTRY(IPnpCallbackHardware) - END_COM_MAP() - -public: - static HRESULT - CreateInstance( - _In_ IWDFDeviceInitialize* pDeviceInit, - _In_ WpdBaseDriver* pWpdBaseDriver, - _COM_Outptr_ IUnknown** ppUnkwn) - { - *ppUnkwn = NULL; - - // - // Set device properties. - // - pDeviceInit->SetLockingConstraint(None); - - CComObject< CDevice> *pMyDevice = NULL; - HRESULT hr = CComObject::CreateInstance( &pMyDevice ); - if( SUCCEEDED (hr) ) - { - pMyDevice->AddRef(); - hr = pMyDevice->QueryInterface( __uuidof(IUnknown),(void **) ppUnkwn); - if (hr == S_OK) - { - pMyDevice->m_pWpdBaseDriver = pWpdBaseDriver; - } - pMyDevice->Release(); - pMyDevice = NULL; - } - - return hr; - } - - // IPnpCallback - // - STDMETHOD_(HRESULT, OnD0Entry) (_In_ IWDFDevice* pDevice, WDF_POWER_DEVICE_STATE previousState); - STDMETHOD_(HRESULT, OnD0Exit) (_In_ IWDFDevice* pDevice, WDF_POWER_DEVICE_STATE newState); - STDMETHOD_(VOID, OnSurpriseRemoval)(_In_ IWDFDevice* pDevice); - STDMETHOD_(HRESULT, OnQueryRemove) (_In_ IWDFDevice* pDevice); - STDMETHOD_(HRESULT, OnQueryStop) (_In_ IWDFDevice* pDevice); - - // IPnpCallbackSelfManagedIo - // - STDMETHOD_(VOID, OnSelfManagedIoCleanup)(_In_ IWDFDevice* pDevice); - STDMETHOD_(VOID, OnSelfManagedIoFlush) (_In_ IWDFDevice* pDevice); - STDMETHOD_(HRESULT, OnSelfManagedIoInit) (_In_ IWDFDevice* pDevice); - STDMETHOD_(HRESULT, OnSelfManagedIoSuspend) (_In_ IWDFDevice* pDevice); - STDMETHOD_(HRESULT, OnSelfManagedIoRestart) (_In_ IWDFDevice* pDevice); - STDMETHOD_(HRESULT, OnSelfManagedIoStop) (_In_ IWDFDevice* pDevice); - - // IPnpCallbackHardware - // - STDMETHOD_(HRESULT, OnPrepareHardware)(_In_ IWDFDevice* pDevice); - STDMETHOD_(HRESULT, OnReleaseHardware)(_In_ IWDFDevice* pDevice); - -private: - HRESULT GetSupportedContentTypes( - _Outptr_ IPortableDevicePropVariantCollection** ppContentTypes); - - HRESULT GetDeviceFriendlyName( - _Outptr_ LPWSTR* pwszDeviceFriendlyName); - -private: - - WpdBaseDriver* m_pWpdBaseDriver; - CComPtr m_pPortableDeviceClassExtension; -}; - -- cgit v1.3.1