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.

481 lines
11 KiB

  1. #include "inetcorepch.h"
  2. #pragma hdrstop
  3. #include <urlmon.h>
  4. #undef STDAPI
  5. #define STDAPI HRESULT STDAPICALLTYPE
  6. #undef STDAPI_
  7. #define STDAPI_(type) type STDAPICALLTYPE
  8. static
  9. STDAPI CoInternetGetSession(DWORD dwSessionMode,
  10. IInternetSession **ppIInternetSession,
  11. DWORD dwReserved)
  12. {
  13. *ppIInternetSession = NULL;
  14. return E_OUTOFMEMORY;
  15. }
  16. static
  17. STDAPI RevokeBindStatusCallback(LPBC pBC,
  18. IBindStatusCallback *pBSCb)
  19. {
  20. return E_FAIL;
  21. }
  22. static
  23. STDAPI CreateURLMoniker(LPMONIKER pMkCtx,
  24. LPCWSTR szURL,
  25. LPMONIKER FAR * ppmk)
  26. {
  27. *ppmk = NULL;
  28. return E_OUTOFMEMORY;
  29. }
  30. static
  31. STDAPI HlinkNavigateString(IUnknown *pUnk,
  32. LPCWSTR szTarget)
  33. {
  34. return E_FAIL;
  35. }
  36. static
  37. STDAPI HlinkSimpleNavigateToString (
  38. LPCWSTR szTarget,
  39. LPCWSTR szLocation,
  40. LPCWSTR szTargetFrame,
  41. IUnknown *pUnk,
  42. IBindCtx *pBndctx,
  43. IBindStatusCallback * pBscb,
  44. DWORD grfHLNF,
  45. DWORD dwReserved
  46. )
  47. {
  48. return E_FAIL;
  49. }
  50. static
  51. STDAPI RegisterBindStatusCallback(LPBC pBC,
  52. IBindStatusCallback *pBSCb,
  53. IBindStatusCallback** ppBSCBPrev,
  54. DWORD dwReserved)
  55. {
  56. return E_OUTOFMEMORY;
  57. }
  58. static
  59. HRESULT WINAPI
  60. UrlMkGetSessionOption(DWORD dwOption,
  61. LPVOID pBuffer,
  62. DWORD dwBufferLength,
  63. DWORD *pdwBufferLength,
  64. DWORD dwReserved)
  65. {
  66. return E_FAIL;
  67. }
  68. STDAPI
  69. UrlMkSetSessionOption(DWORD dwOption,
  70. LPVOID pBuffer,
  71. DWORD dwBufferLength,
  72. DWORD dwReserved)
  73. {
  74. return E_FAIL;
  75. }
  76. static
  77. STDAPI
  78. CoInternetQueryInfo(LPCWSTR pwzUrl,
  79. QUERYOPTION QueryOptions,
  80. DWORD dwQueryFlags,
  81. LPVOID pvBuffer,
  82. DWORD cbBuffer,
  83. DWORD *pcbBuffer,
  84. DWORD dwReserved)
  85. {
  86. return E_FAIL;
  87. }
  88. static
  89. HRESULT WINAPI
  90. CreateFormatEnumerator(UINT cfmtetc,
  91. FORMATETC* rgfmtetc,
  92. IEnumFORMATETC** ppenumfmtetc)
  93. {
  94. return E_FAIL;
  95. }
  96. static
  97. STDAPI
  98. URLDownloadToFileA(LPUNKNOWN caller,
  99. LPCSTR szURL,
  100. LPCSTR szFileName,
  101. DWORD dwReserved,
  102. LPBINDSTATUSCALLBACK callback)
  103. {
  104. return E_OUTOFMEMORY;
  105. }
  106. static
  107. STDAPI
  108. URLDownloadToFileW(LPUNKNOWN caller,
  109. LPCWSTR szURL,
  110. LPCWSTR szFileName,
  111. DWORD dwReserved,
  112. LPBINDSTATUSCALLBACK callback)
  113. {
  114. return E_OUTOFMEMORY;
  115. }
  116. static
  117. STDAPI
  118. FaultInIEFeature(HWND hWnd,
  119. uCLSSPEC *pClassSpec,
  120. QUERYCONTEXT *pQuery,
  121. DWORD dwFlags)
  122. {
  123. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  124. }
  125. static
  126. STDAPI
  127. CoInternetParseUrl(LPCWSTR pwzUrl,
  128. PARSEACTION ParseAction,
  129. DWORD dwFlags,
  130. LPWSTR pszResult,
  131. DWORD cchResult,
  132. DWORD *pcchResult,
  133. DWORD dwReserved)
  134. {
  135. return E_FAIL;
  136. }
  137. static
  138. STDAPI
  139. GetSoftwareUpdateInfo(LPCWSTR szDistUnit,
  140. LPSOFTDISTINFO psdi)
  141. {
  142. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  143. }
  144. static
  145. STDAPI SetSoftwareUpdateAdvertisementState(LPCWSTR szDistUnit,
  146. DWORD dwAdState,
  147. DWORD dwAdvertisedVersionMS,
  148. DWORD dwAdvertisedVersionLS)
  149. {
  150. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  151. }
  152. static
  153. STDAPI
  154. CoInternetCreateSecurityManager(IServiceProvider* pSP,
  155. IInternetSecurityManager** ppSM,
  156. DWORD dwReserved)
  157. {
  158. *ppSM = NULL;
  159. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  160. }
  161. static
  162. STDAPI
  163. GetMarkOfTheWeb(LPCSTR pszURL,
  164. LPCSTR pszFile,
  165. DWORD dwFlags,
  166. LPSTR *ppszMark)
  167. {
  168. *ppszMark = NULL;
  169. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  170. }
  171. static
  172. STDAPI
  173. URLOpenBlockingStreamW(LPUNKNOWN caller,
  174. LPCWSTR szURL,
  175. LPSTREAM* ppStream,
  176. DWORD dwReserved,
  177. LPBINDSTATUSCALLBACK callback)
  178. {
  179. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  180. }
  181. static
  182. STDAPI FindMimeFromData(LPBC pBC,
  183. LPCWSTR pwzUrl,
  184. LPVOID pBuffer,
  185. DWORD cbSize,
  186. LPCWSTR pwzMimeProposed,
  187. DWORD dwMimeFlags,
  188. LPWSTR *ppwzMimeOut,
  189. DWORD dwReserved)
  190. {
  191. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  192. }
  193. static
  194. STDAPI
  195. URLDownloadToCacheFileA(LPUNKNOWN caller,
  196. LPCSTR szURL,
  197. LPTSTR szFileName,
  198. DWORD dwBufLength,
  199. DWORD dwReserved,
  200. LPBINDSTATUSCALLBACK callback)
  201. {
  202. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  203. }
  204. static
  205. STDAPI
  206. URLDownloadToCacheFileW(LPUNKNOWN caller,
  207. LPCWSTR szURL,
  208. LPWSTR szFileName,
  209. DWORD dwBufLength,
  210. DWORD dwReserved,
  211. LPBINDSTATUSCALLBACK callback)
  212. {
  213. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  214. }
  215. static
  216. STDAPI
  217. ObtainUserAgentString(DWORD dwOption,
  218. LPSTR pszUAOut,
  219. DWORD *cbSize)
  220. {
  221. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  222. }
  223. static
  224. STDAPI
  225. CoInternetGetSecurityUrl(
  226. LPCWSTR pwszUrl,
  227. LPWSTR *ppwszSecUrl,
  228. PSUACTION psuAction,
  229. DWORD dwReserved
  230. )
  231. {
  232. if (ppwszSecUrl)
  233. {
  234. *ppwszSecUrl = NULL;
  235. }
  236. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  237. }
  238. static
  239. STDAPI
  240. CreateAsyncBindCtxEx(IBindCtx *pbc,
  241. DWORD dwOptions,
  242. IBindStatusCallback *pBSCb,
  243. IEnumFORMATETC *pEnum,
  244. IBindCtx **ppBC,
  245. DWORD reserved)
  246. {
  247. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  248. }
  249. static
  250. STDAPI
  251. RegisterMediaTypeClass(LPBC pBC,
  252. UINT ctypes,
  253. const LPCSTR* rgszTypes,
  254. CLSID *rgclsID,
  255. DWORD reserved)
  256. {
  257. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  258. }
  259. static
  260. STDAPI_(void)
  261. ReleaseBindInfo(BINDINFO * pbindinfo)
  262. {
  263. }
  264. static
  265. HRESULT WINAPI
  266. RevokeFormatEnumerator(LPBC pBC,
  267. IEnumFORMATETC *pEFetc)
  268. {
  269. return E_FAIL;
  270. }
  271. static
  272. HRESULT WINAPI
  273. RegisterFormatEnumerator(LPBC pBC,
  274. IEnumFORMATETC *pEFetc,
  275. DWORD reserved)
  276. {
  277. return E_FAIL;
  278. }
  279. static
  280. HRESULT WINAPI
  281. CoInternetCombineUrl(LPCWSTR pwzBaseUrl,
  282. LPCWSTR pwzRelativeUrl,
  283. DWORD dwCombineFlags,
  284. LPWSTR pszResult,
  285. DWORD cchResult,
  286. DWORD * pcchResult,
  287. DWORD dwReserved)
  288. {
  289. return E_FAIL;
  290. }
  291. static
  292. HRESULT WINAPI
  293. IsValidURL(LPBC pBC,
  294. LPCWSTR szURL,
  295. DWORD dwReserved)
  296. {
  297. return E_FAIL;
  298. }
  299. static
  300. STDAPI
  301. GetClassFileOrMime(
  302. LPBC pBC,
  303. LPCWSTR szFilename,
  304. LPVOID pBuffer,
  305. DWORD cbSize,
  306. LPCWSTR szMime,
  307. DWORD dwReserved,
  308. CLSID *pclsid
  309. )
  310. {
  311. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  312. }
  313. static
  314. STDAPI
  315. MkParseDisplayNameEx(
  316. IBindCtx *pbc,
  317. LPCWSTR szDisplayName,
  318. ULONG *pchEaten,
  319. LPMONIKER *ppmk
  320. )
  321. {
  322. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  323. }
  324. static
  325. STDAPI
  326. CoGetClassObjectFromURL(
  327. REFCLSID rCLASSID,
  328. LPCWSTR szCODE,
  329. DWORD dwFileVersionMS,
  330. DWORD dwFileVersionLS,
  331. LPCWSTR szTYPE,
  332. LPBINDCTX pBindCtx,
  333. DWORD dwClsContext,
  334. LPVOID pvReserved,
  335. REFIID riid,
  336. LPVOID * ppv
  337. )
  338. {
  339. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  340. }
  341. static
  342. STDAPI
  343. CoInternetCreateZoneManager(
  344. IServiceProvider *pSP,
  345. IInternetZoneManager **ppZM,
  346. DWORD dwReserved
  347. )
  348. {
  349. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  350. }
  351. static
  352. STDAPI
  353. CreateURLMonikerEx(
  354. LPMONIKER pMkCtx,
  355. LPCWSTR szURL,
  356. LPMONIKER FAR * ppmk,
  357. DWORD dwFlags
  358. )
  359. {
  360. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  361. }
  362. static
  363. STDAPI
  364. CompareSecurityIds(
  365. BYTE* pbSecurityId1,
  366. DWORD dwLen1,
  367. BYTE* pbSecurityId2,
  368. DWORD dwLen2,
  369. DWORD dwReserved
  370. )
  371. {
  372. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  373. }
  374. static
  375. STDAPI IsAsyncMoniker(
  376. IMoniker* pmk
  377. )
  378. {
  379. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  380. }
  381. static
  382. STDAPI
  383. CreateAsyncBindCtx(
  384. DWORD reserved,
  385. IBindStatusCallback *pBSCb,
  386. IEnumFORMATETC *pEFetc,
  387. IBindCtx **ppBC
  388. )
  389. {
  390. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  391. }
  392. //
  393. // !! WARNING !! The entries below must be in alphabetical order, and are CASE SENSITIVE (eg lower case comes last!)
  394. //
  395. DEFINE_PROCNAME_ENTRIES(urlmon)
  396. {
  397. DLPENTRY(CoGetClassObjectFromURL)
  398. DLPENTRY(CoInternetCombineUrl)
  399. DLPENTRY(CoInternetCreateSecurityManager)
  400. DLPENTRY(CoInternetCreateZoneManager)
  401. DLPENTRY(CoInternetGetSecurityUrl)
  402. DLPENTRY(CoInternetGetSession)
  403. DLPENTRY(CoInternetParseUrl)
  404. DLPENTRY(CoInternetQueryInfo)
  405. DLPENTRY(CompareSecurityIds)
  406. DLPENTRY(CreateAsyncBindCtx)
  407. DLPENTRY(CreateAsyncBindCtxEx)
  408. DLPENTRY(CreateFormatEnumerator)
  409. DLPENTRY(CreateURLMoniker)
  410. DLPENTRY(CreateURLMonikerEx)
  411. DLPENTRY(FaultInIEFeature)
  412. DLPENTRY(FindMimeFromData)
  413. DLPENTRY(GetClassFileOrMime)
  414. DLPENTRY(GetMarkOfTheWeb)
  415. DLPENTRY(GetSoftwareUpdateInfo)
  416. DLPENTRY(HlinkNavigateString)
  417. DLPENTRY(HlinkSimpleNavigateToString)
  418. DLPENTRY(IsAsyncMoniker)
  419. DLPENTRY(IsValidURL)
  420. DLPENTRY(MkParseDisplayNameEx)
  421. DLPENTRY(ObtainUserAgentString)
  422. DLPENTRY(RegisterBindStatusCallback)
  423. DLPENTRY(RegisterFormatEnumerator)
  424. DLPENTRY(RegisterMediaTypeClass)
  425. DLPENTRY(ReleaseBindInfo)
  426. DLPENTRY(RevokeBindStatusCallback)
  427. DLPENTRY(RevokeFormatEnumerator)
  428. DLPENTRY(SetSoftwareUpdateAdvertisementState)
  429. DLPENTRY(URLDownloadToCacheFileA)
  430. DLPENTRY(URLDownloadToCacheFileW)
  431. DLPENTRY(URLDownloadToFileA)
  432. DLPENTRY(URLDownloadToFileW)
  433. DLPENTRY(URLOpenBlockingStreamW)
  434. DLPENTRY(UrlMkGetSessionOption)
  435. DLPENTRY(UrlMkSetSessionOption)
  436. };
  437. DEFINE_PROCNAME_MAP(urlmon)