Source code of Windows XP (NT5)
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.

142 lines
4.7 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ActiveScriptSite.h
  7. //
  8. // Description:
  9. // CActiveScriptSite class header file.
  10. //
  11. // Maintained By:
  12. // gpease 14-DEC-1999
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. class CActiveScriptSite :
  17. public IActiveScriptSite,
  18. public IActiveScriptSiteInterruptPoll,
  19. public IActiveScriptSiteWindow,
  20. public IDispatchEx
  21. {
  22. private:
  23. LONG m_cRef;
  24. RESOURCE_HANDLE m_hResource;
  25. PLOG_EVENT_ROUTINE m_pler;
  26. HKEY m_hkey;
  27. IUnknown * m_punkResource;
  28. LPCWSTR m_pszName; // DONT'T FREE
  29. private:
  30. STDMETHOD(LogError)( HRESULT hrIn );
  31. public:
  32. explicit CActiveScriptSite( RESOURCE_HANDLE hResourceIn,
  33. PLOG_EVENT_ROUTINE plerIn,
  34. HKEY hkeyIn,
  35. LPCWSTR pszName
  36. );
  37. virtual ~CActiveScriptSite();
  38. // IUnknown
  39. STDMETHOD( QueryInterface )(
  40. REFIID riid,
  41. void ** ppUnk );
  42. STDMETHOD_(ULONG, AddRef )( );
  43. STDMETHOD_(ULONG, Release )( );
  44. // IActiveScriptSite
  45. STDMETHOD( GetLCID )(
  46. /* [out] */ LCID __RPC_FAR *plcid );
  47. STDMETHOD( GetItemInfo )(
  48. /* [in] */ LPCOLESTR pstrName,
  49. /* [in] */ DWORD dwReturnMask,
  50. /* [out] */ IUnknown __RPC_FAR *__RPC_FAR *ppiunkItem,
  51. /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppti );
  52. STDMETHOD( GetDocVersionString )(
  53. /* [out] */ BSTR __RPC_FAR *pbstrVersion );
  54. STDMETHOD( OnScriptTerminate )(
  55. /* [in] */ const VARIANT __RPC_FAR *pvarResult,
  56. /* [in] */ const EXCEPINFO __RPC_FAR *pexcepinfo );
  57. STDMETHOD( OnStateChange )(
  58. /* [in] */ SCRIPTSTATE ssScriptState );
  59. STDMETHOD( OnScriptError )(
  60. /* [in] */ IActiveScriptError __RPC_FAR *pscripterror );
  61. STDMETHOD( OnEnterScript )( void );
  62. STDMETHOD( OnLeaveScript )( void );
  63. // IActiveScriptSiteInterruptPoll
  64. STDMETHOD( QueryContinue )( void );
  65. // IActiveScriptSiteWindow
  66. STDMETHOD( GetWindow )(
  67. /* [out] */ HWND __RPC_FAR *phwnd );
  68. STDMETHOD( EnableModeless)(
  69. /* [in] */ BOOL fEnable );
  70. // IDispatch
  71. STDMETHOD( GetTypeInfoCount )(
  72. /* [out] */ UINT __RPC_FAR *pctinfo );
  73. STDMETHOD( GetTypeInfo )(
  74. /* [in] */ UINT iTInfo,
  75. /* [in] */ LCID lcid,
  76. /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo );
  77. STDMETHOD( GetIDsOfNames )(
  78. /* [in] */ REFIID riid,
  79. /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
  80. /* [in] */ UINT cNames,
  81. /* [in] */ LCID lcid,
  82. /* [size_is][out] */ DISPID __RPC_FAR *rgDispId );
  83. STDMETHOD( Invoke )(
  84. /* [in] */ DISPID dispIdMember,
  85. /* [in] */ REFIID riid,
  86. /* [in] */ LCID lcid,
  87. /* [in] */ WORD wFlags,
  88. /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
  89. /* [out] */ VARIANT __RPC_FAR *pVarResult,
  90. /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
  91. /* [out] */ UINT __RPC_FAR *puArgErr );
  92. // IDispatchEx
  93. STDMETHOD( GetDispID )(
  94. /* [in] */ BSTR bstrName,
  95. /* [in] */ DWORD grfdex,
  96. /* [out] */ DISPID __RPC_FAR *pid );
  97. STDMETHOD( InvokeEx )(
  98. /* [in] */ DISPID id,
  99. /* [in] */ LCID lcid,
  100. /* [in] */ WORD wFlags,
  101. /* [in] */ DISPPARAMS __RPC_FAR *pdp,
  102. /* [out] */ VARIANT __RPC_FAR *pvarRes,
  103. /* [out] */ EXCEPINFO __RPC_FAR *pei,
  104. /* [unique][in] */ IServiceProvider __RPC_FAR *pspCaller );
  105. STDMETHOD( DeleteMemberByName )(
  106. /* [in] */ BSTR bstr,
  107. /* [in] */ DWORD grfdex );
  108. STDMETHOD( DeleteMemberByDispID )(
  109. /* [in] */ DISPID id );
  110. STDMETHOD( GetMemberProperties )(
  111. /* [in] */ DISPID id,
  112. /* [in] */ DWORD grfdexFetch,
  113. /* [out] */ DWORD __RPC_FAR *pgrfdex );
  114. STDMETHOD( GetMemberName )(
  115. /* [in] */ DISPID id,
  116. /* [out] */ BSTR __RPC_FAR *pbstrName );
  117. STDMETHOD( GetNextDispID )(
  118. /* [in] */ DWORD grfdex,
  119. /* [in] */ DISPID id,
  120. /* [out] */ DISPID __RPC_FAR *pid );
  121. STDMETHOD( GetNameSpaceParent )(
  122. /* [out] */ IUnknown __RPC_FAR *__RPC_FAR *ppunk );
  123. };