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.

43 lines
1.3 KiB

  1. // Copyright (c) 1999 Microsoft Corporation. All rights reserved.
  2. //
  3. // Implements a script's global dispatch object.
  4. // Calls are delegated to the performance, constants, or contained content held on the parent CDirectMusicScript object.
  5. // AddRef/Release are ignored, because it is completely contained within the lifetime of CDirectMusicScript.
  6. //
  7. #pragma once
  8. #include "dmscript.h"
  9. class CGlobalDispatch
  10. : public IDispatch
  11. {
  12. public:
  13. CGlobalDispatch(CDirectMusicScript *pParentScript) : m_pParentScript(pParentScript) { assert(m_pParentScript); }
  14. // IUnknown
  15. STDMETHOD(QueryInterface)(const IID &iid, void **ppv);
  16. STDMETHOD_(ULONG, AddRef)() { return 2; }
  17. STDMETHOD_(ULONG, Release)() { return 2; }
  18. // IDispatch
  19. STDMETHOD(GetTypeInfoCount)(UINT *pctinfo);
  20. STDMETHOD(GetTypeInfo)(UINT iTInfo, LCID lcid, ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo);
  21. STDMETHOD(GetIDsOfNames)(
  22. REFIID riid,
  23. LPOLESTR __RPC_FAR *rgszNames,
  24. UINT cNames,
  25. LCID lcid,
  26. DISPID __RPC_FAR *rgDispId);
  27. STDMETHOD(Invoke)(
  28. DISPID dispIdMember,
  29. REFIID riid,
  30. LCID lcid,
  31. WORD wFlags,
  32. DISPPARAMS __RPC_FAR *pDispParams,
  33. VARIANT __RPC_FAR *pVarResult,
  34. EXCEPINFO __RPC_FAR *pExcepInfo,
  35. UINT __RPC_FAR *puArgErr);
  36. private:
  37. CDirectMusicScript *m_pParentScript;
  38. };