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.

114 lines
3.8 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: dsoundobj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // dSoundObj.h : Declaration of the C_dxj_DirectSoundObject
  11. // DHF_DS entire file
  12. #include "resource.h" // main symbols
  13. #define typedef__dxj_DirectSound LPDIRECTSOUND
  14. /////////////////////////////////////////////////////////////////////////////
  15. // Direct
  16. //REVIEW -- using pointers to ID's is necessary because some compilers don't like
  17. //references as template arguments.
  18. class C_dxj_DirectSoundObject :
  19. #ifdef USING_IDISPATCH
  20. public CComDualImpl<I_dxj_DirectSound, &IID_I_dxj_DirectSound, &LIBID_DIRECTLib>,
  21. public ISupportErrorInfo,
  22. #else
  23. public I_dxj_DirectSound,
  24. #endif
  25. //public CComCoClass<C_dxj_DirectSoundObject, &CLSID__dxj_DirectSound>,
  26. public CComObjectRoot
  27. {
  28. public:
  29. C_dxj_DirectSoundObject() ;
  30. virtual ~C_dxj_DirectSoundObject() ;
  31. BEGIN_COM_MAP(C_dxj_DirectSoundObject)
  32. COM_INTERFACE_ENTRY(I_dxj_DirectSound)
  33. #ifdef USING_IDISPATCH
  34. COM_INTERFACE_ENTRY(IDispatch)
  35. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  36. #endif
  37. END_COM_MAP()
  38. // DECLARE_REGISTRY(CLSID__dxj_DirectSound, "DIRECT.DirectSound.3", "DIRECT.DirectSound.3", IDS_DSOUND_DESC, THREADFLAGS_BOTH)
  39. // Use DECLARE_NOT_AGGREGATABLE(C_dxj_DirectSoundObject) if you don't want your object
  40. // to support aggregation
  41. DECLARE_AGGREGATABLE(C_dxj_DirectSoundObject)
  42. #ifdef USING_IDISPATCH
  43. // ISupportsErrorInfo
  44. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  45. #endif
  46. // I_dxj_DirectSoundBuffer
  47. public:
  48. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  49. /* [in] */ IUnknown __RPC_FAR *lpdd);
  50. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  51. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  52. HRESULT STDMETHODCALLTYPE createSoundBuffer(
  53. /* [in] */ DSBufferDesc __RPC_FAR *bufferDesc,
  54. /* [in] */ WaveFormatex __RPC_FAR *format,
  55. /* [retval][out] */ I_dxj_DirectSoundBuffer __RPC_FAR *__RPC_FAR *soundBuffer);
  56. HRESULT STDMETHODCALLTYPE createSoundBufferFromFile(
  57. /* [in] */ BSTR fileName,
  58. /* [out][in] */ DSBufferDesc __RPC_FAR *bufferDesc,
  59. /* [out] */ WaveFormatex __RPC_FAR *format,
  60. /* [retval][out] */ I_dxj_DirectSoundBuffer __RPC_FAR *__RPC_FAR *soundBuffer);
  61. HRESULT STDMETHODCALLTYPE createSoundBufferFromResource(
  62. /* [in] */ BSTR resourceFile,
  63. /* [in] */ BSTR resourceName,
  64. /* [out][in] */ DSBufferDesc __RPC_FAR *bufferDesc,
  65. /* [out] */ WaveFormatex __RPC_FAR *format,
  66. /* [retval][out] */ I_dxj_DirectSoundBuffer __RPC_FAR *__RPC_FAR *soundBuffer);
  67. HRESULT STDMETHODCALLTYPE getCaps(
  68. /* [out][in] */ DSCaps __RPC_FAR *caps);
  69. HRESULT STDMETHODCALLTYPE duplicateSoundBuffer(
  70. /* [in] */ I_dxj_DirectSoundBuffer __RPC_FAR *original,
  71. /* [retval][out] */ I_dxj_DirectSoundBuffer __RPC_FAR *__RPC_FAR *duplicate);
  72. HRESULT STDMETHODCALLTYPE setCooperativeLevel(
  73. /* [in] */ HWnd hwnd,
  74. /* [in] */ long level);
  75. HRESULT STDMETHODCALLTYPE getSpeakerConfig(
  76. /* [retval][out] */ long __RPC_FAR *speakerConfig);
  77. HRESULT STDMETHODCALLTYPE setSpeakerConfig(
  78. /* [in] */ long speakerConfig);
  79. ////////////////////////////////////////////////////////////////////////////////////
  80. //
  81. private:
  82. DECL_VARIABLE(_dxj_DirectSound);
  83. GUID *m_pDriverGuid;
  84. public:
  85. DX3J_GLOBAL_LINKS( _dxj_DirectSound )
  86. };