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.

325 lines
6.8 KiB

  1. #include "inetcorepch.h"
  2. #pragma hdrstop
  3. #define _WINHTTP_INTERNAL_
  4. #include <winhttp.h>
  5. static
  6. BOOLAPI
  7. WinHttpCloseHandle
  8. (
  9. IN HINTERNET hInternet
  10. )
  11. {
  12. SetLastError(ERROR_PROC_NOT_FOUND);
  13. return FALSE;
  14. }
  15. static
  16. WINHTTPAPI
  17. HINTERNET
  18. WINAPI
  19. WinHttpConnect
  20. (
  21. IN HINTERNET hSession,
  22. IN LPCWSTR pswzServerName,
  23. IN INTERNET_PORT nServerPort,
  24. IN DWORD dwReserved
  25. )
  26. {
  27. SetLastError(ERROR_PROC_NOT_FOUND);
  28. return NULL;
  29. }
  30. static
  31. BOOLAPI
  32. WinHttpCrackUrl
  33. (
  34. IN LPCWSTR pwszUrl,
  35. IN DWORD dwUrlLength,
  36. IN DWORD dwFlags,
  37. IN OUT LPURL_COMPONENTS lpUrlComponents
  38. )
  39. {
  40. SetLastError(ERROR_PROC_NOT_FOUND);
  41. return FALSE;
  42. }
  43. static
  44. WINHTTPAPI BOOL WINAPI WinHttpGetDefaultProxyConfiguration( IN OUT WINHTTP_PROXY_INFO * pProxyInfo)
  45. {
  46. SetLastError(ERROR_PROC_NOT_FOUND);
  47. return FALSE;
  48. }
  49. static
  50. BOOLAPI
  51. WinHttpGetIEProxyConfigForCurrentUser
  52. (
  53. IN OUT WINHTTP_CURRENT_USER_IE_PROXY_CONFIG * pProxyConfig
  54. )
  55. {
  56. SetLastError(ERROR_PROC_NOT_FOUND);
  57. return FALSE;
  58. }
  59. static
  60. BOOLAPI
  61. WinHttpGetProxyForUrl
  62. (
  63. IN HINTERNET hSession,
  64. IN LPCWSTR lpcwszUrl,
  65. IN WINHTTP_AUTOPROXY_OPTIONS * pAutoProxyOptions,
  66. OUT WINHTTP_PROXY_INFO * pProxyInfo
  67. )
  68. {
  69. SetLastError(ERROR_PROC_NOT_FOUND);
  70. return FALSE;
  71. }
  72. static
  73. WINHTTPAPI
  74. HINTERNET
  75. WINAPI
  76. WinHttpOpen
  77. (
  78. IN LPCWSTR pwszUserAgent,
  79. IN DWORD dwAccessType,
  80. IN LPCWSTR pwszProxyName OPTIONAL,
  81. IN LPCWSTR pwszProxyBypass OPTIONAL,
  82. IN DWORD dwFlags
  83. )
  84. {
  85. SetLastError(ERROR_PROC_NOT_FOUND);
  86. return NULL;
  87. }
  88. static
  89. WINHTTPAPI
  90. HINTERNET
  91. WINAPI
  92. WinHttpOpenRequest
  93. (
  94. IN HINTERNET hConnect,
  95. IN LPCWSTR pwszVerb,
  96. IN LPCWSTR pwszObjectName,
  97. IN LPCWSTR pwszVersion,
  98. IN LPCWSTR pwszReferrer OPTIONAL,
  99. IN LPCWSTR FAR * ppwszAcceptTypes OPTIONAL,
  100. IN DWORD dwFlags
  101. )
  102. {
  103. SetLastError(ERROR_PROC_NOT_FOUND);
  104. return NULL;
  105. }
  106. static
  107. BOOLAPI WinHttpQueryAuthSchemes
  108. (
  109. IN HINTERNET hRequest, // HINTERNET handle returned by WinHttpOpenRequest
  110. OUT LPDWORD lpdwSupportedSchemes, // a bitmap of available Authentication Schemes
  111. OUT LPDWORD lpdwPreferredScheme, // WinHttp's preferred Authentication Method
  112. OUT LPDWORD pdwAuthTarget
  113. )
  114. {
  115. SetLastError(ERROR_PROC_NOT_FOUND);
  116. return FALSE;
  117. }
  118. static
  119. BOOLAPI
  120. WinHttpQueryDataAvailable
  121. (
  122. IN HINTERNET hRequest,
  123. OUT LPDWORD lpdwNumberOfBytesAvailable OPTIONAL
  124. )
  125. {
  126. SetLastError(ERROR_PROC_NOT_FOUND);
  127. return FALSE;
  128. }
  129. static
  130. BOOLAPI
  131. WinHttpQueryHeaders
  132. (
  133. IN HINTERNET hRequest,
  134. IN DWORD dwInfoLevel,
  135. IN LPCWSTR pwszName OPTIONAL,
  136. OUT LPVOID lpBuffer OPTIONAL,
  137. IN OUT LPDWORD lpdwBufferLength,
  138. IN OUT LPDWORD lpdwIndex OPTIONAL
  139. )
  140. {
  141. SetLastError(ERROR_PROC_NOT_FOUND);
  142. return FALSE;
  143. }
  144. static
  145. BOOLAPI
  146. WinHttpQueryOption
  147. (
  148. IN HINTERNET hInternet,
  149. IN DWORD dwOption,
  150. OUT LPVOID lpBuffer OPTIONAL,
  151. IN OUT LPDWORD lpdwBufferLength
  152. )
  153. {
  154. SetLastError(ERROR_PROC_NOT_FOUND);
  155. return FALSE;
  156. }
  157. BOOLAPI
  158. WinHttpReadData
  159. (
  160. IN HINTERNET hRequest,
  161. IN LPVOID lpBuffer,
  162. IN DWORD dwNumberOfBytesToRead,
  163. OUT LPDWORD lpdwNumberOfBytesRead
  164. )
  165. {
  166. SetLastError(ERROR_PROC_NOT_FOUND);
  167. return FALSE;
  168. }
  169. static
  170. WINHTTPAPI
  171. BOOL
  172. WINAPI
  173. WinHttpReceiveResponse
  174. (
  175. IN HINTERNET hRequest,
  176. IN LPVOID lpReserved
  177. )
  178. {
  179. SetLastError(ERROR_PROC_NOT_FOUND);
  180. return FALSE;
  181. }
  182. static
  183. BOOLAPI
  184. WinHttpSendRequest
  185. (
  186. IN HINTERNET hRequest,
  187. IN LPCWSTR pwszHeaders OPTIONAL,
  188. IN DWORD dwHeadersLength,
  189. IN LPVOID lpOptional OPTIONAL,
  190. IN DWORD dwOptionalLength,
  191. IN DWORD dwTotalLength,
  192. IN DWORD_PTR dwContext
  193. )
  194. {
  195. SetLastError(ERROR_PROC_NOT_FOUND);
  196. return FALSE;
  197. }
  198. static
  199. BOOLAPI WinHttpSetCredentials
  200. (
  201. IN HINTERNET hRequest, // HINTERNET handle returned by WinHttpOpenRequest.
  202. IN DWORD AuthTargets, // Only WINHTTP_AUTH_TARGET_SERVER and
  203. // WINHTTP_AUTH_TARGET_PROXY are supported
  204. // in this version and they are mutually
  205. // exclusive
  206. IN DWORD AuthScheme, // must be one of the supported Auth Schemes
  207. // returned from WinHttpQueryAuthSchemes(), Apps
  208. // should use the Preferred Scheme returned
  209. IN LPCWSTR pwszUserName, // 1) NULL if default creds is to be used, in
  210. // which case pszPassword will be ignored
  211. IN LPCWSTR pwszPassword, // 1) "" == Blank Password; 2)Parameter ignored
  212. // if pszUserName is NULL; 3) Invalid to pass in
  213. // NULL if pszUserName is not NULL
  214. IN LPVOID pAuthParams
  215. )
  216. {
  217. SetLastError(ERROR_PROC_NOT_FOUND);
  218. return FALSE;
  219. }
  220. static
  221. BOOLAPI
  222. WinHttpSetOption
  223. (
  224. IN HINTERNET hInternet,
  225. IN DWORD dwOption,
  226. IN LPVOID lpBuffer,
  227. IN DWORD dwBufferLength
  228. )
  229. {
  230. SetLastError(ERROR_PROC_NOT_FOUND);
  231. return FALSE;
  232. }
  233. static
  234. WINHTTPAPI
  235. WINHTTP_STATUS_CALLBACK
  236. WINAPI
  237. WinHttpSetStatusCallback
  238. (
  239. IN HINTERNET hInternet,
  240. IN WINHTTP_STATUS_CALLBACK lpfnInternetCallback,
  241. IN DWORD dwNotificationFlags,
  242. IN DWORD_PTR dwReserved
  243. )
  244. {
  245. SetLastError(ERROR_PROC_NOT_FOUND);
  246. return NULL;
  247. }
  248. static
  249. BOOLAPI
  250. WinHttpSetTimeouts
  251. (
  252. IN HINTERNET hInternet, // Session/Request handle.
  253. IN int nResolveTimeout,
  254. IN int nConnectTimeout,
  255. IN int nSendTimeout,
  256. IN int nReceiveTimeout
  257. )
  258. {
  259. SetLastError(ERROR_PROC_NOT_FOUND);
  260. return FALSE;
  261. }
  262. //
  263. // !! WARNING !! The entries below must be in alphabetical order,
  264. // and are CASE SENSITIVE (eg lower case comes last!)
  265. //
  266. DEFINE_PROCNAME_ENTRIES(winhttp)
  267. {
  268. DLPENTRY(WinHttpCloseHandle)
  269. DLPENTRY(WinHttpConnect)
  270. DLPENTRY(WinHttpCrackUrl)
  271. DLPENTRY(WinHttpGetDefaultProxyConfiguration)
  272. DLPENTRY(WinHttpGetIEProxyConfigForCurrentUser)
  273. DLPENTRY(WinHttpGetProxyForUrl)
  274. DLPENTRY(WinHttpOpen)
  275. DLPENTRY(WinHttpOpenRequest)
  276. DLPENTRY(WinHttpQueryAuthSchemes)
  277. DLPENTRY(WinHttpQueryDataAvailable)
  278. DLPENTRY(WinHttpQueryHeaders)
  279. DLPENTRY(WinHttpQueryOption)
  280. DLPENTRY(WinHttpReadData)
  281. DLPENTRY(WinHttpReceiveResponse)
  282. DLPENTRY(WinHttpSendRequest)
  283. DLPENTRY(WinHttpSetCredentials)
  284. DLPENTRY(WinHttpSetOption)
  285. DLPENTRY(WinHttpSetStatusCallback)
  286. DLPENTRY(WinHttpSetTimeouts)
  287. };
  288. DEFINE_PROCNAME_MAP(winhttp)