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.

301 lines
11 KiB

  1. /*===================================================================
  2. Microsoft IIS 6
  3. Microsoft Confidential.
  4. Copyright 2000 Microsoft Corporation. All Rights Reserved.
  5. Component: IDL
  6. File: IIsapiCore.idl - ISAPI Core Interface
  7. ===================================================================*/
  8. import "basetsd.idl";
  9. import "oaidl.idl";
  10. import "ocidl.idl";
  11. [
  12. uuid(928f6bd4-bd84-48f0-a55c-b71d1f515af2),
  13. helpstring("ISAPI Core Interface"),
  14. pointer_default(unique)
  15. ]
  16. interface IIsapiCore : IUnknown
  17. {
  18. typedef struct _RESPONSE_BUFFER
  19. {
  20. DWORD cbBuffer;
  21. [size_is(cbBuffer)] BYTE * pbBuffer;
  22. } RESPONSE_BUFFER;
  23. typedef struct _RESPONSE_INFO
  24. {
  25. DWORD cBuffers;
  26. [size_is(cBuffers)] RESPONSE_BUFFER * rgBuffers;
  27. } RESPONSE_INFO;
  28. typedef struct _EXEC_URL_USER_INFO
  29. {
  30. #ifdef _WIN64
  31. UINT64 hImpersonationToken;
  32. #else
  33. DWORD_PTR hImpersonationToken;
  34. #endif
  35. BOOL fIsUserNameUnicode;
  36. [size_is(cbUserName)] BYTE * pszUserName;
  37. DWORD cbUserName;
  38. [string] LPSTR pszAuthType;
  39. } EXEC_URL_USER_INFO;
  40. typedef struct _EXEC_URL_ENTITY_INFO
  41. {
  42. DWORD cbAvailable;
  43. [size_is(cbAvailable)] BYTE * lpbData;
  44. } EXEC_URL_ENTITY_INFO;
  45. typedef struct _EXEC_URL_INFO
  46. {
  47. BOOL fIsUrlUnicode;
  48. [size_is(cbUrl)] BYTE * pszUrl;
  49. DWORD cbUrl;
  50. [string] LPSTR pszMethod;
  51. [string] LPSTR pszChildHeaders;
  52. EXEC_URL_USER_INFO * pUserInfo;
  53. EXEC_URL_ENTITY_INFO * pEntity;
  54. DWORD dwExecUrlFlags;
  55. } EXEC_URL_INFO;
  56. typedef struct _VECTOR_ELEMENT
  57. {
  58. [unique,size_is(cbBufSize)] BYTE * pBuffer;
  59. DWORD cbBufSize;
  60. #ifdef _WIN64
  61. UINT64 hFile;
  62. #else
  63. DWORD_PTR hFile;
  64. #endif
  65. ULONGLONG cbOffset;
  66. ULONGLONG cbFileSize;
  67. [unique,string] WCHAR * pszFragmentName;
  68. } VECTOR_ELEMENT;
  69. [helpstring("method GetServerVariable")]
  70. HRESULT GetServerVariable(
  71. [in,string] LPSTR szVariableName,
  72. [in,out,size_is(cbBuffer),unique] BYTE * szBuffer,
  73. [in] DWORD cbBuffer,
  74. [out] DWORD * pcbBufferRequired
  75. );
  76. [helpstring("method ReadClient")]
  77. HRESULT ReadClient(
  78. [in] DWORD64 IsaContext,
  79. [in,out,unique,size_is(cbBuffer)] BYTE * pBuffer,
  80. [in] DWORD cbBuffer,
  81. [in] DWORD dwBytesToRead,
  82. [out] DWORD * pdwSyncBytesRead,
  83. [in] DWORD dwFlags
  84. );
  85. [helpstring("method WriteClient")]
  86. HRESULT WriteClient(
  87. [in] DWORD64 IsaContext,
  88. [in,size_is(cbBuffer)] BYTE * pBuffer,
  89. [in] DWORD cbBuffer,
  90. [in] DWORD dwFlags
  91. );
  92. [helpstring("method SendResponseHeaders")]
  93. HRESULT SendResponseHeaders(
  94. [in] BOOL fDisconnect,
  95. [in,string,unique] LPSTR szStatus,
  96. [in,string,unique] LPSTR szHeaders,
  97. [in] DWORD dwFlags
  98. );
  99. [helpstring("method MapPath")]
  100. HRESULT MapPath(
  101. [in,out,size_is(cbPath)] BYTE * szPath,
  102. [in] DWORD cbPath,
  103. [out] DWORD * pcbBufferRequired,
  104. [in] BOOL fUnicode
  105. );
  106. [helpstring("method MapPathEx")]
  107. HRESULT MapPathEx(
  108. [in,size_is(cbUrl)] BYTE * szUrl,
  109. [in] DWORD cbUrl,
  110. [in,out,size_is(cbPath)] BYTE * szPath,
  111. [in] DWORD cbPath,
  112. [in,out] DWORD * pcbBufferRequired,
  113. [out] DWORD * pcchMatchingPath,
  114. [out] DWORD * pcchMatchingUrl,
  115. [out] DWORD * pdwFlags,
  116. [in] BOOL fUnicode
  117. );
  118. [helpstring("method TransmitFile")]
  119. HRESULT TransmitFile(
  120. [in] DWORD64 IsaContext,
  121. #ifdef _WIN64
  122. [in] UINT64 hFile,
  123. #else
  124. [in] DWORD_PTR hFile,
  125. #endif
  126. [in] DWORD64 cbOffset,
  127. [in] DWORD64 cbWrite,
  128. [in,string,unique] LPSTR szStatusCode,
  129. [in,size_is(cbHead),unique] BYTE * pHead,
  130. [in] DWORD cbHead,
  131. [in,size_is(cbTail),unique] BYTE * pTail,
  132. [in] DWORD cbTail,
  133. [in] DWORD dwFlags
  134. );
  135. [helpstring("method SetConnectionClose")]
  136. HRESULT SetConnectionClose(
  137. [in] BOOL fClose
  138. );
  139. [helpstring("method SendRedirect")]
  140. HRESULT SendRedirect(
  141. [in,string] LPCSTR szLocation,
  142. [in] BOOL fDisconnect
  143. );
  144. [helpstring("method GetCertificateInfoEx")]
  145. HRESULT GetCertificateInfoEx(
  146. [in] DWORD cbAllocated,
  147. [out] DWORD * pdwCertEncodingType,
  148. [out,size_is(cbAllocated)] BYTE * pbCertEncoded,
  149. [out] DWORD * pcbCertEncoded,
  150. [out] DWORD * pdwCertificateFlags
  151. );
  152. [helpstring("method AppendLog")]
  153. HRESULT AppendLog(
  154. [in,string] LPSTR szExtraParam,
  155. [in] USHORT StatusCode
  156. );
  157. [helpstring("method ExecuteUrl")]
  158. HRESULT ExecuteUrl(
  159. [in] DWORD64 IsaContext,
  160. [in] EXEC_URL_INFO * pExecUrlInfo
  161. );
  162. [helpstring("method GetExecuteUrlStatus")]
  163. HRESULT GetExecuteUrlStatus(
  164. [out] USHORT * pChildStatusCode,
  165. [out] USHORT * pChildSubErrorCode,
  166. [out] DWORD * pChildWin32Error
  167. );
  168. [helpstring("method SendCustomError")]
  169. HRESULT SendCustomError(
  170. [in] DWORD64 IsaContext,
  171. [in,string,unique] LPSTR szStatus,
  172. [in] USHORT uHttpSubError
  173. );
  174. [helpstring("method VectorSend")]
  175. HRESULT VectorSend(
  176. [in] DWORD64 IsaContext,
  177. [in] BOOL fDisconnect,
  178. [in,unique,string] LPSTR pszStatus,
  179. [in,unique,string] LPSTR pszHeaders,
  180. [in,unique,size_is(nElementCount)] VECTOR_ELEMENT *pElements,
  181. [in] DWORD nElementCount,
  182. [in] BOOL fFinalSend,
  183. [in] BOOL fCacheResponse
  184. );
  185. [helpstring("method GetCustomError")]
  186. HRESULT GetCustomError(
  187. [in] DWORD dwError,
  188. [in] DWORD dwSubError,
  189. [in] DWORD dwBufferSize,
  190. [in, out, size_is(dwBufferSize)] BYTE *pvBuffer,
  191. [out] DWORD *pdwRequiredBufferSize,
  192. [out] BOOL *pfIsFileError,
  193. [out] BOOL *pfSendErrorBody
  194. );
  195. [helpstring("method TestConnection")]
  196. HRESULT TestConnection(
  197. [out] BOOL *pfIsConnected
  198. );
  199. // GetSspiInfo only works inproc - the returned handles won't work OOP
  200. [helpstring("method GetSspiInfo")]
  201. HRESULT GetSspiInfo(
  202. [out,size_is(cbCredHandle)] BYTE * pCredHandle,
  203. [in] DWORD cbCredHandle,
  204. [out,size_is(cbCtxtHandle)] BYTE * pCtxtHandle,
  205. [in] DWORD cbCtxtHandle
  206. );
  207. [helpstring("method QueryToken")]
  208. HRESULT QueryToken(
  209. [in,size_is(cbUrl)] BYTE * szUrl,
  210. [in] DWORD cbUrl,
  211. [in] DWORD dwTokenType,
  212. [out] DWORD64 * pToken,
  213. [in] BOOL fUnicode
  214. );
  215. [helpstring("method ReportAsUnhealthy")]
  216. HRESULT ReportAsUnhealthy(
  217. [in,size_is(cbImage)] BYTE * szImage,
  218. [in] DWORD cbImage,
  219. [in,unique,size_is(cbReason)] BYTE * szReason,
  220. [in] DWORD cbReason
  221. );
  222. [helpstring("method AddFragmentToCache")]
  223. HRESULT
  224. AddFragmentToCache(
  225. [in] VECTOR_ELEMENT * pVectorElement,
  226. [in,string] WCHAR * pszFragmentName
  227. );
  228. [helpstring("method ReadFragmentFromCache")]
  229. HRESULT
  230. ReadFragmentFromCache(
  231. [in,string] WCHAR * pszFragmentName,
  232. [in,out,size_is(cbSize)] BYTE * pvBuffer,
  233. [in] DWORD cbSize,
  234. [out] DWORD * pcbCopied
  235. );
  236. [helpstring("method RemoveFragmentFromCache")]
  237. HRESULT
  238. RemoveFragmentFromCache(
  239. [in,string] WCHAR * pszFragmentName
  240. );
  241. [helpstring("method GetMetadataProperty")]
  242. HRESULT
  243. GetMetadataProperty(
  244. [in] DWORD dwPropertyId,
  245. [in,out,size_is(cbBuffer)] BYTE * pvBuffer,
  246. [in] DWORD cbBuffer,
  247. [out] DWORD * pcbBufferRequired
  248. );
  249. [helpstring("method GetCacheInvalidationCallback")]
  250. HRESULT
  251. GetCacheInvalidationCallback(
  252. [out] DWORD64 *pfnCallback
  253. );
  254. [helpstring("method CloseConnection")]
  255. HRESULT CloseConnection();
  256. [helpstring("method AllocateMemory")]
  257. HRESULT
  258. AllocateMemory(
  259. [in] DWORD cbSize,
  260. [out] DWORD64 * pvBlock
  261. );
  262. };