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.

129 lines
4.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: dsoundPrimaryBufferobj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // dSoundPrimaryBufferObj.h : Declaration of the C_dxj_DirectSoundPrimaryBufferObject
  11. // DHF_DS entire file
  12. #include "resource.h" // main symbols
  13. #define typedef__dxj_DirectSoundPrimaryBuffer 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_DirectSoundPrimaryBufferObject :
  19. #ifdef USING_IDISPATCH
  20. public CComDualImpl<I_dxj_DirectSoundPrimaryBuffer, &IID_I_dxj_DirectSoundPrimaryBuffer, &LIBID_DIRECTLib>,
  21. public ISupportErrorInfo,
  22. #else
  23. public I_dxj_DirectSoundPrimaryBuffer,
  24. #endif
  25. //public CComCoClass<C_dxj_DirectSoundPrimaryBufferObject, &CLSID__dxj_DirectSoundPrimaryBuffer>,
  26. public CComObjectRoot
  27. {
  28. public:
  29. C_dxj_DirectSoundPrimaryBufferObject() ;
  30. virtual ~C_dxj_DirectSoundPrimaryBufferObject() ;
  31. BEGIN_COM_MAP(C_dxj_DirectSoundPrimaryBufferObject)
  32. COM_INTERFACE_ENTRY(I_dxj_DirectSoundPrimaryBuffer)
  33. #ifdef USING_IDISPATCH
  34. COM_INTERFACE_ENTRY(IDispatch)
  35. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  36. #endif
  37. END_COM_MAP()
  38. // Use DECLARE_NOT_AGGREGATABLE(C_dxj_DirectSoundPrimaryBufferObject) if you don't want your object
  39. // to support aggregation
  40. DECLARE_AGGREGATABLE(C_dxj_DirectSoundPrimaryBufferObject)
  41. #ifdef USING_IDISPATCH
  42. // ISupportsErrorInfo
  43. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  44. #endif
  45. // I_dxj_DirectSoundPrimaryBuffer
  46. public:
  47. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  48. /* [in] */ IUnknown __RPC_FAR *lpdd);
  49. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  50. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  51. HRESULT STDMETHODCALLTYPE getDirectSound3dListener(
  52. /* [retval][out] */ I_dxj_DirectSound3dListener __RPC_FAR *__RPC_FAR *lpdsl);
  53. HRESULT STDMETHODCALLTYPE getCaps(
  54. /* [out][in] */ DSBCAPS_CDESC __RPC_FAR *caps);
  55. HRESULT STDMETHODCALLTYPE getCurrentPosition(
  56. /* [out] */ DSCURSORS_CDESC __RPC_FAR *cursors);
  57. HRESULT STDMETHODCALLTYPE getFormat(
  58. /* [out][in] */ WAVEFORMATEX_CDESC __RPC_FAR *format);
  59. HRESULT STDMETHODCALLTYPE getVolume(
  60. /* [retval][out] */ long __RPC_FAR *volume);
  61. HRESULT STDMETHODCALLTYPE getPan(
  62. /* [retval][out] */ long __RPC_FAR *pan);
  63. HRESULT STDMETHODCALLTYPE getStatus(
  64. /* [retval][out] */ long __RPC_FAR *status);
  65. /* [hidden] */ HRESULT STDMETHODCALLTYPE initialize(
  66. /* [in] */ I_dxj_DirectSound __RPC_FAR *directSound,
  67. /* [out][in] */ DSBUFFERDESC_CDESC __RPC_FAR *BufferDesc,
  68. /* [out][in] */ byte __RPC_FAR *wbuf);
  69. HRESULT STDMETHODCALLTYPE writeBuffer(
  70. /* [in] */ long start,
  71. /* [in] */ long size,
  72. ///* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *PrimaryBuffer,
  73. void * buf,
  74. /* [in] */ long flags);
  75. HRESULT STDMETHODCALLTYPE readBuffer(
  76. /* [in] */ long start,
  77. /* [in] */ long size,
  78. ///* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *PrimaryBuffer,
  79. void * buf,
  80. /* [in] */ long flags);
  81. HRESULT STDMETHODCALLTYPE play(
  82. /* [in] */ long flags);
  83. HRESULT STDMETHODCALLTYPE setFormat(
  84. /* [in] */ WAVEFORMATEX_CDESC __RPC_FAR *format);
  85. HRESULT STDMETHODCALLTYPE setVolume(
  86. /* [in] */ long volume);
  87. HRESULT STDMETHODCALLTYPE setPan(
  88. /* [in] */ long pan);
  89. HRESULT STDMETHODCALLTYPE stop( void);
  90. HRESULT STDMETHODCALLTYPE restore( void);
  91. private:
  92. DECL_VARIABLE(_dxj_DirectSoundPrimaryBuffer);
  93. public:
  94. DX3J_GLOBAL_LINKS( _dxj_DirectSoundPrimaryBuffer )
  95. };