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.

133 lines
4.3 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 LPDIRECTSOUND8
  14. #ifndef _DSOUNDOBJ_H_
  15. #define _DSOUNDOBJ_H_
  16. #ifndef Hwnd
  17. #define HWnd long
  18. #endif
  19. /////////////////////////////////////////////////////////////////////////////
  20. // Direct
  21. //REVIEW -- using pointers to ID's is necessary because some compilers don't like
  22. //references as template arguments.
  23. class C_dxj_DirectSoundObject :
  24. #ifdef USING_IDISPATCH
  25. public CComDualImpl<I_dxj_DirectSound, &IID_I_dxj_DirectSound, &LIBID_DIRECTLib>,
  26. public ISupportErrorInfo,
  27. #else
  28. public I_dxj_DirectSound,
  29. #endif
  30. //public CComCoClass<C_dxj_DirectSoundObject, &CLSID__dxj_DirectSound>,
  31. public CComObjectRoot
  32. {
  33. public:
  34. C_dxj_DirectSoundObject() ;
  35. virtual ~C_dxj_DirectSoundObject() ;
  36. BEGIN_COM_MAP(C_dxj_DirectSoundObject)
  37. COM_INTERFACE_ENTRY(I_dxj_DirectSound)
  38. #ifdef USING_IDISPATCH
  39. COM_INTERFACE_ENTRY(IDispatch)
  40. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  41. #endif
  42. END_COM_MAP()
  43. // DECLARE_REGISTRY(CLSID__dxj_DirectSound, "DIRECT.DirectSound.3", "DIRECT.DirectSound.3", IDS_DSOUND_DESC, THREADFLAGS_BOTH)
  44. // Use DECLARE_NOT_AGGREGATABLE(C_dxj_DirectSoundObject) if you don't want your object
  45. // to support aggregation
  46. DECLARE_AGGREGATABLE(C_dxj_DirectSoundObject)
  47. #ifdef USING_IDISPATCH
  48. // ISupportsErrorInfo
  49. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  50. #endif
  51. // I_dxj_DirectSoundBuffer
  52. public:
  53. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  54. /* [in] */ IUnknown __RPC_FAR *lpdd);
  55. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  56. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  57. HRESULT STDMETHODCALLTYPE createSoundBuffer(
  58. /* [in] */ DSBUFFERDESC_CDESC __RPC_FAR *bufferDesc,
  59. /* [retval][out] */ I_dxj_DirectSoundBuffer __RPC_FAR *__RPC_FAR *soundBuffer);
  60. HRESULT STDMETHODCALLTYPE createSoundBufferFromFile(
  61. /* [in] */ BSTR fileName,
  62. /* [out][in] */ DSBUFFERDESC_CDESC __RPC_FAR *bufferDesc,
  63. /* [retval][out] */ I_dxj_DirectSoundBuffer __RPC_FAR *__RPC_FAR *soundBuffer);
  64. HRESULT STDMETHODCALLTYPE createSoundBufferFromResource(
  65. /* [in] */ BSTR resourceFile,
  66. /* [in] */ BSTR resourceName,
  67. /* [out][in] */ DSBUFFERDESC_CDESC __RPC_FAR *bufferDesc,
  68. /* [retval][out] */ I_dxj_DirectSoundBuffer __RPC_FAR *__RPC_FAR *soundBuffer);
  69. HRESULT STDMETHODCALLTYPE getCaps(
  70. /* [out][in] */ DSCAPS_CDESC __RPC_FAR *caps);
  71. HRESULT STDMETHODCALLTYPE duplicateSoundBuffer(
  72. /* [in] */ I_dxj_DirectSoundBuffer __RPC_FAR *original,
  73. /* [retval][out] */ I_dxj_DirectSoundBuffer __RPC_FAR *__RPC_FAR *duplicate);
  74. HRESULT STDMETHODCALLTYPE setCooperativeLevel(
  75. #ifdef _WIN64
  76. /* [in] */ HWND hwnd,
  77. #else
  78. /* [in] */ LONG hwnd,
  79. #endif
  80. /* [in] */ long level);
  81. HRESULT STDMETHODCALLTYPE getSpeakerConfig(
  82. /* [retval][out] */ long __RPC_FAR *speakerConfig);
  83. HRESULT STDMETHODCALLTYPE setSpeakerConfig(
  84. /* [in] */ long speakerConfig);
  85. HRESULT STDMETHODCALLTYPE CreatePrimarySoundBuffer(
  86. /* [in] */ DSBUFFERDESC_CDESC __RPC_FAR *bufferDesc,
  87. /* [retval][out] */ I_dxj_DirectSoundPrimaryBuffer __RPC_FAR *__RPC_FAR *soundBuffer);
  88. #if 0
  89. HRESULT STDMETHODCALLTYPE AllocSink(
  90. long lBusCount, WAVEFORMATEX_CDESC __RPC_FAR *format,
  91. I_dxj_DirectSoundSink __RPC_FAR *__RPC_FAR *ret);
  92. #endif
  93. ////////////////////////////////////////////////////////////////////////////////////
  94. //
  95. private:
  96. DECL_VARIABLE(_dxj_DirectSound);
  97. GUID *m_pDriverGuid;
  98. public:
  99. DX3J_GLOBAL_LINKS( _dxj_DirectSound )
  100. };
  101. #endif