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.

354 lines
7.3 KiB

  1. /*
  2. CallObjects: A Suite of Interfaces for Manipulating CallFrames as Objects
  3. Copyright (c) Microsoft Corporation. All rights reserved.
  4. */
  5. import "oaidl.idl";
  6. interface ICallInterceptor;
  7. interface ICallUnmarshal;
  8. interface ICallFrame;
  9. interface ICallFrameEvents;
  10. interface ICallFrameWalker;
  11. interface IInterfaceRelated;
  12. [uuid(D573B4B0-894E-11d2-B8B6-00C04FB9618A), object, pointer_default(unique), local]
  13. interface ICallFrame : IUnknown
  14. {
  15. typedef struct
  16. {
  17. ULONG iMethod;
  18. BOOL fHasInValues;
  19. BOOL fHasInOutValues;
  20. BOOL fHasOutValues;
  21. BOOL fDerivesFromIDispatch;
  22. LONG cInInterfacesMax;
  23. LONG cInOutInterfacesMax;
  24. LONG cOutInterfacesMax;
  25. LONG cTopLevelInInterfaces;
  26. IID iid;
  27. ULONG cMethod;
  28. ULONG cParams;
  29. } CALLFRAMEINFO;
  30. typedef struct
  31. {
  32. BOOLEAN fIn;
  33. BOOLEAN fOut;
  34. ULONG stackOffset;
  35. ULONG cbParam;
  36. } CALLFRAMEPARAMINFO;
  37. HRESULT GetInfo
  38. (
  39. [out] CALLFRAMEINFO* pInfo
  40. );
  41. HRESULT GetIIDAndMethod
  42. (
  43. [out] IID* pIID,
  44. [out] ULONG* piMethod
  45. );
  46. HRESULT GetNames
  47. (
  48. [out] LPWSTR* pwszInterface,
  49. [out] LPWSTR* pwszMethod
  50. );
  51. PVOID GetStackLocation ();
  52. void SetStackLocation
  53. (
  54. [in] PVOID pvStack
  55. );
  56. void SetReturnValue
  57. (
  58. [in] HRESULT hr
  59. );
  60. HRESULT GetReturnValue ();
  61. HRESULT GetParamInfo
  62. (
  63. [in] ULONG iparam,
  64. [out] CALLFRAMEPARAMINFO* pInfo
  65. );
  66. HRESULT SetParam
  67. (
  68. [in] ULONG iparam,
  69. [in] VARIANT* pvar
  70. );
  71. HRESULT GetParam
  72. (
  73. [in] ULONG iparam,
  74. [out] VARIANT* pvar
  75. );
  76. typedef enum
  77. {
  78. CALLFRAME_COPY_NESTED = 1,
  79. CALLFRAME_COPY_INDEPENDENT = 2
  80. } CALLFRAME_COPY;
  81. HRESULT Copy
  82. (
  83. [in] CALLFRAME_COPY copyControl,
  84. [in] ICallFrameWalker* pWalker,
  85. [out] ICallFrame** ppFrame
  86. );
  87. HRESULT Free
  88. (
  89. [in] ICallFrame* pframeArgsDest,
  90. [in] ICallFrameWalker* pWalkerDestFree,
  91. [in] ICallFrameWalker* pWalkerCopy,
  92. [in] DWORD freeFlags,
  93. [in] ICallFrameWalker* pWalkerFree,
  94. [in] DWORD nullFlags
  95. );
  96. enum CALLFRAME_FREE
  97. {
  98. CALLFRAME_FREE_NONE = 0,
  99. CALLFRAME_FREE_IN = 1,
  100. CALLFRAME_FREE_INOUT = 2,
  101. CALLFRAME_FREE_OUT = 4,
  102. CALLFRAME_FREE_TOP_INOUT = 8,
  103. CALLFRAME_FREE_TOP_OUT = 16,
  104. CALLFRAME_FREE_ALL = 31,
  105. };
  106. enum CALLFRAME_NULL
  107. {
  108. CALLFRAME_NULL_NONE = 0,
  109. CALLFRAME_NULL_INOUT = 2,
  110. CALLFRAME_NULL_OUT = 4,
  111. CALLFRAME_NULL_ALL = 6,
  112. };
  113. HRESULT FreeParam
  114. (
  115. [in] ULONG iparam,
  116. [in] DWORD freeFlags,
  117. [in] ICallFrameWalker* pWalkerFree,
  118. [in] DWORD nullFlags
  119. );
  120. HRESULT WalkFrame
  121. (
  122. [in] DWORD walkWhat,
  123. [in] ICallFrameWalker* pWalker
  124. );
  125. enum CALLFRAME_WALK
  126. {
  127. CALLFRAME_WALK_IN = 1,
  128. CALLFRAME_WALK_INOUT = 2,
  129. CALLFRAME_WALK_OUT = 4,
  130. };
  131. typedef struct
  132. {
  133. BOOLEAN fIn;
  134. DWORD dwDestContext;
  135. LPVOID pvDestContext;
  136. IUnknown* punkReserved;
  137. GUID guidTransferSyntax;
  138. } CALLFRAME_MARSHALCONTEXT;
  139. HRESULT GetMarshalSizeMax
  140. (
  141. [in] CALLFRAME_MARSHALCONTEXT* pmshlContext,
  142. [in] MSHLFLAGS mshlflags,
  143. [out] ULONG* pcbBufferNeeded
  144. );
  145. HRESULT Marshal
  146. (
  147. [in] CALLFRAME_MARSHALCONTEXT* pmshlContext,
  148. [in] MSHLFLAGS mshlflags,
  149. [in,size_is(cbBuffer)] PVOID pBuffer,
  150. [in] ULONG cbBuffer,
  151. [out] ULONG* pcbBufferUsed,
  152. [out] RPCOLEDATAREP* pdataRep,
  153. [out] ULONG* prpcFlags
  154. );
  155. HRESULT Unmarshal
  156. (
  157. [in,size_is(cbBuffer)] PVOID pBuffer,
  158. [in] ULONG cbBuffer,
  159. [in] RPCOLEDATAREP dataRep,
  160. [in] CALLFRAME_MARSHALCONTEXT* pcontext,
  161. [out] ULONG* pcbUnmarshalled
  162. );
  163. HRESULT ReleaseMarshalData
  164. (
  165. [in,size_is(cbBuffer)] PVOID pBuffer,
  166. [in] ULONG cbBuffer,
  167. [in] ULONG ibFirstRelease,
  168. [in] RPCOLEDATAREP dataRep,
  169. [in] CALLFRAME_MARSHALCONTEXT* pcontext
  170. );
  171. HRESULT Invoke
  172. (
  173. [in] void* pvReceiver,
  174. ...
  175. );
  176. };
  177. [uuid(D573B4B1-894E-11d2-B8B6-00C04FB9618A), object, pointer_default(unique), local]
  178. interface ICallIndirect : IUnknown
  179. {
  180. HRESULT CallIndirect
  181. (
  182. [out] HRESULT* phrReturn,
  183. [in] ULONG iMethod,
  184. [in] void* pvArgs,
  185. [out] ULONG* cbArgs
  186. );
  187. HRESULT GetMethodInfo
  188. (
  189. [in] ULONG iMethod,
  190. [out] CALLFRAMEINFO* pInfo,
  191. [out] LPWSTR* pwszMethod
  192. );
  193. HRESULT GetStackSize
  194. (
  195. [in] ULONG iMethod,
  196. [out] ULONG* cbArgs
  197. );
  198. HRESULT GetIID
  199. (
  200. [out] IID* piid,
  201. [out] BOOL* pfDerivesFromIDispatch,
  202. [out] ULONG* pcMethod,
  203. [out] LPWSTR* pwszInterface
  204. );
  205. };
  206. [uuid(60C7CA75-896D-11d2-B8B6-00C04FB9618A), object, pointer_default(unique), local]
  207. interface ICallInterceptor : ICallIndirect
  208. {
  209. HRESULT RegisterSink
  210. (
  211. [in] ICallFrameEvents* psink
  212. );
  213. HRESULT GetRegisteredSink
  214. (
  215. [out] ICallFrameEvents** ppsink
  216. );
  217. };
  218. [uuid(FD5E0843-FC91-11d0-97D7-00C04FB9618A), object, pointer_default(unique), local]
  219. interface ICallFrameEvents : IUnknown
  220. {
  221. HRESULT OnCall
  222. (
  223. [in] ICallFrame* pFrame /* A call frame bound to the just-received invocation */
  224. );
  225. };
  226. [uuid(5333B003-2E42-11d2-B89D-00C04FB9618A), object, pointer_default(unique), local]
  227. interface ICallUnmarshal : IUnknown
  228. {
  229. HRESULT Unmarshal
  230. (
  231. [in] ULONG iMethod,
  232. [in,size_is(cbBuffer)] PVOID pBuffer,
  233. [in] ULONG cbBuffer,
  234. [in] BOOL fForceBufferCopy,
  235. [in] RPCOLEDATAREP dataRep,
  236. [in] CALLFRAME_MARSHALCONTEXT *pcontext,
  237. [out] ULONG* pcbUnmarshalled,
  238. [out] ICallFrame** ppFrame
  239. );
  240. HRESULT ReleaseMarshalData
  241. (
  242. [in] ULONG iMethod,
  243. [in,size_is(cbBuffer)] PVOID pBuffer,
  244. [in] ULONG cbBuffer,
  245. [in] ULONG ibFirstRelease,
  246. [in] RPCOLEDATAREP dataRep,
  247. [in] CALLFRAME_MARSHALCONTEXT* pcontext
  248. );
  249. };
  250. [uuid(08B23919-392D-11d2-B8A4-00C04FB9618A), object, pointer_default(unique), local]
  251. interface ICallFrameWalker : IUnknown
  252. {
  253. HRESULT OnWalkInterface
  254. (
  255. [in] REFIID iid,
  256. [in] PVOID* ppvInterface,
  257. [in] BOOL fIn,
  258. [in] BOOL fOut
  259. );
  260. };
  261. [uuid(D1FB5A79-7706-11d1-ADBA-00C04FC2ADC0), object, pointer_default(unique), local]
  262. interface IInterfaceRelated : IUnknown
  263. {
  264. HRESULT SetIID
  265. (
  266. [in] REFIID iid
  267. );
  268. HRESULT GetIID
  269. (
  270. [out] IID* piid
  271. );
  272. };
  273. cpp_quote("#define CALLFRAME_E_ALREADYINVOKED _HRESULT_TYPEDEF_( 0x8004d090 )")
  274. cpp_quote("#define CALLFRAME_E_COULDNTMAKECALL _HRESULT_TYPEDEF_( 0x8004d091 )")
  275. [uuid(15B51D8B-9BF6-11d1-B888-00C04FB9618A), local]
  276. interface ICallFrameAPIs {
  277. HRESULT __stdcall CoGetInterceptor
  278. (
  279. [in] REFIID iidIntercepted,
  280. [in] IUnknown* punkOuter,
  281. [in] REFIID iid,
  282. [out] void** ppv
  283. );
  284. HRESULT __stdcall CoGetInterceptorFromTypeInfo
  285. (
  286. [in] REFIID iidIntercepted,
  287. [in] IUnknown* punkOuter,
  288. [in] ITypeInfo* typeInfo,
  289. [in] REFIID iid,
  290. [out] void** ppv
  291. );
  292. };