Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.4 KiB

  1. #pragma once
  2. #include "resource.h"
  3. #include "dccsink.h"
  4. // {067B4B81-B1EC-489f-B111-940EBDC44EBE}
  5. struct __declspec(uuid("067B4B81-B1EC-489f-B111-940EBDC44EBE")) RapiDevice;
  6. class CRapiDevice :
  7. public CComObjectRootEx<CComMultiThreadModel>,
  8. public CComCoClass<CRapiDevice, &__uuidof(RapiDevice) >,
  9. public IMDServiceProvider,
  10. public IComponentAuthenticate
  11. {
  12. public:
  13. HRESULT FinalConstruct();
  14. void FinalRelease();
  15. public:
  16. DECLARE_REGISTRY_RESOURCEID(IDR_CEWMDM_REG)
  17. BEGIN_COM_MAP(CRapiDevice)
  18. COM_INTERFACE_ENTRY(IMDServiceProvider)
  19. COM_INTERFACE_ENTRY(IComponentAuthenticate)
  20. END_COM_MAP()
  21. public:
  22. //
  23. // IMDServiceProvider
  24. //
  25. STDMETHOD( GetDeviceCount )( DWORD *pdwCount );
  26. STDMETHOD( EnumDevices )( IMDSPEnumDevice ** ppEnumDevice );
  27. //
  28. // IComponentAuthenticate
  29. //
  30. STDMETHOD( SACAuth )( DWORD dwProtocolID,
  31. DWORD dwPass,
  32. BYTE *pbDataIn,
  33. DWORD dwDataInLen,
  34. BYTE **ppbDataOut,
  35. DWORD *pdwDataOutLen);
  36. STDMETHOD( SACGetProtocols )(DWORD **ppdwProtocols,
  37. DWORD *pdwProtocolCount);
  38. protected:
  39. CComDccSink *m_pSink;
  40. CComPtr<IDccManSink> m_spSink;
  41. };
  42. typedef CComObject<CRapiDevice> CComRapiDevice;