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.

75 lines
2.8 KiB

  1. // MDSPDevice.h : Declaration of the CMDSPDevice
  2. #ifndef __MDSPDEVICE_H_
  3. #define __MDSPDEVICE_H_
  4. #include "resource.h" // main symbols
  5. /////////////////////////////////////////////////////////////////////////////
  6. // CMDSPDevice
  7. class ATL_NO_VTABLE CMDSPDevice :
  8. public CComObjectRootEx<CComSingleThreadModel>,
  9. public CComCoClass<CMDSPDevice, &CLSID_MDSPDevice>,
  10. public IMDSPDevice2, IMDSPDeviceControl
  11. {
  12. public:
  13. CMDSPDevice();
  14. ~CMDSPDevice();
  15. DECLARE_REGISTRY_RESOURCEID(IDR_MDSPDEVICE)
  16. BEGIN_COM_MAP(CMDSPDevice)
  17. COM_INTERFACE_ENTRY(IMDSPDevice)
  18. COM_INTERFACE_ENTRY(IMDSPDevice2)
  19. COM_INTERFACE_ENTRY(IMDSPDeviceControl)
  20. END_COM_MAP()
  21. // IMDSPDevice
  22. public:
  23. HRESULT InitGlobalDeviceInfo();
  24. WCHAR m_wcsName[MAX_PATH];
  25. STDMETHOD(EnumStorage)(/*[out]*/ IMDSPEnumStorage **ppEnumStorage);
  26. STDMETHOD(GetFormatSupport)(_WAVEFORMATEX **pFormatEx,
  27. UINT *pnFormatCount,
  28. LPWSTR **pppwszMimeType,
  29. UINT *pnMimeTypeCount);
  30. STDMETHOD(GetDeviceIcon)(/*[out]*/ ULONG *hIcon);
  31. STDMETHOD(GetStatus)(/*[out]*/ DWORD *pdwStatus);
  32. STDMETHOD(GetPowerSource)(/*[out]*/ DWORD *pdwPowerSource, /*[out]*/ DWORD *pdwPercentRemaining);
  33. STDMETHOD(GetSerialNumber)(/*[out]*/ PWMDMID pSerialNumber, /*[in, out]*/BYTE abMac[WMDM_MAC_LENGTH]);
  34. STDMETHOD(GetType)(/*[out]*/ DWORD *pdwType);
  35. STDMETHOD(GetVersion)(/*[out]*/ DWORD *pdwVersion);
  36. STDMETHOD(GetManufacturer)(/*[out,string,size_is(nMaxChars)]*/ LPWSTR pwszName, /*[in]*/ UINT nMaxChars);
  37. STDMETHOD(GetName)(/*[out,string,size_is(nMaxChars)]*/ LPWSTR pwszName, /*[in]*/ UINT nMaxChars);
  38. STDMETHOD(SendOpaqueCommand)(OPAQUECOMMAND *pCommand);
  39. // IMDSPDevice2
  40. STDMETHOD(GetStorage)( LPCWSTR pszStorageName, IMDSPStorage** ppStorage );
  41. STDMETHOD(GetFormatSupport2)( DWORD dwFlags,
  42. _WAVEFORMATEX** ppAudioFormatEx,
  43. UINT* pnAudioFormatCount,
  44. _VIDEOINFOHEADER** ppVideoFormatEx,
  45. UINT *pnVideoFormatCount,
  46. WMFILECAPABILITIES** ppFileType,
  47. UINT* pnFileTypeCount );
  48. STDMETHOD(GetSpecifyPropertyPages)( ISpecifyPropertyPages** ppSpecifyPropPages,
  49. IUnknown*** pppUnknowns,
  50. ULONG* pcUnks );
  51. STDMETHOD(GetPnPName)( LPWSTR pwszPnPName, UINT nMaxChars );
  52. // IMDSPDeviceControl
  53. STDMETHOD(GetDCStatus)(/*[out]*/ DWORD *pdwStatus);
  54. STDMETHOD(GetCapabilities)(/*[out]*/ DWORD *pdwCapabilitiesMask);
  55. STDMETHOD(Play)();
  56. STDMETHOD(Record)(/*[in]*/ _WAVEFORMATEX *pFormat);
  57. STDMETHOD(Pause)();
  58. STDMETHOD(Resume)();
  59. STDMETHOD(Stop)();
  60. STDMETHOD(Seek)(/*[in]*/ UINT fuMode, /*[in]*/ int nOffset);
  61. };
  62. #endif //__MDSPDEVICE_H_