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.

539 lines
19 KiB

  1. /*
  2. * unixwrap.cxx
  3. *
  4. * Purpose:
  5. * Implementation of Functions, to overcome following problems
  6. * On Unix:
  7. *
  8. * 1. Unix map files do not support statments such as
  9. * InternetTimeFromSystemTimeA
  10. * InternetTimeFromSystemTimeW
  11. * InternetTimeFromSystemTime=InternetTimeFromSystemTimeA
  12. * 2. Delay loading of functions.
  13. *
  14. * Functions:
  15. * InternetTimeFromSystemTime
  16. * InternetTimeToSystemTime
  17. * InternetSetStatusCallback
  18. * InternetConfirmZoneCrossing
  19. * UnlockUrlCacheEntryFile
  20. * DeleteUrlCacheEntry
  21. * SetUrlCacheEntryGroup
  22. * InternetShowSecurityInfoByURL
  23. * InternetDial
  24. * InternetSetDialState
  25. * InternetGoOnline
  26. * InternetGetConnectedStateEx
  27. * InternetGetCertByURL
  28. *
  29. * ----- CRYPT32 Wrappers -------------------
  30. * CryptDecodeObject
  31. * CertFindRDNAttr
  32. * CertFreeCertificateContext
  33. * CryptGetProvParam
  34. * CertCreateCertificateContext
  35. * CertSetCertificateContextProperty
  36. * CertGetCertificateContextProperty
  37. * CertNameToStrA
  38. * CryptSetProvParam
  39. * CertRDNValueToStrA
  40. * CryptReleaseContext
  41. * CertDuplicateCertificateContext
  42. * CertCloseStore
  43. * CertControlStore
  44. * CertOpenSystemStoreA
  45. * CryptAcquireContextA
  46. * CertFindCertificateInStore
  47. */
  48. #include <wininetp.h>
  49. /*****************************************************************************/
  50. /*================= Begin of the delay loading definitions ==================*/
  51. /*****************************************************************************/
  52. /*
  53. * Delay loading mechanism. This allows you to write code as if you are
  54. * calling implicitly linked APIs, and yet have these APIs really be
  55. * explicitly linked. You can reduce the initial number of DLLs that
  56. * are loaded (load on demand) using this technique.
  57. *
  58. * Use the following macros to indicate which APIs/DLLs are delay-linked
  59. * and -loaded.
  60. *
  61. * DELAY_LOAD
  62. * DELAY_LOAD_HRESULT
  63. * DELAY_LOAD_SAFEARRAY
  64. * DELAY_LOAD_UINT
  65. * DELAY_LOAD_INT
  66. * DELAY_LOAD_VOID
  67. *
  68. */
  69. #define ENSURE_LOADED(_hmod, _dll, _ext, pszfn) \
  70. (_hmod ? (_hmod) : (_hmod = LoadLibraryA(#_dll "." #_ext)))
  71. void _GetProcFromDLL(HMODULE* phmod, LPCSTR pszDLL, FARPROC* ppfn, LPCSTR pszProc)
  72. {
  73. /*
  74. * If it's already loaded, return.
  75. */
  76. if (*ppfn) {
  77. return;
  78. }
  79. if (*phmod == NULL)
  80. {
  81. *phmod = LoadLibraryA(pszDLL);
  82. if (*phmod == NULL)
  83. {
  84. return;
  85. }
  86. }
  87. *ppfn = GetProcAddress(*phmod, pszProc);
  88. }
  89. /*
  90. * NOTE: this takes two parameters that are the function name.
  91. * the First (_fn) is the name that the function will be called in
  92. * this DLL and the other (_fni) is the name of the function we
  93. * will GetProcAddress. This helps get around functions that
  94. * are defined in the header files with _declspec...
  95. *
  96. * HMODULE _hmod - where we cache the HMODULE (aka HINSTANCE)
  97. * _dll - Basename of the target DLL, not quoted
  98. * _ext - Extension of the target DLL, not quoted (usually DLL)
  99. * _ret - Data type of return value
  100. * _fnpriv - Local name for the function
  101. * _fn - Exported name for the function
  102. * _args - Argument list in the form (TYPE1 arg1, TYPE2 arg2, ...)
  103. * _nargs - Argument list in the form (arg1, arg2, ...)
  104. * _err - Return value if we can't call the actual function
  105. */
  106. #define DELAY_LOAD_NAME_EXT_ERR(_hmod, _dll, _ext, _ret, _fnpriv, _fn, _args, _nargs, _err) \
  107. _ret __stdcall _fnpriv _args \
  108. { \
  109. static _ret (__stdcall *_pfn##_fn) _args = NULL; \
  110. _GetProcFromDLL(&_hmod, #_dll "." #_ext, (FARPROC*)&_pfn##_fn, #_fn); \
  111. if (_pfn##_fn) \
  112. return _pfn##_fn _nargs; \
  113. return (_ret)_err; \
  114. }
  115. #define DELAY_LOAD_NAME_ERR(_hmod, _dll, _ret, _fnpriv, _fn, _args, _nargs, _err) \
  116. DELAY_LOAD_NAME_EXT_ERR(_hmod, _dll, DLL, _ret, _fnpriv, _fn, _args, _nargs, _err)
  117. #define DELAY_LOAD_ERR(_hmod, _dll, _ret, _fn, _args, _nargs, _err) \
  118. DELAY_LOAD_NAME_ERR(_hmod, _dll, _ret, _fn, _fn, _args, _nargs, _err)
  119. #define DELAY_LOAD(_hmod, _dll, _ret, _fn, _args, _nargs) \
  120. DELAY_LOAD_ERR(_hmod, _dll, _ret, _fn, _args, _nargs, 0)
  121. #define DELAY_LOAD_HRESULT(_hmod, _dll, _fn, _args, _nargs) \
  122. DELAY_LOAD_ERR(_hmod, _dll, HRESULT, _fn, _args, _nargs, E_FAIL)
  123. #define DELAY_LOAD_SAFEARRAY(_hmod, _dll, _fn, _args, _nargs) \
  124. DELAY_LOAD_ERR(_hmod, _dll, SAFEARRAY *, _fn, _args, _nargs, NULL)
  125. #define DELAY_LOAD_UINT(_hmod, _dll, _fn, _args, _nargs) \
  126. DELAY_LOAD_ERR(_hmod, _dll, UINT, _fn, _args, _nargs, 0)
  127. #define DELAY_LOAD_INT(_hmod, _dll, _fn, _args, _nargs) \
  128. DELAY_LOAD_ERR(_hmod, _dll, INT, _fn, _args, _nargs, 0)
  129. #define DELAY_LOAD_BOOL(_hmod, _dll, _fn, _args, _nargs) \
  130. DELAY_LOAD_ERR(_hmod, _dll, BOOL, _fn, _args, _nargs, FALSE)
  131. #define DELAY_LOAD_BOOLEAN(_hmod, _dll, _fn, _args, _nargs) \
  132. DELAY_LOAD_ERR(_hmod, _dll, BOOLEAN, _fn, _args, _nargs, FALSE)
  133. #define DELAY_LOAD_DWORD(_hmod, _dll, _fn, _args, _nargs) \
  134. DELAY_LOAD_ERR(_hmod, _dll, DWORD, _fn, _args, _nargs, FALSE)
  135. #define DELAY_LOAD_WNET(_hmod, _dll, _fn, _args, _nargs) \
  136. DELAY_LOAD_ERR(_hmod, _dll, DWORD, _fn, _args, _nargs, WN_NOT_SUPPORTED)
  137. /*
  138. * the NAME variants allow the local function to be called something different from the imported
  139. * function to avoid dll linkage problems.
  140. */
  141. #define DELAY_LOAD_NAME(_hmod, _dll, _ret, _fn, _fni, _args, _nargs) \
  142. DELAY_LOAD_NAME_ERR(_hmod, _dll, _ret, _fn, _fni, _args, _nargs, 0)
  143. #define DELAY_LOAD_NAME_HRESULT(_hmod, _dll, _fn, _fni, _args, _nargs) \
  144. DELAY_LOAD_NAME_ERR(_hmod, _dll, HRESULT, _fn, _fni, _args, _nargs, E_FAIL)
  145. #define DELAY_LOAD_NAME_SAFEARRAY(_hmod, _dll, _fn, _fni, _args, _nargs) \
  146. DELAY_LOAD_NAME_ERR(_hmod, _dll, SAFEARRAY *, _fn, _fni, _args, _nargs, NULL)
  147. #define DELAY_LOAD_NAME_UINT(_hmod, _dll, _fn, _fni, _args, _nargs) \
  148. DELAY_LOAD_NAME_ERR(_hmod, _dll, UINT, _fn, _fni, _args, _nargs, 0)
  149. #define DELAY_LOAD_NAME_BOOL(_hmod, _dll, _fn, _fni, _args, _nargs) \
  150. DELAY_LOAD_NAME_ERR(_hmod, _dll, BOOL, _fn, _fni, _args, _nargs, FALSE)
  151. #define DELAY_LOAD_NAME_DWORD(_hmod, _dll, _fn, _fni, _args, _nargs) \
  152. DELAY_LOAD_NAME_ERR(_hmod, _dll, DWORD, _fn, _fni, _args, _nargs, 0)
  153. #define DELAY_LOAD_NAME_VOID(_hmod, _dll, _fn, _fni, _args, _nargs) \
  154. void __stdcall _fn _args \
  155. { \
  156. static void (__stdcall *_pfn##_fni) _args = NULL; \
  157. if (!ENSURE_LOADED(_hmod, _dll, DLL, TEXT(#_fni))) \
  158. { \
  159. AssertMsg(BOOLFROMPTR(_hmod), TEXT("LoadLibrary failed on ") ## TEXT(#_dll)); \
  160. return; \
  161. } \
  162. if (_pfn##_fni == NULL) \
  163. { \
  164. *(FARPROC*)&(_pfn##_fni) = GetProcAddress(_hmod, #_fni); \
  165. AssertMsg(BOOLFROMPTR(_pfn##_fni), TEXT("GetProcAddress failed on ") ## TEXT(#_fni)); \
  166. if (_pfn##_fni == NULL) \
  167. return; \
  168. } \
  169. _pfn##_fni _nargs; \
  170. }
  171. #define DELAY_LOAD_VOID(_hmod, _dll, _fn, _args, _nargs) \
  172. DELAY_LOAD_NAME_VOID(_hmod, _dll, _fn, _fn, _args, _nargs)
  173. #define DELAY_LOAD_EXT(_hmod, _dll, _ext, _ret, _fn, _args, _nargs) \
  174. DELAY_LOAD_NAME_EXT_ERR(_hmod, _dll, _ext, _ret, _fn, _fn, _args, _nargs, 0)
  175. /*****************************************************************************/
  176. /*================= End of the delay loading definitions ==================*/
  177. /*****************************************************************************/
  178. /*************************************/
  179. /*=== Begin: Wrappers for CRYPT32 ===*/
  180. /*************************************/
  181. HINSTANCE g_hinstCRYPT32 = NULL;
  182. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, BOOL, CryptDecodeObject,
  183. (DWORD dwCertEncodingType, LPCSTR lpszStructType, const BYTE* pbEncoded, DWORD cbEncoded, DWORD dwFlags, void* pvStructInfo, DWORD *pcbStructInfo),
  184. (dwCertEncodingType, lpszStructType, pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo ))
  185. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, PCERT_RDN_ATTR, CertFindRDNAttr,
  186. (LPCSTR pszObjId, PCERT_NAME_INFO pName), (pszObjId, pName))
  187. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, BOOL, CertFreeCertificateContext,
  188. (PCCERT_CONTEXT pCertContext), (pCertContext))
  189. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, BOOL, CryptGetProvParam,
  190. (HCRYPTPROV hProv, DWORD dwParam, BYTE* pbData, DWORD* pdwDataLen, DWORD dwFlags), (hProv, dwParam, pbData, pdwDataLen, dwFlags))
  191. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, PCCERT_CONTEXT, CertCreateCertificateContext,
  192. (DWORD dwCertEncodingType, const BYTE* pbCertEncoded, DWORD cbCertEncoded),
  193. (dwCertEncodingType, pbCertEncoded, cbCertEncoded))
  194. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, BOOL, CertSetCertificateContextProperty,
  195. (PCCERT_CONTEXT pCertContext, DWORD dwPropId, DWORD dwFlags, const void* pvData), (pCertContext, dwPropId, dwFlags, pvData))
  196. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, BOOL, CertGetCertificateContextProperty,
  197. (PCCERT_CONTEXT pCertContext, DWORD dwPropId, void* pvData, DWORD* pcbData),
  198. (pCertContext, dwPropId, pvData, pcbData))
  199. #ifdef UNICODE
  200. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, DWORD, CertNameToStrW,
  201. (DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, DWORD dwStrType, LPWSTR psz, DWORD csz),
  202. (dwCertEncodingType, pName, dwStrType, psz, csz))
  203. #else
  204. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, DWORD, CertNameToStrA,
  205. (DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, DWORD dwStrType, LPSTR psz, DWORD csz),
  206. (dwCertEncodingType, pName, dwStrType, psz, csz))
  207. #endif /* UNICODE */
  208. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, BOOL, CryptSetProvParam,
  209. (HCRYPTPROV hProv, DWORD dwParam, BYTE* pbData, DWORD dwFlags),
  210. (hProv, dwParam, pbData, dwFlags))
  211. #ifdef UNICODE
  212. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, DWORD, CertRDNValueToStrW,
  213. (DWORD dwValueType, PCERT_RDN_VALUE_BLOB pValue, LPWSTR psz, DWORD csz),
  214. (dwValueType, pValue, psz, csz))
  215. #else
  216. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, DWORD, CertRDNValueToStrA,
  217. (DWORD dwValueType, PCERT_RDN_VALUE_BLOB pValue, LPSTR psz, DWORD csz),
  218. (dwValueType, pValue, psz, csz))
  219. #endif /* UNICODE */
  220. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, BOOL, CryptReleaseContext,
  221. (HCRYPTPROV hProv, DWORD dwFlags), (hProv, dwFlags))
  222. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, PCCERT_CONTEXT, CertDuplicateCertificateContext,
  223. (PCCERT_CONTEXT pCertContext), (pCertContext))
  224. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, BOOL, CertCloseStore,
  225. (HCERTSTORE hCertStore, DWORD dwFlags), (hCertStore, dwFlags))
  226. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, BOOL, CertControlStore,
  227. (HCERTSTORE hCertStore, DWORD dwFlags, DWORD dwCtrlType, void const* pvCtrlPara),
  228. (hCertStore, dwFlags, dwCtrlType, pvCtrlPara))
  229. #ifdef UNICODE
  230. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, HCERTSTORE, CertOpenSystemStoreW,
  231. (HCRYPTPROV hProv, LPCWSTR szSubsystemProtocol),
  232. (hProv, szSubsystemProtocol))
  233. #else
  234. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, HCERTSTORE, CertOpenSystemStoreA,
  235. (HCRYPTPROV hProv, LPCSTR szSubsystemProtocol),
  236. (hProv, szSubsystemProtocol))
  237. #endif /* UNICODE */
  238. #ifdef UNICODE
  239. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, BOOL, CryptAcquireContextW,
  240. (HCRYPTPROV* phProv, LPCWSTR pszContainer, LPCWSTR pszProvider, DWORD dwProvType, DWORD dwFlags),
  241. (phProv, pszContainer, pszProvider, dwProvType, dwFlags))
  242. #else
  243. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, BOOL, CryptAcquireContextA,
  244. (HCRYPTPROV* phProv, LPCSTR pszContainer, LPCSTR pszProvider, DWORD dwProvType, DWORD dwFlags),
  245. (phProv, pszContainer, pszProvider, dwProvType, dwFlags))
  246. #endif /* UNICODE */
  247. DELAY_LOAD(g_hinstCRYPT32, CRYPT32, PCCERT_CONTEXT, CertFindCertificateInStore,
  248. (HCERTSTORE hCertStore, DWORD dwCertEncodingType, DWORD dwFindFlags, DWORD dwFindType, const void* pvFindPara, PCCERT_CONTEXT pPrevCertContext),
  249. (hCertStore, dwCertEncodingType, dwFindFlags, dwFindType, pvFindPara, pPrevCertContext))
  250. /*************************************/
  251. /*=== End: Wrappers for CRYPT32 ===*/
  252. /*************************************/
  253. /* In wininet.def, we don't support statements like
  254. * InternetTimeFromSystemTime=InternetTimeFromSystemTimeA
  255. * So, on Unix, we create a wrapper for InternetTimeFromSystemTime which will
  256. * call the corresponding ANSI function.
  257. *
  258. * The following are all such wrappers ----
  259. */
  260. extern "C" {
  261. #ifdef InternetTimeFromSystemTime
  262. #undef InternetTimeFromSystemTime
  263. #endif
  264. INTERNETAPI_(BOOL) InternetTimeFromSystemTime(
  265. IN CONST SYSTEMTIME *pst, // input GMT time
  266. IN DWORD dwRFC, // RFC format: must be FORMAT_RFC1123
  267. OUT LPSTR lpszTime, // output string buffer
  268. IN DWORD cbTime // output buffer size
  269. ) {
  270. return InternetTimeFromSystemTimeA(pst, dwRFC, lpszTime, cbTime);
  271. }
  272. #ifdef InternetTimeToSystemTime
  273. #undef InternetTimeToSystemTime
  274. #endif
  275. INTERNETAPI_(BOOL) InternetTimeToSystemTime(
  276. IN LPCSTR lpcszTimeString,
  277. OUT SYSTEMTIME *lpSysTime,
  278. IN DWORD dwReserved )
  279. {
  280. return InternetTimeToSystemTimeA(lpcszTimeString, lpSysTime, dwReserved);
  281. }
  282. #ifdef InternetSetStatusCallback
  283. #undef InternetSetStatusCallback
  284. #endif
  285. INTERNETAPI_(BOOL) InternetSetStatusCallback(
  286. IN HINTERNET hInternet,
  287. IN INTERNET_STATUS_CALLBACK lpfnInternetCallback
  288. )
  289. {
  290. return InternetSetStatusCallbackA(hInternet, lpfnInternetCallback);
  291. }
  292. #ifdef InternetConfirmZoneCrossing
  293. #undef InternetConfirmZoneCrossing
  294. #endif
  295. INTERNETAPI_(BOOL) InternetConfirmZoneCrossing(
  296. IN HWND hWnd,
  297. IN LPSTR szUrlPrev,
  298. IN LPSTR szUrlNew,
  299. BOOL bPost
  300. )
  301. {
  302. return InternetConfirmZoneCrossingA(hWnd, szUrlPrev, szUrlNew, bPost);
  303. }
  304. #ifdef UnlockUrlCacheEntryFile
  305. #undef UnlockUrlCacheEntryFile
  306. #endif
  307. URLCACHEAPI_(BOOL) UnlockUrlCacheEntryFile(
  308. LPCSTR lpszUrlName,
  309. IN DWORD dwReserved
  310. )
  311. {
  312. return UnlockUrlCacheEntryFileA(lpszUrlName,dwReserved);
  313. }
  314. #ifdef DeleteUrlCacheEntry
  315. #undef DeleteUrlCacheEntry
  316. #endif
  317. URLCACHEAPI_(BOOL) DeleteUrlCacheEntry(
  318. IN LPCSTR lpszUrlName
  319. )
  320. {
  321. return DeleteUrlCacheEntryA(lpszUrlName);
  322. }
  323. #ifdef SetUrlCacheEntryGroup
  324. #undef SetUrlCacheEntryGroup
  325. #endif
  326. BOOLAPI SetUrlCacheEntryGroup(
  327. IN LPCSTR lpszUrlName,
  328. IN DWORD dwFlags,
  329. IN GROUPID GroupId,
  330. IN LPBYTE pbGroupAttributes, // must pass NULL
  331. IN DWORD cbGroupAttributes, // must pass 0
  332. IN LPVOID lpReserved // must pass NULL
  333. )
  334. {
  335. return SetUrlCacheEntryGroupA(lpszUrlName, dwFlags, GroupId, pbGroupAttributes,
  336. cbGroupAttributes, lpReserved);
  337. }
  338. #ifdef InternetShowSecurityInfoByURL
  339. #undef InternetShowSecurityInfoByURL
  340. #endif
  341. INTERNETAPI_(BOOL) InternetShowSecurityInfoByURL(
  342. IN LPSTR lpszURL,
  343. IN HWND hwndRootWindow
  344. )
  345. {
  346. return InternetShowSecurityInfoByURLA(lpszURL, hwndRootWindow);
  347. }
  348. #ifdef InternetDial
  349. #undef InternetDial
  350. #endif
  351. DWORD InternetDial(HWND hwndParent, LPSTR pszConnectoid, DWORD dwFlags,
  352. LPDWORD lpdwConnection, DWORD dwReserved)
  353. {
  354. return InternetDialA(hwndParent, pszConnectoid, dwFlags, lpdwConnection, dwReserved);
  355. }
  356. #ifdef InternetSetDialState
  357. #undef InternetSetDialState
  358. #endif
  359. BOOLAPI InternetSetDialState(LPCSTR lpszConnectoid, DWORD dwState, DWORD dwReserved)
  360. {
  361. return InternetSetDialStateA(lpszConnectoid, dwState, dwReserved);
  362. }
  363. #ifdef InternetGoOnline
  364. #undef InternetGoOnline
  365. #endif
  366. BOOLAPI InternetGoOnline(LPSTR lpszURL, HWND hwndParent, DWORD dwFlags)
  367. {
  368. return InternetGoOnlineA(lpszURL, hwndParent, dwFlags);
  369. }
  370. #ifdef InternetGetConnectedStateEx
  371. #undef InternetGetConnectedStateEx
  372. #endif
  373. BOOL InternetGetConnectedStateEx(
  374. LPDWORD lpdwFlags,
  375. LPSTR lpszConnectionName,
  376. DWORD dwBufLen,
  377. DWORD dwReserved)
  378. {
  379. return InternetGetConnectedStateExA(lpdwFlags, lpszConnectionName, dwBufLen, dwReserved);
  380. }
  381. #ifdef InternetGetCertByURL
  382. #undef InternetGetCertByURL
  383. #endif
  384. INTERNETAPI_(BOOL) InternetGetCertByURLA(
  385. IN LPSTR lpszURL,
  386. IN OUT LPSTR lpszCertText,
  387. OUT DWORD dwcbCertText
  388. );
  389. INTERNETAPI_(BOOL) InternetGetCertByURL(
  390. IN LPSTR lpszURL,
  391. IN OUT LPSTR lpszCertText,
  392. OUT DWORD dwcbCertText
  393. )
  394. {
  395. return InternetGetCertByURLA(lpszURL, lpszCertText, dwcbCertText);
  396. }
  397. #ifdef HttpCheckDavCompliance
  398. #undef HttpCheckDavCompliance
  399. #endif
  400. INTERNETAPI_(BOOL) HttpCheckDavComplianceA(
  401. IN LPCSTR lpszUrl,
  402. IN LPCSTR lpszComplianceToken,
  403. IN OUT LPBOOL lpfFound,
  404. IN HWND hWnd,
  405. IN LPVOID lpvReserved
  406. );
  407. INTERNETAPI_(BOOL) HttpCheckDavCompliance(
  408. IN LPCSTR lpszUrl,
  409. IN LPCSTR lpszComplianceToken,
  410. IN OUT LPBOOL lpfFound,
  411. IN HWND hWnd,
  412. IN LPVOID lpvReserved
  413. )
  414. {
  415. return HttpCheckDavComplianceA(lpszUrl,
  416. lpszComplianceToken,
  417. lpfFound,
  418. hWnd,
  419. lpvReserved);
  420. }
  421. #ifdef DAVCACHING // commenting out as per bug 15696
  422. #ifdef HttpCheckCachedDavStatus
  423. #undef HttpCheckCachedDavStatus
  424. #endif
  425. INTERNETAPI_(BOOL) HttpCheckCachedDavStatusA(
  426. IN LPCSTR lpszUrl,
  427. IN OUT LPDWORD lpdwStatus
  428. );
  429. INTERNETAPI_(BOOL) HttpCheckCachedDavStatus(
  430. IN LPCSTR lpszUrl,
  431. IN OUT LPDWORD lpdwStatus
  432. )
  433. {
  434. return HttpCheckCachedDavStatusA(lpszUrl, lpdwStatus);
  435. }
  436. #endif /* DAVCACHING */
  437. #ifndef UNIX_BUILDS_AUTOPROXY_DETECT
  438. /* Stub function if apdetect is not included in build */
  439. STDAPI_(BOOL)
  440. DetectAutoProxyUrl(
  441. IN OUT LPSTR lpszAutoProxyUrl,
  442. IN DWORD dwAutoProxyUrlLength,
  443. IN DWORD dwDetectFlags
  444. )
  445. {
  446. return FALSE;
  447. }
  448. #endif /* UNIX_BUIDS_AUTOPROXY_DETECT */
  449. }