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.

71 lines
1.8 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1998
  6. //
  7. // File: dmbandobj.cpp
  8. //
  9. //--------------------------------------------------------------------------
  10. // dmPerformanceObj.cpp
  11. #include "dmusici.h"
  12. #include "dmusicc.h"
  13. #include "dmusicf.h"
  14. #include "stdafx.h"
  15. #include "Direct.h"
  16. #include "dms.h"
  17. #include "dmSegmentObj.h"
  18. #include "dmPerformanceObj.h"
  19. #include "dmBandObj.h"
  20. extern void *g_dxj_DirectMusicSegment;
  21. extern void *g_dxj_DirectMusicBand;
  22. extern HRESULT BSTRtoGUID(LPGUID,BSTR);
  23. CONSTRUCTOR(_dxj_DirectMusicBand, {});
  24. DESTRUCTOR(_dxj_DirectMusicBand, {});
  25. GETSET_OBJECT(_dxj_DirectMusicBand);
  26. typedef IDirectMusicSegment* LPDIRECTMUSICSEGMENT;
  27. typedef IDirectMusicPerformance* LPDIRECTMUSICPERFORMANCE;
  28. HRESULT C_dxj_DirectMusicBandObject::createSegment(
  29. /* [retval][out] */ I_dxj_DirectMusicSegment __RPC_FAR *__RPC_FAR *ret)
  30. {
  31. HRESULT hr;
  32. LPDIRECTMUSICSEGMENT pSeg=NULL;
  33. hr=m__dxj_DirectMusicBand->CreateSegment(&pSeg);
  34. if FAILED(hr) return hr;
  35. if (!pSeg) return E_FAIL;
  36. INTERNAL_CREATE_NOADDREF(_dxj_DirectMusicSegment,pSeg,ret);
  37. return hr;
  38. }
  39. HRESULT C_dxj_DirectMusicBandObject::download(
  40. /* [in] */ I_dxj_DirectMusicPerformance __RPC_FAR *performance)
  41. {
  42. HRESULT hr;
  43. DO_GETOBJECT_NOTNULL(LPDIRECTMUSICPERFORMANCE,pPer,performance);
  44. hr=m__dxj_DirectMusicBand->Download(pPer);
  45. return hr;
  46. }
  47. HRESULT C_dxj_DirectMusicBandObject::unload(
  48. /* [in] */ I_dxj_DirectMusicPerformance __RPC_FAR *performance)
  49. {
  50. HRESULT hr;
  51. DO_GETOBJECT_NOTNULL(LPDIRECTMUSICPERFORMANCE,pPer,performance);
  52. hr=m__dxj_DirectMusicBand->Unload(pPer);
  53. return hr;
  54. }