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.

309 lines
10 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // (C) Copyright 1997 Microsoft Corporation. All Rights Reserved.
  4. //
  5. // Contents: Declarations for ActiveX Script Authoring
  6. //
  7. //----------------------------------------------------------------------------
  8. cpp_quote("//=--------------------------------------------------------------------------=")
  9. cpp_quote("// ActivAut.h")
  10. cpp_quote("//=--------------------------------------------------------------------------=")
  11. cpp_quote("// (C) Copyright 1997 Microsoft Corporation. All Rights Reserved.")
  12. cpp_quote("//")
  13. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  14. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  15. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  16. cpp_quote("// PARTICULAR PURPOSE.")
  17. cpp_quote("//=--------------------------------------------------------------------------=")
  18. cpp_quote("//")
  19. cpp_quote("#pragma comment(lib,\"uuid.lib\")")
  20. cpp_quote("//")
  21. cpp_quote("// Declarations for ActiveX Script Authoring.")
  22. cpp_quote("//")
  23. cpp_quote("")
  24. cpp_quote("#ifndef __ActivAut_h")
  25. cpp_quote("#define __ActivAut_h")
  26. cpp_quote("")
  27. #ifndef DO_NO_IMPORTS
  28. import "ocidl.idl";
  29. import "oleidl.idl";
  30. import "oaidl.idl";
  31. #endif
  32. cpp_quote("/* GUIDs")
  33. cpp_quote(" ********/")
  34. cpp_quote("")
  35. cpp_quote("#ifndef _NO_AUTHOR_GUIDS")
  36. cpp_quote("// {0AEE2A92-BCBB-11d0-8C72-00C04FC2B085}")
  37. cpp_quote("DEFINE_GUID(CATID_ActiveScriptAuthor, 0xaee2a92, 0xbcbb, 0x11d0, 0x8c, 0x72, 0x0, 0xc0, 0x4f, 0xc2, 0xb0, 0x85);")
  38. cpp_quote("")
  39. cpp_quote("// {9C109DA0-7006-11d1-B36C-00A0C911E8B2}")
  40. cpp_quote("DEFINE_GUID(IID_IActiveScriptAuthor, 0x9c109da0, 0x7006, 0x11d1, 0xb3, 0x6c, 0x00, 0xa0, 0xc9, 0x11, 0xe8, 0xb2);")
  41. cpp_quote("")
  42. cpp_quote("// {0AEE2A94-BCBB-11d0-8C72-00C04FC2B085}")
  43. cpp_quote("DEFINE_GUID(IID_IScriptNode, 0xaee2a94, 0xbcbb, 0x11d0, 0x8c, 0x72, 0x0, 0xc0, 0x4f, 0xc2, 0xb0, 0x85);")
  44. cpp_quote("")
  45. cpp_quote("// {0AEE2A95-BCBB-11d0-8C72-00C04FC2B085}")
  46. cpp_quote("DEFINE_GUID(IID_IScriptEntry, 0xaee2a95, 0xbcbb, 0x11d0, 0x8c, 0x72, 0x0, 0xc0, 0x4f, 0xc2, 0xb0, 0x85);")
  47. cpp_quote("")
  48. cpp_quote("// {0AEE2A96-BCBB-11d0-8C72-00C04FC2B085}")
  49. cpp_quote("DEFINE_GUID(IID_IScriptScriptlet, 0xaee2a96, 0xbcbb, 0x11d0, 0x8c, 0x72, 0x0, 0xc0, 0x4f, 0xc2, 0xb0, 0x85);")
  50. cpp_quote("")
  51. cpp_quote("// {7E2D4B70-BD9A-11d0-9336-00A0C90DCAA9}")
  52. cpp_quote("DEFINE_GUID(IID_IActiveScriptAuthorProcedure, 0x7e2d4b70, 0xbd9a, 0x11d0, 0x93, 0x36, 0x0, 0xa0, 0xc9, 0xd, 0xca, 0xa9);")
  53. cpp_quote("")
  54. cpp_quote("#endif // _NO_AUTHOR_GUIDS")
  55. cpp_quote("")
  56. cpp_quote("/* Interfaces")
  57. cpp_quote(" *************/")
  58. cpp_quote("")
  59. cpp_quote("")
  60. cpp_quote("// Output flags for GetLanguageFlags")
  61. cpp_quote("const DWORD fasaPreferInternalHandler = 0x0001;")
  62. cpp_quote("const DWORD fasaSupportInternalHandler = 0x0002;")
  63. cpp_quote("const DWORD fasaCaseSensitive = 0x0004;")
  64. cpp_quote("")
  65. cpp_quote("// Flags for statement completion")
  66. cpp_quote("const DWORD SCRIPT_CMPL_NOLIST = 0x0000;")
  67. cpp_quote("const DWORD SCRIPT_CMPL_MEMBERLIST = 0x0001;")
  68. cpp_quote("const DWORD SCRIPT_CMPL_ENUMLIST = 0x0002;")
  69. cpp_quote("const DWORD SCRIPT_CMPL_PARAMTIP = 0x0004;")
  70. cpp_quote("const DWORD SCRIPT_CMPL_GLOBALLIST = 0x0008;")
  71. cpp_quote("")
  72. cpp_quote("const DWORD SCRIPT_CMPL_ENUM_TRIGGER = 0x0001;")
  73. cpp_quote("const DWORD SCRIPT_CMPL_MEMBER_TRIGGER = 0x0002;")
  74. cpp_quote("const DWORD SCRIPT_CMPL_PARAM_TRIGGER = 0x0003;")
  75. cpp_quote("const DWORD SCRIPT_CMPL_COMMIT = 0x0004;")
  76. cpp_quote("")
  77. cpp_quote("// Flags for getting attributes")
  78. cpp_quote("const DWORD GETATTRTYPE_NORMAL = 0x0000;")
  79. cpp_quote("const DWORD GETATTRTYPE_DEPSCAN = 0x0001;")
  80. cpp_quote("")
  81. cpp_quote("// GETATTRFLAG_THIS can be used with either GETATTRTYPE_NORMAL or GETATTRTYPE_DEPSCAN")
  82. cpp_quote("const DWORD GETATTRFLAG_THIS = 0x0100;")
  83. cpp_quote("const DWORD GETATTRFLAG_HUMANTEXT = 0x8000;")
  84. cpp_quote("")
  85. cpp_quote("// When the GETATTR_LOCALIZE flag is set the following bit will be")
  86. cpp_quote("// set for source attributes that should be considered localized")
  87. cpp_quote("const DWORD SOURCETEXT_ATTR_HUMANTEXT = 0x8000;")
  88. cpp_quote("")
  89. cpp_quote("// Valid attributes returned for GETATTR_DEPSCAN")
  90. cpp_quote("const DWORD SOURCETEXT_ATTR_IDENTIFIER = 0x0100;")
  91. cpp_quote("const DWORD SOURCETEXT_ATTR_MEMBERLOOKUP = 0x0200;")
  92. cpp_quote("")
  93. cpp_quote("// When the GETATTRFLAG_THIS flag is set the following bit will be")
  94. cpp_quote("// set for the this pointer (JS) or me pointer (VBS)")
  95. cpp_quote("const DWORD SOURCETEXT_ATTR_THIS = 0x0400;")
  96. interface IActiveScriptAuthor;
  97. interface IScriptNode;
  98. interface IScriptEntry;
  99. interface IScriptScriptlet;
  100. typedef WORD SOURCE_TEXT_ATTR;
  101. [
  102. uuid(0AEE2A94-BCBB-11d0-8C72-00C04FC2B085),
  103. pointer_default(unique)
  104. ]
  105. interface IScriptNode : IUnknown
  106. {
  107. HRESULT Alive(void);
  108. HRESULT Delete(void);
  109. HRESULT GetParent([out] IScriptNode **ppsnParent);
  110. HRESULT GetIndexInParent([out] ULONG *pisn);
  111. HRESULT GetCookie([out] DWORD *pdwCookie);
  112. HRESULT GetNumberOfChildren([out] ULONG *pcsn);
  113. HRESULT GetChild([in] ULONG isn, [out] IScriptNode **ppsn);
  114. HRESULT GetLanguage([out] BSTR *pbstr);
  115. HRESULT CreateChildEntry(
  116. [in] ULONG isn,
  117. [in] DWORD dwCookie,
  118. [in] LPCOLESTR pszDelimiter,
  119. [out] IScriptEntry **ppse);
  120. HRESULT CreateChildHandler(
  121. [in] LPCOLESTR pszDefaultName,
  122. [in, size_is(cpszNames)] LPCOLESTR *prgpszNames,
  123. [in] ULONG cpszNames,
  124. [in] LPCOLESTR pszEvent,
  125. [in] LPCOLESTR pszDelimiter,
  126. [in] ITypeInfo* ptiSignature,
  127. [in] ULONG iMethodSignature,
  128. [in] ULONG isn,
  129. [in] DWORD dwCookie,
  130. [out] IScriptEntry **ppse);
  131. }
  132. [
  133. uuid(0AEE2A95-BCBB-11d0-8C72-00C04FC2B085),
  134. pointer_default(unique)
  135. ]
  136. interface IScriptEntry : IScriptNode
  137. {
  138. HRESULT GetText([out] BSTR *pbstr);
  139. HRESULT SetText([in] LPCOLESTR psz);
  140. HRESULT GetBody([out] BSTR *pbstr);
  141. HRESULT SetBody([in] LPCOLESTR psz);
  142. HRESULT GetName([out] BSTR *pbstr);
  143. HRESULT SetName([in] LPCOLESTR psz);
  144. HRESULT GetItemName([out] BSTR *pbstr);
  145. HRESULT SetItemName([in] LPCOLESTR psz);
  146. HRESULT GetSignature([out] ITypeInfo **ppti, [out] ULONG *piMethod);
  147. HRESULT SetSignature([in] ITypeInfo *pti, [in] ULONG iMethod);
  148. HRESULT GetRange([out] ULONG *pichMin, [out] ULONG *pcch);
  149. }
  150. [
  151. uuid(0AEE2A96-BCBB-11d0-8C72-00C04FC2B085),
  152. pointer_default(unique)
  153. ]
  154. interface IScriptScriptlet : IScriptEntry
  155. {
  156. HRESULT GetSubItemName([out] BSTR *pbstr);
  157. HRESULT SetSubItemName([in] LPCOLESTR psz);
  158. HRESULT GetEventName([out] BSTR *pbstr);
  159. HRESULT SetEventName([in] LPCOLESTR psz);
  160. HRESULT GetSimpleEventName([out] BSTR *pbstr);
  161. HRESULT SetSimpleEventName([in] LPCOLESTR psz);
  162. }
  163. [
  164. uuid(9C109DA0-7006-11d1-B36C-00A0C911E8B2),
  165. pointer_default(unique)
  166. ]
  167. interface IActiveScriptAuthor : IUnknown
  168. {
  169. HRESULT AddNamedItem(
  170. [in] LPCOLESTR pszName,
  171. [in] DWORD dwFlags,
  172. [in] IDispatch *pdisp);
  173. HRESULT AddScriptlet(
  174. [in] LPCOLESTR pszDefaultName,
  175. [in] LPCOLESTR pszCode,
  176. [in] LPCOLESTR pszItemName,
  177. [in] LPCOLESTR pszSubItemName,
  178. [in] LPCOLESTR pszEventName,
  179. [in] LPCOLESTR pszDelimiter,
  180. [in] DWORD dwCookie,
  181. [in] DWORD dwFlags);
  182. HRESULT ParseScriptText(
  183. [in] LPCOLESTR pszCode,
  184. [in] LPCOLESTR pszItemName,
  185. [in] LPCOLESTR pszDelimiter,
  186. [in] DWORD dwCookie,
  187. [in] DWORD dwFlags);
  188. HRESULT GetScriptTextAttributes(
  189. [in, size_is(cch)] LPCOLESTR pszCode,
  190. [in] ULONG cch,
  191. [in] LPCOLESTR pszDelimiter,
  192. [in] DWORD dwFlags,
  193. [in, out, size_is(cch)] SOURCE_TEXT_ATTR *pattr);
  194. HRESULT GetScriptletTextAttributes(
  195. [in, size_is(cch)] LPCOLESTR pszCode,
  196. [in] ULONG cch,
  197. [in] LPCOLESTR pszDelimiter,
  198. [in] DWORD dwFlags,
  199. [in, out, size_is(cch)] SOURCE_TEXT_ATTR *pattr);
  200. HRESULT GetRoot([out] IScriptNode **ppsp);
  201. HRESULT GetLanguageFlags([out] DWORD *pgrfasa);
  202. HRESULT GetEventHandler(
  203. [in] IDispatch* pdisp,
  204. [in] LPCOLESTR pszItem,
  205. [in] LPCOLESTR pszSubItem,
  206. [in] LPCOLESTR pszEvent,
  207. [out] IScriptEntry **ppse);
  208. HRESULT RemoveNamedItem(
  209. [in] LPCOLESTR pszName);
  210. HRESULT AddTypeLib(
  211. [in] REFGUID rguidTypeLib,
  212. [in] DWORD dwMajor,
  213. [in] DWORD dwMinor,
  214. [in] DWORD dwFlags);
  215. HRESULT RemoveTypeLib(
  216. [in] REFGUID rguidTypeLib,
  217. [in] DWORD dwMajor,
  218. [in] DWORD dwMinor);
  219. // Statement completion functions
  220. HRESULT GetChars(
  221. [in] DWORD fRequestedList, // The list of characters requested
  222. [out] BSTR * pbstrChars); // The characters for this flag
  223. HRESULT GetInfoFromContext(
  224. [in] LPCOLESTR pszCode, // The text from the block that is being edited.
  225. [in] ULONG cchCode, // The length of the code block
  226. [in] ULONG ichCurrentPosition, // Offset from the beginning of the block
  227. [in] DWORD dwListTypesRequested, // The type of list requested
  228. [out] DWORD * pdwListTypesProvided, // The type of list provided
  229. [out] ULONG * pichListAnchorPosition, // The offset of the anchor position for the list
  230. [out] ULONG * pichFuncAnchorPosition, // The offset of the anchor position for a function call
  231. [out] MEMBERID * pmemid, // The memid of the function for a param tip.
  232. [out] LONG * piCurrentParameter, // The index of the current parameter, -1 for symbol
  233. [out] IUnknown * * ppunk); // The information from which to build the list
  234. HRESULT IsCommitChar(
  235. [in] OLECHAR ch, // The character that might be a commit char
  236. [out] BOOL * pfcommit);
  237. }
  238. [
  239. uuid(7E2D4B70-BD9A-11d0-9336-00A0C90DCAA9),
  240. pointer_default(unique)
  241. ]
  242. interface IActiveScriptAuthorProcedure : IUnknown
  243. {
  244. HRESULT ParseProcedureText(
  245. [in] LPCOLESTR pszCode,
  246. [in] LPCOLESTR pszFormalParams,
  247. [in] LPCOLESTR pszProcedureName,
  248. [in] LPCOLESTR pszItemName,
  249. [in] LPCOLESTR pszDelimiter,
  250. [in] DWORD dwCookie,
  251. [in] DWORD dwFlags,
  252. [in] IDispatch *pdispFor);
  253. }
  254. cpp_quote("")
  255. cpp_quote("#endif // __ActivAut_h")
  256. cpp_quote("")