diff options
| author | Adonais Romero González <[email protected]> | 2024-05-06 16:21:31 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-06 16:21:31 -0700 |
| commit | a74a241c664c4e1d7c0838287b34076c19d9858a (patch) | |
| tree | 6ff7562612967b122acf8acf8a69c4dcfd5905db /wpd/WpdBasicHardwareDriver/Queue.h | |
| parent | def8e8e34ed2b7b1deb2fc9112ac4255f1a0f2ba (diff) | |
| parent | 15477ce52bbb6b42ca591ecdfb484cac089f89ab (diff) | |
Merge develop changes prior to upcoming WDK release (May 2024)
Diffstat (limited to 'wpd/WpdBasicHardwareDriver/Queue.h')
| -rw-r--r-- | wpd/WpdBasicHardwareDriver/Queue.h | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/wpd/WpdBasicHardwareDriver/Queue.h b/wpd/WpdBasicHardwareDriver/Queue.h deleted file mode 100644 index e5cea69d..00000000 --- a/wpd/WpdBasicHardwareDriver/Queue.h +++ /dev/null @@ -1,93 +0,0 @@ -// Queue.h : Declaration of the CQueue - -#pragma once -#include "resource.h" // main symbols -#include "WpdBasicHardwareDriver.h" - -class ATL_NO_VTABLE CQueue : - public CComObjectRootEx<CComMultiThreadModel>, - public IQueueCallbackDeviceIoControl, - public IQueueCallbackCreate, - public IObjectCleanup -{ -public: - CQueue() - { - - } - - DECLARE_NOT_AGGREGATABLE(CQueue) - - BEGIN_COM_MAP(CQueue) - COM_INTERFACE_ENTRY(IQueueCallbackDeviceIoControl) - COM_INTERFACE_ENTRY(IQueueCallbackCreate) - END_COM_MAP() - -public: - static - HRESULT CreateInstance( - _COM_Outptr_ IUnknown **ppUkwn) - { - *ppUkwn = NULL; - CComObject< CQueue> *pMyQueue = NULL; - HRESULT hr = CComObject<CQueue>::CreateInstance( &pMyQueue ); - if( SUCCEEDED (hr) ) - { - pMyQueue->AddRef(); - hr = pMyQueue->QueryInterface( __uuidof(IUnknown), (void **) ppUkwn ); - pMyQueue->Release(); - pMyQueue = NULL; - } - - return hr; - } - - // - // Wdf Callbacks - // - - // IQueueCallbackCreateClose - // - STDMETHOD_ (void, OnCreateFile)( - _In_ IWDFIoQueue *pQueue, - _In_ IWDFIoRequest *pRequest, - _In_ IWDFFile *pFileObject - ); - - // - // IQueueCallbackDeviceIoControl - // - STDMETHOD_ (void, OnDeviceIoControl)( - _In_ IWDFIoQueue* pQueue, - _In_ IWDFIoRequest* pRequest, - ULONG ControlCode, - SIZE_T InputBufferSizeInBytes, - SIZE_T OutputBufferSizeInBytes - ); - - // - // IObjectCleanup - // - STDMETHOD_ (void, OnCleanup)( - _In_ IWDFObject* pWdfObject - ); - -private: - HRESULT ProcessWpdMessage( - ULONG ControlCode, - _In_ ContextMap* pClientContextMap, - _In_ IWDFDevice* pDevice, - _In_reads_bytes_(ulInputBufferLength) PVOID pInBuffer, - ULONG ulInputBufferLength, - _Out_writes_bytes_to_(ulOutputBufferLength, *pdwBytesWritten) PVOID pOutBuffer, - ULONG ulOutputBufferLength, - _Out_ DWORD* pdwBytesWritten); - - HRESULT GetWpdBaseDriver( - _In_ IWDFDevice* pDevice, - _Outptr_result_nullonfailure_ WpdBaseDriver** ppWpdBaseDriver); - - CComPtr<IWpdSerializer> m_pWpdSerializer; - CComAutoCriticalSection m_CriticalSection; -}; - |
