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.

770 lines
22 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: call_as.c wrapper functions for urlmon
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 1-08-96 JohannP (Johann Posch) Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #include <urlint.h>
  18. #include "transmit.h"
  19. //+---------------------------------------------------------------------------
  20. //
  21. // Function: IBindHost_MonikerBindToStorage_Proxy
  22. //
  23. // Synopsis:
  24. //
  25. // Arguments: [This] --
  26. // [pMk] --
  27. // [pBC] --
  28. // [pBSC] --
  29. // [riid] --
  30. // [ppvObj] --
  31. //
  32. // Returns:
  33. //
  34. // History: 7-23-96 JohannP (Johann Posch) Created
  35. //
  36. // Notes:
  37. //
  38. //----------------------------------------------------------------------------
  39. HRESULT STDMETHODCALLTYPE IBindHost_MonikerBindToStorage_Proxy(
  40. IBindHost __RPC_FAR * This,
  41. /* [in] */ IMoniker __RPC_FAR *pMk,
  42. /* [in] */ IBindCtx __RPC_FAR *pBC,
  43. /* [in] */ IBindStatusCallback __RPC_FAR *pBSC,
  44. /* [in] */ REFIID riid,
  45. /* [out] */ void __RPC_FAR *__RPC_FAR *ppvObj)
  46. {
  47. HRESULT hr;
  48. TransDebugOut((DEB_DATA,"%p _IN IBindHost_MonikerBindToStorage_Proxy\n",This));
  49. *ppvObj = 0;
  50. hr = IBindHost_RemoteMonikerBindToStorage_Proxy(This, pMk, pBC, pBSC, riid, (IUnknown **)ppvObj);
  51. TransDebugOut((DEB_DATA,"%p OUT IBindHost_MonikerBindToStorage_Proxy (hr:%lx)\n",This, hr));
  52. return hr;
  53. }
  54. //+---------------------------------------------------------------------------
  55. //
  56. // Function: IBindHost_MonikerBindToStorage_Stub
  57. //
  58. // Synopsis:
  59. //
  60. // Arguments: [This] --
  61. // [pMk] --
  62. // [pBC] --
  63. // [pBSC] --
  64. // [riid] --
  65. // [ppUnk] --
  66. //
  67. // Returns:
  68. //
  69. // History: 7-23-96 JohannP (Johann Posch) Created
  70. //
  71. // Notes:
  72. //
  73. //----------------------------------------------------------------------------
  74. HRESULT STDMETHODCALLTYPE IBindHost_MonikerBindToStorage_Stub(
  75. IBindHost __RPC_FAR * This,
  76. /* [unique][in] */ IMoniker __RPC_FAR *pMk,
  77. /* [unique][in] */ IBindCtx __RPC_FAR *pBC,
  78. /* [unique][in] */ IBindStatusCallback __RPC_FAR *pBSC,
  79. /* [in] */ REFIID riid,
  80. /* [iid_is][out] */ IUnknown __RPC_FAR *__RPC_FAR *ppUnk)
  81. {
  82. HRESULT hr;
  83. TransDebugOut((DEB_DATA,"%p _IN IBindHost_MonikerBindToStorage_Stub\n",This));
  84. hr = This->MonikerBindToStorage(pMk, pBC, pBSC, riid, (void **)ppUnk);
  85. if (FAILED(hr))
  86. {
  87. TransAssert((*ppUnk == 0));
  88. *ppUnk = 0;
  89. }
  90. TransDebugOut((DEB_DATA,"%p OUT IBindHost_MonikerBindToStorage_Stub (hr:%lx)\n",This, hr));
  91. return hr;
  92. }
  93. //+---------------------------------------------------------------------------
  94. //
  95. // Function: IBindHost_MonikerBindToObject_Proxy
  96. //
  97. // Synopsis:
  98. //
  99. // Arguments: [This] --
  100. // [pMk] --
  101. // [pBC] --
  102. // [pBSC] --
  103. // [riid] --
  104. // [ppvObj] --
  105. //
  106. // Returns:
  107. //
  108. // History: 7-23-96 JohannP (Johann Posch) Created
  109. //
  110. // Notes:
  111. //
  112. //----------------------------------------------------------------------------
  113. HRESULT STDMETHODCALLTYPE IBindHost_MonikerBindToObject_Proxy(
  114. IBindHost __RPC_FAR * This,
  115. /* [in] */ IMoniker __RPC_FAR *pMk,
  116. /* [in] */ IBindCtx __RPC_FAR *pBC,
  117. /* [in] */ IBindStatusCallback __RPC_FAR *pBSC,
  118. /* [in] */ REFIID riid,
  119. /* [out] */ void __RPC_FAR *__RPC_FAR *ppvObj)
  120. {
  121. HRESULT hr;
  122. TransDebugOut((DEB_DATA,"%p _IN IBindHost_MonikerBindToObject_Proxy\n",This));
  123. *ppvObj = 0;
  124. hr = IBindHost_RemoteMonikerBindToObject_Proxy(This, pMk, pBC, pBSC, riid, (IUnknown **)ppvObj);
  125. TransDebugOut((DEB_DATA,"%p OUT IBindHost_MonikerBindToObject_Proxy (hr:%lx)\n",This, hr));
  126. return hr;
  127. }
  128. //+---------------------------------------------------------------------------
  129. //
  130. // Function: IBindHost_MonikerBindToObject_Stub
  131. //
  132. // Synopsis:
  133. //
  134. // Arguments: [This] --
  135. // [pMk] --
  136. // [pBC] --
  137. // [pBSC] --
  138. // [riid] --
  139. // [ppUnk] --
  140. //
  141. // Returns:
  142. //
  143. // History: 7-23-96 JohannP (Johann Posch) Created
  144. //
  145. // Notes:
  146. //
  147. //----------------------------------------------------------------------------
  148. HRESULT STDMETHODCALLTYPE IBindHost_MonikerBindToObject_Stub(
  149. IBindHost __RPC_FAR * This,
  150. /* [unique][in] */ IMoniker __RPC_FAR *pMk,
  151. /* [unique][in] */ IBindCtx __RPC_FAR *pBC,
  152. /* [unique][in] */ IBindStatusCallback __RPC_FAR *pBSC,
  153. /* [in] */ REFIID riid,
  154. /* [iid_is][out] */ IUnknown __RPC_FAR *__RPC_FAR *ppUnk)
  155. {
  156. HRESULT hr;
  157. TransDebugOut((DEB_DATA,"%p _IN IBindHost_MonikerBindToObject_Stub\n",This));
  158. hr = This->MonikerBindToObject(pMk, pBC, pBSC, riid, (void **)ppUnk);
  159. if (FAILED(hr))
  160. {
  161. TransAssert((*ppUnk == 0));
  162. *ppUnk = 0;
  163. }
  164. TransDebugOut((DEB_DATA,"%p OUT IBindHost_MonikerBindToObject_Stub (hr:%lx)\n",This, hr));
  165. return hr;
  166. }
  167. //+---------------------------------------------------------------------------
  168. //
  169. // Function: IBindStatusCallback_GetBindInfo_Proxy
  170. //
  171. // Synopsis:
  172. //
  173. // Arguments: [This] --
  174. // [grfBINDF] --
  175. // [pbindinfo] --
  176. //
  177. // Returns:
  178. //
  179. // History: 7-23-96 JohannP (Johann Posch) Created
  180. //
  181. // Notes:
  182. //
  183. //----------------------------------------------------------------------------
  184. HRESULT STDMETHODCALLTYPE IBindStatusCallback_GetBindInfo_Proxy(
  185. IBindStatusCallback __RPC_FAR * This,
  186. /* [out] */ DWORD __RPC_FAR *grfBINDF,
  187. /* [unique][out][in] */ BINDINFO __RPC_FAR *pbindinfo)
  188. {
  189. TransDebugOut((DEB_DATA,"%p _IN IBindStatusCallback_GetBindInfo_Proxy\n",This));
  190. HRESULT hr;
  191. RemSTGMEDIUM RemoteMedium;
  192. RemSTGMEDIUM *pRemoteMedium = &RemoteMedium;
  193. RemBINDINFO RemoteBindInfo;
  194. RemBINDINFO *pRemoteBindInfo = &RemoteBindInfo;
  195. hr = NOERROR;
  196. memset(&RemoteBindInfo, 0, sizeof(RemoteBindInfo));
  197. __try
  198. {
  199. RemoteBindInfo.cbSize = pbindinfo->cbSize ;
  200. RemoteBindInfo.szExtraInfo = pbindinfo->szExtraInfo ;
  201. RemoteBindInfo.grfBindInfoF = pbindinfo->grfBindInfoF;
  202. RemoteBindInfo.dwBindVerb = pbindinfo->dwBindVerb ;
  203. RemoteBindInfo.szCustomVerb = pbindinfo->szCustomVerb;
  204. RemoteBindInfo.cbstgmedData = pbindinfo->cbstgmedData;
  205. RemoteBindInfo.iid = IID_NULL;
  206. STGMEDIUM_to_xmit(&(pbindinfo->stgmedData), (RemSTGMEDIUM **) &pRemoteMedium);
  207. hr = IBindStatusCallback_RemoteGetBindInfo_Proxy(This, grfBINDF, pRemoteBindInfo,pRemoteMedium);
  208. if (hr == NOERROR)
  209. {
  210. pbindinfo->szExtraInfo = pRemoteBindInfo->szExtraInfo ;
  211. pbindinfo->grfBindInfoF= pRemoteBindInfo->grfBindInfoF ;
  212. pbindinfo->dwBindVerb = pRemoteBindInfo->dwBindVerb ;
  213. pbindinfo->szCustomVerb= pRemoteBindInfo->szCustomVerb ;
  214. pbindinfo->cbstgmedData= pRemoteBindInfo->cbstgmedData ;
  215. if ( pbindinfo->cbSize > URLMONOFFSETOF(BINDINFO, dwReserved) )
  216. {
  217. pbindinfo->pUnk = 0;
  218. pbindinfo->dwReserved = pRemoteBindInfo->dwReserved;
  219. pbindinfo->dwOptions = pRemoteBindInfo->dwOptions ;
  220. pbindinfo->dwOptionsFlags = pRemoteBindInfo->dwOptionsFlags;
  221. pbindinfo->dwCodePage = pRemoteBindInfo->dwCodePage;
  222. pbindinfo->iid = IID_NULL;
  223. }
  224. STGMEDIUM_from_xmit( (RemSTGMEDIUM *) pRemoteMedium, &(pbindinfo->stgmedData));
  225. }
  226. else
  227. {
  228. }
  229. }
  230. __except(EXCEPTION_EXECUTE_HANDLER)
  231. {
  232. //Just ignore the exception.
  233. }
  234. #ifdef unix
  235. __endexcept
  236. #endif /* unix */
  237. TransDebugOut((DEB_DATA,"%p OUT IBindStatusCallback_GetBindInfo_Proxy (hr:%lx)\n",This, hr));
  238. return hr;
  239. }
  240. //+---------------------------------------------------------------------------
  241. //
  242. // Function: IBindStatusCallback_GetBindInfo_Stub
  243. //
  244. // Synopsis:
  245. //
  246. // Arguments: [This] --
  247. // [grfBINDF] --
  248. // [pbindinfo] --
  249. // [pRemstgmed] --
  250. //
  251. // Returns:
  252. //
  253. // History: 7-23-96 JohannP (Johann Posch) Created
  254. //
  255. // Notes:
  256. //
  257. //----------------------------------------------------------------------------
  258. HRESULT STDMETHODCALLTYPE IBindStatusCallback_GetBindInfo_Stub(
  259. IBindStatusCallback __RPC_FAR * This,
  260. /* [out] */ DWORD __RPC_FAR *grfBINDF,
  261. /* [unique][out][in] */ RemBINDINFO __RPC_FAR *prembindinfo,
  262. /* [unique][out][in] */ RemSTGMEDIUM __RPC_FAR *pRemstgmed
  263. )
  264. {
  265. TransDebugOut((DEB_DATA,"%p _IN IBindStatusCallback_GetBindInfo_Stub\n",This));
  266. HRESULT hr;
  267. BINDINFO BindInfo;
  268. STGMEDIUM *pstgmed = NULL;
  269. hr = NOERROR;
  270. memset(&BindInfo, 0, sizeof(BindInfo));
  271. __try
  272. {
  273. BindInfo.cbSize = prembindinfo->cbSize ;
  274. BindInfo.szExtraInfo = prembindinfo->szExtraInfo ;
  275. BindInfo.grfBindInfoF = prembindinfo->grfBindInfoF;
  276. BindInfo.dwBindVerb = prembindinfo->dwBindVerb ;
  277. BindInfo.szCustomVerb = prembindinfo->szCustomVerb;
  278. BindInfo.cbstgmedData = prembindinfo->cbstgmedData;
  279. BindInfo.iid = IID_NULL;
  280. if ( prembindinfo->cbSize >= URLMONOFFSETOF(BINDINFO, dwReserved) )
  281. {
  282. BindInfo.dwOptions = prembindinfo->dwOptions;
  283. BindInfo.dwOptionsFlags = prembindinfo->dwOptionsFlags;
  284. }
  285. memset(&(BindInfo.stgmedData), 0 , sizeof(BindInfo.stgmedData));
  286. BindInfo.stgmedData.tymed = TYMED_NULL;
  287. hr = This->GetBindInfo(grfBINDF, &BindInfo);
  288. if (hr == NOERROR)
  289. {
  290. pstgmed = &BindInfo.stgmedData;
  291. TransAssert(( (pstgmed->tymed == TYMED_NULL && pstgmed->pUnkForRelease == NULL)
  292. || (pstgmed->tymed != TYMED_NULL) ));
  293. if (pstgmed->tymed != TYMED_NULL)
  294. {
  295. //Convert an STGMEDIUM to a RemSTGMEDIUM
  296. // structure so it can be sent
  297. STGMEDIUM_to_xmit(pstgmed,&pRemstgmed);
  298. }
  299. prembindinfo->szExtraInfo = BindInfo.szExtraInfo ;
  300. prembindinfo->grfBindInfoF = BindInfo.grfBindInfoF ;
  301. prembindinfo->dwBindVerb = BindInfo.dwBindVerb ;
  302. prembindinfo->szCustomVerb = BindInfo.szCustomVerb ;
  303. prembindinfo->cbstgmedData = BindInfo.cbstgmedData ;
  304. if ( prembindinfo->cbSize > URLMONOFFSETOF(BINDINFO, dwReserved) )
  305. {
  306. prembindinfo->dwReserved = BindInfo.dwReserved;
  307. prembindinfo->dwOptions = BindInfo.dwOptions;
  308. prembindinfo->dwOptionsFlags = BindInfo.dwOptionsFlags;
  309. prembindinfo->iid = IID_NULL;
  310. prembindinfo->pUnk = 0;
  311. prembindinfo->dwCodePage = BindInfo.dwCodePage;
  312. }
  313. }
  314. }
  315. __finally
  316. {
  317. }
  318. #ifdef unix
  319. __endfinally
  320. #endif /* unix */
  321. TransDebugOut((DEB_DATA,"%p OUT IBindStatusCallback_GetBindInfo_Stub (hr:%lx)\n",This, hr));
  322. return hr;
  323. }
  324. //+---------------------------------------------------------------------------
  325. //
  326. // Function: IBindStatusCallback_OnDataAvailable_Proxy
  327. //
  328. // Synopsis:
  329. //
  330. // Arguments: [This] --
  331. // [grfBSCF] --
  332. // [dwSize] --
  333. // [pformatetc] --
  334. // [pstgmed] --
  335. //
  336. // Returns:
  337. //
  338. // History: 7-23-96 JohannP (Johann Posch) Created
  339. //
  340. // Notes:
  341. //
  342. //----------------------------------------------------------------------------
  343. HRESULT STDMETHODCALLTYPE IBindStatusCallback_OnDataAvailable_Proxy(
  344. IBindStatusCallback __RPC_FAR * This,
  345. /* [in] */ DWORD grfBSCF,
  346. /* [in] */ DWORD dwSize,
  347. /* [in] */ FORMATETC __RPC_FAR *pformatetc,
  348. /* [in] */ STGMEDIUM __RPC_FAR *pstgmed)
  349. {
  350. TransDebugOut((DEB_DATA,"%p _IN IBindStatusCallback_OnDataAvailable_Proxy\n",This));
  351. HRESULT hr;
  352. RemSTGMEDIUM *pRemoteMedium = 0;
  353. RemFORMATETC *pRemoteformatetc = 0;
  354. RemFORMATETC Remoteformatetc;
  355. hr = NOERROR;
  356. __try
  357. {
  358. Remoteformatetc.cfFormat = (DWORD)pformatetc->cfFormat;
  359. Remoteformatetc.ptd = 0;
  360. Remoteformatetc.dwAspect = pformatetc->dwAspect;
  361. Remoteformatetc.lindex = pformatetc->lindex;
  362. Remoteformatetc.tymed = pformatetc->tymed;
  363. pRemoteformatetc = &Remoteformatetc;
  364. STGMEDIUM_to_xmit(pstgmed, (RemSTGMEDIUM **) &pRemoteMedium);
  365. hr = IBindStatusCallback_RemoteOnDataAvailable_Proxy(This, grfBSCF, dwSize,
  366. pRemoteformatetc, pRemoteMedium);
  367. }
  368. __except(EXCEPTION_EXECUTE_HANDLER)
  369. {
  370. //Just ignore the exception.
  371. }
  372. #ifdef unix
  373. __endexcept
  374. #endif /* unix */
  375. if(pRemoteMedium != 0)
  376. {
  377. CoTaskMemFree(pRemoteMedium);
  378. pRemoteMedium = 0;
  379. }
  380. TransDebugOut((DEB_DATA,"%p OUT IBindStatusCallback_OnDataAvailable_Proxy (hr:%lx)\n",This, hr));
  381. return hr;
  382. }
  383. //+---------------------------------------------------------------------------
  384. //
  385. // Function: IBindStatusCallback_OnDataAvailable_Stub
  386. //
  387. // Synopsis:
  388. //
  389. // Arguments: [This] --
  390. // [grfBSCF] --
  391. // [dwSize] --
  392. // [pformatetc] --
  393. // [pstgmed] --
  394. //
  395. // Returns:
  396. //
  397. // History: 7-23-96 JohannP (Johann Posch) Created
  398. //
  399. // Notes:
  400. //
  401. //----------------------------------------------------------------------------
  402. HRESULT STDMETHODCALLTYPE IBindStatusCallback_OnDataAvailable_Stub(
  403. IBindStatusCallback __RPC_FAR * This,
  404. /* [in] */ DWORD grfBSCF,
  405. /* [in] */ DWORD dwSize,
  406. /* [in] */ RemFORMATETC *pformatetc,
  407. /* [in] */ RemSTGMEDIUM __RPC_FAR *pstgmed)
  408. {
  409. TransDebugOut((DEB_DATA,"%p _IN IBindStatusCallback_OnDataAvailable_Stub\n",This));
  410. HRESULT hr;
  411. STGMEDIUM medium;
  412. FORMATETC formatetc;
  413. hr = NOERROR;
  414. __try
  415. {
  416. formatetc.cfFormat = (CLIPFORMAT) pformatetc->cfFormat;
  417. formatetc.ptd = NULL;
  418. formatetc.dwAspect = pformatetc->dwAspect;
  419. formatetc.lindex = pformatetc->lindex ;
  420. formatetc.tymed = pformatetc->tymed ;
  421. memset(&medium, 0, sizeof(medium));
  422. STGMEDIUM_from_xmit (pstgmed, &medium);
  423. This->OnDataAvailable(grfBSCF, dwSize, &formatetc, &medium);
  424. }
  425. __finally
  426. {
  427. STGMEDIUM_free_inst(&medium);
  428. }
  429. #ifdef unix
  430. __endfinally
  431. #endif /* unix */
  432. TransDebugOut((DEB_DATA,"%p OUT IBindStatusCallback_OnDataAvailable_Stub (hr:%lx)\n",This, hr));
  433. return hr;
  434. }
  435. //+---------------------------------------------------------------------------
  436. //
  437. // Function: IBinding_GetBindResult_Proxy
  438. //
  439. // Synopsis:
  440. //
  441. // Arguments: [This] --
  442. // [pclsidProtocol] --
  443. // [pdwResult] --
  444. // [pszResult] --
  445. // [pdwReserved] --
  446. //
  447. // Returns:
  448. //
  449. // History: 7-25-96 JohannP (Johann Posch) Created
  450. //
  451. // Notes:
  452. //
  453. //----------------------------------------------------------------------------
  454. HRESULT STDMETHODCALLTYPE IBinding_GetBindResult_Proxy(
  455. IBinding __RPC_FAR * This,
  456. /* [out] */ CLSID __RPC_FAR *pclsidProtocol,
  457. /* [out] */ DWORD __RPC_FAR *pdwResult,
  458. /* [out] */ LPOLESTR __RPC_FAR *pszResult,
  459. /* [out][in] */ DWORD __RPC_FAR *pdwReserved)
  460. {
  461. TransDebugOut((DEB_DATA,"%p _IN IBindStatusCallbackMsg_GetBindResult_Proxy\n",This));
  462. HRESULT hr;
  463. __try
  464. {
  465. hr = IBinding_RemoteGetBindResult_Proxy(
  466. This,
  467. pclsidProtocol,
  468. pdwResult,
  469. pszResult,
  470. NULL);
  471. }
  472. __except(EXCEPTION_EXECUTE_HANDLER)
  473. {
  474. //Just ignore the exception.
  475. }
  476. #ifdef unix
  477. __endexcept
  478. #endif /* unix */
  479. TransDebugOut((DEB_DATA,"%p OUT IBindStatusCallbackMsg_GetBindResult_Proxy (hr:%lx)\n",This, hr));
  480. return hr;
  481. }
  482. //+---------------------------------------------------------------------------
  483. //
  484. // Function: IBinding_GetBindResult_Stub
  485. //
  486. // Synopsis:
  487. //
  488. // Arguments: [This] --
  489. // [pclsidProtocol] --
  490. // [pdwResult] --
  491. // [pszResult] --
  492. // [dwReserved] --
  493. //
  494. // Returns:
  495. //
  496. // History: 7-25-96 JohannP (Johann Posch) Created
  497. //
  498. // Notes:
  499. //
  500. //----------------------------------------------------------------------------
  501. HRESULT STDMETHODCALLTYPE IBinding_GetBindResult_Stub(
  502. IBinding __RPC_FAR * This,
  503. /* [out] */ CLSID __RPC_FAR *pclsidProtocol,
  504. /* [out] */ DWORD __RPC_FAR *pdwResult,
  505. /* [out] */ LPOLESTR __RPC_FAR *pszResult,
  506. /* [in] */ DWORD dwReserved)
  507. {
  508. TransDebugOut((DEB_DATA,"%p _IN IBindStatusCallbackMsg_RemoteGetBindResult_Stub\n",This));
  509. HRESULT hr;
  510. hr = NOERROR;
  511. MSG msg;
  512. __try
  513. {
  514. This->GetBindResult(
  515. pclsidProtocol,
  516. pdwResult,
  517. pszResult,
  518. NULL);
  519. }
  520. __finally
  521. {
  522. }
  523. #ifdef unix
  524. __endfinally
  525. #endif /* unix */
  526. TransDebugOut((DEB_DATA,"%p OUT IBindStatusCallbackMsg_RemoteGetBindResult_Stub (hr:%lx)\n",This, hr));
  527. return hr;
  528. }
  529. //+---------------------------------------------------------------------------
  530. //
  531. // Function: IWinInetHttpInfo_QueryInfo_Proxy
  532. //
  533. // Synopsis:
  534. //
  535. // Arguments: [This] --
  536. // [dwOption] --
  537. // [pBuffer] --
  538. // [pcbBuf] --
  539. // [pdwFlags] --
  540. // [pdwReserved] --
  541. //
  542. // Returns:
  543. //
  544. // History: 9-20-96 JohannP (Johann Posch) Created
  545. //
  546. // Notes:
  547. //
  548. //----------------------------------------------------------------------------
  549. HRESULT STDMETHODCALLTYPE IWinInetHttpInfo_QueryInfo_Proxy(
  550. IWinInetHttpInfo __RPC_FAR * This,
  551. /* [in] */ DWORD dwOption,
  552. /* [size_is][out] */ LPVOID pBuffer,
  553. /* [out][in] */ DWORD __RPC_FAR *pcbBuf,
  554. /* [out][in] */ DWORD __RPC_FAR *pdwFlags,
  555. /* [out][in] */ DWORD __RPC_FAR *pdwReserved)
  556. {
  557. TransDebugOut((DEB_DATA,"%p _IN IWinInetHttpInfo_QueryInfo_Proxy\n",This));
  558. HRESULT hr;
  559. if (!pcbBuf || (!pBuffer && *pcbBuf != 0))
  560. {
  561. hr = E_INVALIDARG;
  562. }
  563. else
  564. {
  565. DWORD dwBuffer = 0;
  566. DWORD dwFlags = 0;
  567. DWORD dwReserved = 0;
  568. if (pdwFlags == NULL)
  569. {
  570. pdwFlags = &dwFlags;
  571. }
  572. if (pdwReserved == NULL)
  573. {
  574. pdwReserved = &dwReserved;
  575. }
  576. if (pBuffer == NULL)
  577. {
  578. pBuffer = &dwBuffer;
  579. }
  580. hr = IWinInetHttpInfo_RemoteQueryInfo_Proxy(This, dwOption, (BYTE*)pBuffer,
  581. pcbBuf,pdwFlags,pdwReserved);
  582. }
  583. TransDebugOut((DEB_DATA,"%p OUT IWinInetHttpInfo_QueryInfo_Proxy (hr:%lx)\n",This, hr));
  584. return hr;
  585. }
  586. //+---------------------------------------------------------------------------
  587. //
  588. // Function: IWinInetHttpInfo_QueryInfo_Stub
  589. //
  590. // Synopsis:
  591. //
  592. // Arguments: [This] --
  593. // [dwOption] --
  594. // [pBuffer] --
  595. // [pcbBuf] --
  596. // [pdwFlags] --
  597. // [pdwReserved] --
  598. //
  599. // Returns:
  600. //
  601. // History: 9-20-96 JohannP (Johann Posch) Created
  602. //
  603. // Notes:
  604. //
  605. //----------------------------------------------------------------------------
  606. HRESULT STDMETHODCALLTYPE IWinInetHttpInfo_QueryInfo_Stub(
  607. IWinInetHttpInfo __RPC_FAR * This,
  608. /* [in] */ DWORD dwOption,
  609. /* [size_is][out] */ BYTE __RPC_FAR *pBuffer,
  610. /* [out][in] */ DWORD __RPC_FAR *pcbBuf,
  611. /* [out][in] */ DWORD __RPC_FAR *pdwFlags,
  612. /* [out][in] */ DWORD __RPC_FAR *pdwReserved)
  613. {
  614. TransDebugOut((DEB_DATA,"%p _IN IWinInetHttpInfo_QueryInfo_Stub\n",This));
  615. HRESULT hr;
  616. hr = This->QueryInfo(dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
  617. TransDebugOut((DEB_DATA,"%p OUT IWinInetHttpInfo_QueryInfo_Stub (hr:%lx)\n",This, hr));
  618. return hr;
  619. }
  620. //+---------------------------------------------------------------------------
  621. //
  622. // Function: IWinInetInfo_QueryOption_Proxy
  623. //
  624. // Synopsis:
  625. //
  626. // Arguments: [This] --
  627. // [dwOption] --
  628. // [pBuffer] --
  629. // [pcbBuf] --
  630. //
  631. // Returns:
  632. //
  633. // History: 9-20-96 JohannP (Johann Posch) Created
  634. //
  635. // Notes:
  636. //
  637. //----------------------------------------------------------------------------
  638. HRESULT STDMETHODCALLTYPE IWinInetInfo_QueryOption_Proxy(
  639. IWinInetInfo __RPC_FAR * This,
  640. /* [in] */ DWORD dwOption,
  641. /* [size_is][out] */ LPVOID pBuffer,
  642. /* [out][in] */ DWORD *pcbBuf)
  643. {
  644. TransDebugOut((DEB_DATA,"%p _IN IWinInetInfo_QueryOption_Proxy\n",This));
  645. HRESULT hr;
  646. if (!pcbBuf || (!pBuffer && *pcbBuf != 0))
  647. {
  648. hr = E_INVALIDARG;
  649. }
  650. else
  651. {
  652. DWORD dwBuffer = 0;
  653. if (pBuffer == NULL)
  654. {
  655. pBuffer = &dwBuffer;
  656. }
  657. hr = IWinInetInfo_RemoteQueryOption_Proxy(This,dwOption, (BYTE*)pBuffer,pcbBuf);
  658. }
  659. TransDebugOut((DEB_DATA,"%p OUT IWinInetInfo_QueryOption_Proxy (hr:%lx)\n",This, hr));
  660. return hr;
  661. }
  662. //+---------------------------------------------------------------------------
  663. //
  664. // Function: IWinInetInfo_QueryOption_Stub
  665. //
  666. // Synopsis:
  667. //
  668. // Arguments: [This] --
  669. // [dwOption] --
  670. // [pBuffer] --
  671. // [pcbBuf] --
  672. //
  673. // Returns:
  674. //
  675. // History: 9-20-96 JohannP (Johann Posch) Created
  676. //
  677. // Notes:
  678. //
  679. //----------------------------------------------------------------------------
  680. HRESULT STDMETHODCALLTYPE IWinInetInfo_QueryOption_Stub(
  681. IWinInetInfo __RPC_FAR * This,
  682. /* [in] */ DWORD dwOption,
  683. /* [size_is][out] */ BYTE __RPC_FAR *pBuffer,
  684. /* [out][in] */ DWORD __RPC_FAR *pcbBuf)
  685. {
  686. TransDebugOut((DEB_DATA,"%p _IN IWinInetInfo_QueryOption_Stub\n",This));
  687. HRESULT hr;
  688. hr = This->QueryOption(dwOption,pBuffer,pcbBuf);
  689. TransDebugOut((DEB_DATA,"%p OUT IWinInetInfo_QueryOption_Stub (hr:%lx)\n",This, hr));
  690. return hr;
  691. }