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.

145 lines
4.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: dsoundbufferobj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // dSoundBufferObj.h : Declaration of the C_dxj_DirectSoundBufferObject
  11. // DHF_DS entire file
  12. #include "resource.h" // main symbols
  13. #define typedef__dxj_DirectSoundBuffer LPDIRECTSOUNDBUFFER
  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_DirectSoundBufferObject :
  19. #ifdef USING_IDISPATCH
  20. public CComDualImpl<I_dxj_DirectSoundBuffer, &IID_I_dxj_DirectSoundBuffer, &LIBID_DIRECTLib>,
  21. public ISupportErrorInfo,
  22. #else
  23. public I_dxj_DirectSoundBuffer,
  24. #endif
  25. //public CComCoClass<C_dxj_DirectSoundBufferObject, &CLSID__dxj_DirectSoundBuffer>,
  26. public CComObjectRoot
  27. {
  28. public:
  29. C_dxj_DirectSoundBufferObject() ;
  30. virtual ~C_dxj_DirectSoundBufferObject() ;
  31. BEGIN_COM_MAP(C_dxj_DirectSoundBufferObject)
  32. COM_INTERFACE_ENTRY(I_dxj_DirectSoundBuffer)
  33. #ifdef USING_IDISPATCH
  34. COM_INTERFACE_ENTRY(IDispatch)
  35. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  36. #endif
  37. END_COM_MAP()
  38. //y DECLARE_REGISTRY(CLSID__dxj_DirectSoundBuffer, "DIRECT.DirectSoundBuffer.3", "DIRECT.DirectSoundBuffer.3", IDS_DSOUNDBUFFER_DESC, THREADFLAGS_BOTH)
  39. // Use DECLARE_NOT_AGGREGATABLE(C_dxj_DirectSoundBufferObject) if you don't want your object
  40. // to support aggregation
  41. DECLARE_AGGREGATABLE(C_dxj_DirectSoundBufferObject)
  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 getDirectSound3dListener(
  53. /* [retval][out] */ I_dxj_DirectSound3dListener __RPC_FAR *__RPC_FAR *lpdsl);
  54. HRESULT STDMETHODCALLTYPE getDirectSound3dBuffer(
  55. /* [retval][out] */ I_dxj_DirectSound3dBuffer __RPC_FAR *__RPC_FAR *lpdsb);
  56. HRESULT STDMETHODCALLTYPE getCaps(
  57. /* [out][in] */ DSBCaps __RPC_FAR *caps);
  58. HRESULT STDMETHODCALLTYPE getCurrentPosition(
  59. /* [out] */ DSCursors __RPC_FAR *cursors);
  60. HRESULT STDMETHODCALLTYPE getFormat(
  61. /* [out][in] */ WaveFormatex __RPC_FAR *format);
  62. HRESULT STDMETHODCALLTYPE getVolume(
  63. /* [retval][out] */ long __RPC_FAR *volume);
  64. HRESULT STDMETHODCALLTYPE getPan(
  65. /* [retval][out] */ long __RPC_FAR *pan);
  66. HRESULT STDMETHODCALLTYPE getFrequency(
  67. /* [retval][out] */ long __RPC_FAR *frequency);
  68. HRESULT STDMETHODCALLTYPE getStatus(
  69. /* [retval][out] */ long __RPC_FAR *status);
  70. /* [hidden] */ HRESULT STDMETHODCALLTYPE initialize(
  71. /* [in] */ I_dxj_DirectSound __RPC_FAR *directSound,
  72. /* [out][in] */ DSBufferDesc __RPC_FAR *bufferDesc,
  73. /* [out][in] */ byte __RPC_FAR *wbuf);
  74. HRESULT STDMETHODCALLTYPE writeBuffer(
  75. /* [in] */ long start,
  76. /* [in] */ long size,
  77. ///* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *buffer,
  78. void * buf,
  79. /* [in] */ long flags);
  80. HRESULT STDMETHODCALLTYPE readBuffer(
  81. /* [in] */ long start,
  82. /* [in] */ long size,
  83. ///* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *buffer,
  84. void * buf,
  85. /* [in] */ long flags);
  86. HRESULT STDMETHODCALLTYPE play(
  87. /* [in] */ long flags);
  88. HRESULT STDMETHODCALLTYPE setCurrentPosition(
  89. /* [in] */ long newPosition);
  90. HRESULT STDMETHODCALLTYPE setFormat(
  91. /* [in] */ WaveFormatex __RPC_FAR *format);
  92. HRESULT STDMETHODCALLTYPE setVolume(
  93. /* [in] */ long volume);
  94. HRESULT STDMETHODCALLTYPE setPan(
  95. /* [in] */ long pan);
  96. HRESULT STDMETHODCALLTYPE setFrequency(
  97. /* [in] */ long frequency);
  98. HRESULT STDMETHODCALLTYPE stop( void);
  99. HRESULT STDMETHODCALLTYPE restore( void);
  100. HRESULT STDMETHODCALLTYPE setNotificationPositions(long nElements,SAFEARRAY **ppsa);
  101. HRESULT STDMETHODCALLTYPE saveToFile(BSTR b);
  102. private:
  103. DECL_VARIABLE(_dxj_DirectSoundBuffer);
  104. public:
  105. DX3J_GLOBAL_LINKS( _dxj_DirectSoundBuffer )
  106. };