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.

84 lines
2.8 KiB

  1. #pragma once
  2. class CDevice:
  3. public CComObjectRoot,
  4. public IMDSPDevice2,
  5. public ISpecifyPropertyPagesImpl<CDevice>
  6. {
  7. public:
  8. BEGIN_COM_MAP(CDevice)
  9. COM_INTERFACE_ENTRY2(IMDSPDevice, IMDSPDevice2)
  10. COM_INTERFACE_ENTRY(IMDSPDevice2)
  11. COM_INTERFACE_ENTRY(ISpecifyPropertyPages)
  12. END_COM_MAP()
  13. //
  14. // Construction/Destruction
  15. //
  16. CDevice();
  17. virtual ~CDevice();
  18. HRESULT Init( LPCWSTR pszInitPath );
  19. BEGIN_PROP_MAP(CDevice)
  20. PROP_PAGE(__uuidof(FavoritesPropPage) )
  21. END_PROP_MAP()
  22. public:
  23. //
  24. // IMDSPDevice
  25. //
  26. STDMETHOD( GetName )( LPWSTR pwszName, UINT nMaxChars);
  27. STDMETHOD( GetManufacturer )( LPWSTR pwszName, UINT nMaxChars);
  28. STDMETHOD( GetVersion ) ( DWORD *pdwVersion );
  29. STDMETHOD( GetType ) ( DWORD *pdwType );
  30. STDMETHOD( GetSerialNumber ) ( PWMDMID pSerialNumber, BYTE abMac[WMDM_MAC_LENGTH] );
  31. STDMETHOD( GetPowerSource ) ( DWORD *pdwPowerSource, DWORD *pdwPercentRemaining);
  32. STDMETHOD( GetStatus ) ( DWORD *pdwStatus );
  33. STDMETHOD( GetDeviceIcon )( ULONG *hIcon );
  34. STDMETHOD( EnumStorage )( IMDSPEnumStorage **ppEnumStorage );
  35. STDMETHOD( GetFormatSupport ) ( _WAVEFORMATEX **pFormatEx,
  36. UINT *pnFormatCount,
  37. LPWSTR **pppwszMimeType,
  38. UINT *pnMimeTypeCount);
  39. STDMETHOD( SendOpaqueCommand )( OPAQUECOMMAND *pCommand );
  40. //
  41. // IMDSPDevice2
  42. //
  43. STDMETHOD( GetStorage )( LPCWSTR pszStorageName, IMDSPStorage** ppStorage );
  44. STDMETHOD( GetFormatSupport2 )( DWORD dwFlags,
  45. _WAVEFORMATEX **ppAudioFormatEx,
  46. UINT *pnAudioFormatCount,
  47. _VIDEOINFOHEADER **ppVideoFormatEx,
  48. UINT *pnVideoFormatCount,
  49. WMFILECAPABILITIES **ppFileType,
  50. UINT *pnFileTypeCount);
  51. STDMETHOD ( GetSpecifyPropertyPages )( ISpecifyPropertyPages** ppSpecifyPropPages,
  52. IUnknown*** pppUnknowns,
  53. ULONG *pcUnks );
  54. STDMETHOD(GetPnPName)( LPWSTR pwszPnPName, UINT nMaxChars );
  55. //
  56. // Attributes
  57. //
  58. private:
  59. STDMETHOD(GetCEPlayerVersion)(DWORD *pdwVersion);
  60. STDMETHOD(InternalGetFormatSupport)( _WAVEFORMATEX **pFormatEx,
  61. UINT *pnFormatCount,
  62. LPWSTR **pppwszMimeType,
  63. UINT *pnMimeTypeCount);
  64. protected:
  65. LPWSTR m_pszInitPath;
  66. BOOL m_fAllowVideo;
  67. };
  68. typedef CComObject<CDevice> CComDevice;