based on Fabio Ottavi's UMDF Driver for a Virtual Smart Card Reader, see http://www.codeproject.com/Articles/134010/An-UMDF-Driver-for-a-Virtual-Smart-Card-Reader
38 lines
860 B
C++
38 lines
860 B
C++
|
|
#pragma once
|
|
|
|
class ATL_NO_VTABLE CMyQueue :
|
|
public CComObjectRootEx<CComMultiThreadModel>,
|
|
public IQueueCallbackDeviceIoControl
|
|
{
|
|
public:
|
|
virtual ~CMyQueue();
|
|
|
|
DECLARE_NOT_AGGREGATABLE(CMyQueue)
|
|
|
|
BEGIN_COM_MAP(CMyQueue)
|
|
COM_INTERFACE_ENTRY(IQueueCallbackDeviceIoControl)
|
|
END_COM_MAP()
|
|
|
|
static HRESULT CreateInstance(__in IWDFDevice* pWdfDevice, CMyDevice* pMyDevice);
|
|
|
|
protected:
|
|
CMyQueue();
|
|
|
|
// COM Interface methods
|
|
public:
|
|
int state;
|
|
// IQueueCallbackDeviceIoControl
|
|
STDMETHOD_ (void, OnDeviceIoControl)(
|
|
__in IWDFIoQueue* pQueue,
|
|
__in IWDFIoRequest* pRequest,
|
|
__in ULONG ControlCode,
|
|
SIZE_T InputBufferSizeInBytes,
|
|
SIZE_T OutputBufferSizeInBytes
|
|
);
|
|
|
|
private:
|
|
CMyDevice* m_pParentDevice; // Parent device object
|
|
};
|
|
|