ReactOS  0.4.15-dev-1070-ge1a01de
usrmarshal.c File Reference
#include "urlmon_main.h"
#include "wine/debug.h"
Include dependency graph for usrmarshal.c:

Go to the source code of this file.

Macros

#define NONAMELESSUNION
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (urlmon)
 
HRESULT CALLBACK IWinInetHttpInfo_QueryInfo_Proxy (IWinInetHttpInfo *This, DWORD dwOption, LPVOID pBuffer, DWORD *pcbBuf, DWORD *pdwFlags, DWORD *pdwReserved)
 
HRESULT __RPC_STUB IWinInetHttpInfo_QueryInfo_Stub (IWinInetHttpInfo *This, DWORD dwOption, BYTE *pBuffer, DWORD *pcbBuf, DWORD *pdwFlags, DWORD *pdwReserved)
 
HRESULT CALLBACK IWinInetInfo_QueryOption_Proxy (IWinInetInfo *This, DWORD dwOption, LPVOID pBuffer, DWORD *pcbBuf)
 
HRESULT __RPC_STUB IWinInetInfo_QueryOption_Stub (IWinInetInfo *This, DWORD dwOption, BYTE *pBuffer, DWORD *pcbBuf)
 
HRESULT CALLBACK IBindHost_MonikerBindToStorage_Proxy (IBindHost *This, IMoniker *moniker, IBindCtx *bc, IBindStatusCallback *bsc, REFIID riid, void **obj)
 
HRESULT __RPC_STUB IBindHost_MonikerBindToStorage_Stub (IBindHost *This, IMoniker *moniker, IBindCtx *bc, IBindStatusCallback *bsc, REFIID riid, IUnknown **obj)
 
HRESULT CALLBACK IBindHost_MonikerBindToObject_Proxy (IBindHost *This, IMoniker *moniker, IBindCtx *bc, IBindStatusCallback *bsc, REFIID riid, void **obj)
 
HRESULT __RPC_STUB IBindHost_MonikerBindToObject_Stub (IBindHost *This, IMoniker *moniker, IBindCtx *bc, IBindStatusCallback *bsc, REFIID riid, IUnknown **obj)
 
static HRESULT marshal_stgmed (STGMEDIUM *stgmed, RemSTGMEDIUM **ret)
 
static HRESULT unmarshal_stgmed (RemSTGMEDIUM *rem_stgmed, STGMEDIUM *stgmed)
 
static void proxy_marshal_bindinfo (BINDINFO *bindinfo, RemBINDINFO *rem_bindinfo)
 
static void proxy_unmarshal_bindinfo (RemBINDINFO *rem_bindinfo, BINDINFO *bindinfo)
 
static void stub_unmarshal_bindinfo (RemBINDINFO *rem_bindinfo, BINDINFO *bindinfo)
 
static void stub_marshal_bindinfo (BINDINFO *bindinfo, RemBINDINFO *rem_bindinfo)
 
HRESULT CALLBACK IBindStatusCallbackEx_GetBindInfoEx_Proxy (IBindStatusCallbackEx *This, DWORD *grfBINDF, BINDINFO *bindinfo, DWORD *grfBINDF2, DWORD *pdwReserved)
 
HRESULT __RPC_STUB IBindStatusCallbackEx_GetBindInfoEx_Stub (IBindStatusCallbackEx *This, DWORD *grfBINDF, RemBINDINFO *rem_bindinfo, RemSTGMEDIUM *rem_stgmed, DWORD *grfBINDF2, DWORD *pdwReserved)
 
HRESULT CALLBACK IBindStatusCallback_GetBindInfo_Proxy (IBindStatusCallback *This, DWORD *grfBINDF, BINDINFO *bindinfo)
 
HRESULT __RPC_STUB IBindStatusCallback_GetBindInfo_Stub (IBindStatusCallback *This, DWORD *grfBINDF, RemBINDINFO *rem_bindinfo, RemSTGMEDIUM *rem_stgmed)
 
HRESULT CALLBACK IBindStatusCallback_OnDataAvailable_Proxy (IBindStatusCallback *This, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed)
 
HRESULT __RPC_STUB IBindStatusCallback_OnDataAvailable_Stub (IBindStatusCallback *This, DWORD grfBSCF, DWORD dwSize, RemFORMATETC *pformatetc, RemSTGMEDIUM *pstgmed)
 
HRESULT CALLBACK IBinding_GetBindResult_Proxy (IBinding *This, CLSID *pclsidProtocol, DWORD *pdwResult, LPOLESTR *pszResult, DWORD *pdwReserved)
 
HRESULT __RPC_STUB IBinding_GetBindResult_Stub (IBinding *This, CLSID *pclsidProtocol, DWORD *pdwResult, LPOLESTR *pszResult, DWORD dwReserved)
 

Macro Definition Documentation

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 19 of file usrmarshal.c.

Function Documentation

◆ IBindHost_MonikerBindToObject_Proxy()

HRESULT CALLBACK IBindHost_MonikerBindToObject_Proxy ( IBindHost This,
IMoniker moniker,
IBindCtx bc,
IBindStatusCallback bsc,
REFIID  riid,
void **  obj 
)

Definition at line 73 of file usrmarshal.c.

76 {
77  TRACE("(%p %p %p %p %s %p)\n", This, moniker, bc, bsc, debugstr_guid(riid), obj);
78  return IBindHost_RemoteMonikerBindToObject_Proxy(This, moniker, bc, bsc, riid, (IUnknown**)obj);
79 }
REFIID riid
Definition: precomp.h:44
static IBindStatusCallbackEx bsc
Definition: url.c:2150
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
Definition: main.c:39
PBATCH_CONTEXT bc
Definition: batch.c:67

◆ IBindHost_MonikerBindToObject_Stub()

HRESULT __RPC_STUB IBindHost_MonikerBindToObject_Stub ( IBindHost This,
IMoniker moniker,
IBindCtx bc,
IBindStatusCallback bsc,
REFIID  riid,
IUnknown **  obj 
)

Definition at line 81 of file usrmarshal.c.

84 {
85  TRACE("(%p %p %p %p %s %p)\n", This, moniker, bc, bsc, debugstr_guid(riid), obj);
86  return IBindHost_MonikerBindToObject(This, moniker, bc, bsc, riid, (void**)obj);
87 }
REFIID riid
Definition: precomp.h:44
static IBindStatusCallbackEx bsc
Definition: url.c:2150
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
Definition: main.c:39
PBATCH_CONTEXT bc
Definition: batch.c:67

◆ IBindHost_MonikerBindToStorage_Proxy()

HRESULT CALLBACK IBindHost_MonikerBindToStorage_Proxy ( IBindHost This,
IMoniker moniker,
IBindCtx bc,
IBindStatusCallback bsc,
REFIID  riid,
void **  obj 
)

Definition at line 57 of file usrmarshal.c.

60 {
61  TRACE("(%p %p %p %p %s %p)\n", This, moniker, bc, bsc, debugstr_guid(riid), obj);
62  return IBindHost_RemoteMonikerBindToStorage_Proxy(This, moniker, bc, bsc, riid, (IUnknown**)obj);
63 }
REFIID riid
Definition: precomp.h:44
static IBindStatusCallbackEx bsc
Definition: url.c:2150
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
Definition: main.c:39
PBATCH_CONTEXT bc
Definition: batch.c:67

◆ IBindHost_MonikerBindToStorage_Stub()

HRESULT __RPC_STUB IBindHost_MonikerBindToStorage_Stub ( IBindHost This,
IMoniker moniker,
IBindCtx bc,
IBindStatusCallback bsc,
REFIID  riid,
IUnknown **  obj 
)

Definition at line 65 of file usrmarshal.c.

68 {
69  TRACE("(%p %p %p %p %s %p)\n", This, moniker, bc, bsc, debugstr_guid(riid), obj);
70  return IBindHost_MonikerBindToStorage(This, moniker, bc, bsc, riid, (void**)obj);
71 }
REFIID riid
Definition: precomp.h:44
static IBindStatusCallbackEx bsc
Definition: url.c:2150
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
Definition: main.c:39
PBATCH_CONTEXT bc
Definition: batch.c:67

◆ IBinding_GetBindResult_Proxy()

HRESULT CALLBACK IBinding_GetBindResult_Proxy ( IBinding This,
CLSID pclsidProtocol,
DWORD pdwResult,
LPOLESTR pszResult,
DWORD pdwReserved 
)

Definition at line 366 of file usrmarshal.c.

369 {
370  FIXME("stub\n");
371  return E_NOTIMPL;
372 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IBinding_GetBindResult_Stub()

HRESULT __RPC_STUB IBinding_GetBindResult_Stub ( IBinding This,
CLSID pclsidProtocol,
DWORD pdwResult,
LPOLESTR pszResult,
DWORD  dwReserved 
)

Definition at line 374 of file usrmarshal.c.

377 {
378  FIXME("stub\n");
379  return E_NOTIMPL;
380 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IBindStatusCallback_GetBindInfo_Proxy()

HRESULT CALLBACK IBindStatusCallback_GetBindInfo_Proxy ( IBindStatusCallback This,
DWORD grfBINDF,
BINDINFO *  bindinfo 
)

Definition at line 284 of file usrmarshal.c.

286 {
287  RemBINDINFO rem_bindinfo = {sizeof(rem_bindinfo)};
288  RemSTGMEDIUM rem_stgmed = {0};
289  HRESULT hres;
290 
291  TRACE("(%p)->(%p %p)\n", This, grfBINDF, bindinfo);
292 
294  hres = IBindStatusCallback_RemoteGetBindInfo_Proxy(This, grfBINDF, &rem_bindinfo, &rem_stgmed);
296  return hres;
297 }
static void proxy_marshal_bindinfo(BINDINFO *bindinfo, RemBINDINFO *rem_bindinfo)
Definition: usrmarshal.c:198
static void proxy_unmarshal_bindinfo(RemBINDINFO *rem_bindinfo, BINDINFO *bindinfo)
Definition: usrmarshal.c:207
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
static BINDINFO rem_bindinfo
Definition: misc.c:1960
static STGMEDIUM rem_stgmed
Definition: misc.c:2026

◆ IBindStatusCallback_GetBindInfo_Stub()

HRESULT __RPC_STUB IBindStatusCallback_GetBindInfo_Stub ( IBindStatusCallback This,
DWORD grfBINDF,
RemBINDINFO *  rem_bindinfo,
RemSTGMEDIUM *  rem_stgmed 
)

Definition at line 299 of file usrmarshal.c.

302 {
303  BINDINFO bindinfo = {sizeof(bindinfo)};
304  HRESULT hres;
305 
306  TRACE("(%p)->(%p %p %p)\n", This, grfBINDF, rem_bindinfo, rem_stgmed);
307 
309  hres = IBindStatusCallback_GetBindInfo(This, grfBINDF, &bindinfo);
311  return hres;
312 }
static void stub_marshal_bindinfo(BINDINFO *bindinfo, RemBINDINFO *rem_bindinfo)
Definition: usrmarshal.c:233
static void stub_unmarshal_bindinfo(RemBINDINFO *rem_bindinfo, BINDINFO *bindinfo)
Definition: usrmarshal.c:221
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
static BINDINFO rem_bindinfo
Definition: misc.c:1960
static STGMEDIUM rem_stgmed
Definition: misc.c:2026

◆ IBindStatusCallback_OnDataAvailable_Proxy()

HRESULT CALLBACK IBindStatusCallback_OnDataAvailable_Proxy ( IBindStatusCallback This,
DWORD  grfBSCF,
DWORD  dwSize,
FORMATETC *  pformatetc,
STGMEDIUM *  pstgmed 
)

Definition at line 314 of file usrmarshal.c.

317 {
318  RemFORMATETC rem_formatetc;
319  RemSTGMEDIUM *rem_stgmed;
320  HRESULT hres;
321 
322  TRACE("(%p)->(%x %u %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
323 
324  hres = marshal_stgmed(pstgmed, &rem_stgmed);
325  if(FAILED(hres))
326  return hres;
327 
328  rem_formatetc.cfFormat = pformatetc->cfFormat;
329  rem_formatetc.ptd = 0;
330  rem_formatetc.dwAspect = pformatetc->dwAspect;
331  rem_formatetc.lindex = pformatetc->lindex;
332  rem_formatetc.tymed = pformatetc->tymed;
333 
334  hres = IBindStatusCallback_RemoteOnDataAvailable_Proxy(This, grfBSCF, dwSize, &rem_formatetc, rem_stgmed);
335 
337  return hres;
338 }
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
static HRESULT marshal_stgmed(STGMEDIUM *stgmed, RemSTGMEDIUM **ret)
Definition: usrmarshal.c:89
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
static STGMEDIUM rem_stgmed
Definition: misc.c:2026
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ IBindStatusCallback_OnDataAvailable_Stub()

HRESULT __RPC_STUB IBindStatusCallback_OnDataAvailable_Stub ( IBindStatusCallback This,
DWORD  grfBSCF,
DWORD  dwSize,
RemFORMATETC *  pformatetc,
RemSTGMEDIUM *  pstgmed 
)

Definition at line 340 of file usrmarshal.c.

343 {
344  STGMEDIUM stgmed = { TYMED_NULL };
345  FORMATETC formatetc;
346  HRESULT hres;
347 
348  TRACE("(%p)->(%x %u %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
349 
350  hres = unmarshal_stgmed(pstgmed, &stgmed);
351  if(FAILED(hres))
352  return hres;
353 
354  formatetc.cfFormat = pformatetc->cfFormat;
355  formatetc.ptd = NULL;
356  formatetc.dwAspect = pformatetc->dwAspect;
357  formatetc.lindex = pformatetc->lindex;
358  formatetc.tymed = pformatetc->tymed;
359 
360  hres = IBindStatusCallback_OnDataAvailable(This, grfBSCF, dwSize, &formatetc, &stgmed);
361 
362  ReleaseStgMedium(&stgmed);
363  return hres;
364 }
static HRESULT unmarshal_stgmed(RemSTGMEDIUM *rem_stgmed, STGMEDIUM *stgmed)
Definition: usrmarshal.c:155
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2033
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54

◆ IBindStatusCallbackEx_GetBindInfoEx_Proxy()

HRESULT CALLBACK IBindStatusCallbackEx_GetBindInfoEx_Proxy ( IBindStatusCallbackEx This,
DWORD grfBINDF,
BINDINFO *  bindinfo,
DWORD grfBINDF2,
DWORD pdwReserved 
)

Definition at line 249 of file usrmarshal.c.

252 {
253  RemBINDINFO rem_bindinfo = {sizeof(rem_bindinfo)};
254  RemSTGMEDIUM rem_stgmed = {0};
255  HRESULT hres;
256 
257  TRACE("(%p)->(%p %p %p %p)\n", This, grfBINDF, bindinfo, grfBINDF2, pdwReserved);
258 
260  hres = IBindStatusCallbackEx_RemoteGetBindInfoEx_Proxy(This, grfBINDF, &rem_bindinfo,
261  &rem_stgmed, grfBINDF2, pdwReserved);
263  return hres;
264 }
static void proxy_marshal_bindinfo(BINDINFO *bindinfo, RemBINDINFO *rem_bindinfo)
Definition: usrmarshal.c:198
static void proxy_unmarshal_bindinfo(RemBINDINFO *rem_bindinfo, BINDINFO *bindinfo)
Definition: usrmarshal.c:207
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
static BINDINFO rem_bindinfo
Definition: misc.c:1960
_Reserved_ DWORD * pdwReserved
Definition: wincrypt.h:4254
static STGMEDIUM rem_stgmed
Definition: misc.c:2026

◆ IBindStatusCallbackEx_GetBindInfoEx_Stub()

HRESULT __RPC_STUB IBindStatusCallbackEx_GetBindInfoEx_Stub ( IBindStatusCallbackEx This,
DWORD grfBINDF,
RemBINDINFO *  rem_bindinfo,
RemSTGMEDIUM *  rem_stgmed,
DWORD grfBINDF2,
DWORD pdwReserved 
)

Definition at line 266 of file usrmarshal.c.

269 {
270  BINDINFO bindinfo = {sizeof(bindinfo)};
271  HRESULT hres;
272 
273  TRACE("(%p)->(%p %p %p %p %p)\n", This, grfBINDF, rem_bindinfo, rem_stgmed, grfBINDF2, pdwReserved);
274 
275  /*
276  * Although arguments suggest support for STGMEDIUM from BINDINFO, tests show
277  * that it's not supported and returned data is lost.
278  */
280  hres = IBindStatusCallbackEx_GetBindInfoEx(This, grfBINDF, &bindinfo, grfBINDF2, pdwReserved);
282  return hres;
283 }
static void stub_marshal_bindinfo(BINDINFO *bindinfo, RemBINDINFO *rem_bindinfo)
Definition: usrmarshal.c:233
static void stub_unmarshal_bindinfo(RemBINDINFO *rem_bindinfo, BINDINFO *bindinfo)
Definition: usrmarshal.c:221
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
static BINDINFO rem_bindinfo
Definition: misc.c:1960
_Reserved_ DWORD * pdwReserved
Definition: wincrypt.h:4254
static STGMEDIUM rem_stgmed
Definition: misc.c:2026

◆ IWinInetHttpInfo_QueryInfo_Proxy()

HRESULT CALLBACK IWinInetHttpInfo_QueryInfo_Proxy ( IWinInetHttpInfo This,
DWORD  dwOption,
LPVOID  pBuffer,
DWORD pcbBuf,
DWORD pdwFlags,
DWORD pdwReserved 
)

Definition at line 27 of file usrmarshal.c.

30 {
31  TRACE("(%p %x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
32  return IWinInetHttpInfo_RemoteQueryInfo_Proxy(This, dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
33 }
PVOID pBuffer
#define TRACE(s)
Definition: solgame.cpp:4
_Reserved_ DWORD * pdwReserved
Definition: wincrypt.h:4254

◆ IWinInetHttpInfo_QueryInfo_Stub()

HRESULT __RPC_STUB IWinInetHttpInfo_QueryInfo_Stub ( IWinInetHttpInfo This,
DWORD  dwOption,
BYTE pBuffer,
DWORD pcbBuf,
DWORD pdwFlags,
DWORD pdwReserved 
)

Definition at line 35 of file usrmarshal.c.

38 {
39  TRACE("(%p %x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
40  return IWinInetHttpInfo_QueryInfo(This, dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
41 }
PVOID pBuffer
#define TRACE(s)
Definition: solgame.cpp:4
_Reserved_ DWORD * pdwReserved
Definition: wincrypt.h:4254

◆ IWinInetInfo_QueryOption_Proxy()

HRESULT CALLBACK IWinInetInfo_QueryOption_Proxy ( IWinInetInfo This,
DWORD  dwOption,
LPVOID  pBuffer,
DWORD pcbBuf 
)

Definition at line 43 of file usrmarshal.c.

45 {
46  TRACE("(%p %x %p %p)\n", This, dwOption, pBuffer, pcbBuf);
47  return IWinInetInfo_RemoteQueryOption_Proxy(This, dwOption, pBuffer, pcbBuf);
48 }
PVOID pBuffer
#define TRACE(s)
Definition: solgame.cpp:4

◆ IWinInetInfo_QueryOption_Stub()

HRESULT __RPC_STUB IWinInetInfo_QueryOption_Stub ( IWinInetInfo This,
DWORD  dwOption,
BYTE pBuffer,
DWORD pcbBuf 
)

Definition at line 50 of file usrmarshal.c.

52 {
53  TRACE("(%p %x %p %p)\n", This, dwOption, pBuffer, pcbBuf);
54  return IWinInetInfo_QueryOption(This, dwOption, pBuffer, pcbBuf);
55 }
PVOID pBuffer
#define TRACE(s)
Definition: solgame.cpp:4

◆ marshal_stgmed()

static HRESULT marshal_stgmed ( STGMEDIUM *  stgmed,
RemSTGMEDIUM **  ret 
)
static

Definition at line 89 of file usrmarshal.c.

90 {
91  RemSTGMEDIUM *rem_stgmed;
92  IStream *stream = NULL;
93  ULONG size = 0;
94  HRESULT hres = S_OK;
95 
96  if((stgmed->tymed == TYMED_ISTREAM && stgmed->u.pstm) || stgmed->pUnkForRelease) {
98  if(FAILED(hres))
99  return hres;
100  }
101 
102  switch(stgmed->tymed) {
103  case TYMED_NULL:
104  break;
105  case TYMED_ISTREAM:
106  if(stgmed->u.pstm)
107  hres = CoMarshalInterface(stream, &IID_IStream, (IUnknown*)stgmed->u.pstm,
108  MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
109  break;
110  default:
111  FIXME("unsupported tymed %u\n", stgmed->tymed);
112  break;
113  }
114 
115  if(SUCCEEDED(hres) && stgmed->pUnkForRelease)
116  hres = CoMarshalInterface(stream, &IID_IUnknown, stgmed->pUnkForRelease,
117  MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
118  if(FAILED(hres)) {
119  if(stream)
120  IStream_Release(stream);
121  return hres;
122  }
123 
124  if(stream) {
127 
128  zero.QuadPart = 0;
129  IStream_Seek(stream, zero, STREAM_SEEK_CUR, &off);
130  size = off.QuadPart;
131  IStream_Seek(stream, zero, STREAM_SEEK_SET, &off);
132  }
133 
134  rem_stgmed = heap_alloc_zero(FIELD_OFFSET(RemSTGMEDIUM, data[size]));
135  if(!rem_stgmed) {
136  if(stream)
137  IStream_Release(stream);
138  return E_OUTOFMEMORY;
139  }
140 
141  rem_stgmed->tymed = stgmed->tymed;
142  rem_stgmed->dwHandleType = 0;
143  rem_stgmed->pData = stgmed->u.pstm != NULL;
144  rem_stgmed->pUnkForRelease = stgmed->pUnkForRelease != NULL;
145  rem_stgmed->cbData = size;
146  if(stream) {
147  IStream_Read(stream, rem_stgmed->data, size, &size);
148  IStream_Release(stream);
149  }
150 
151  *ret = rem_stgmed;
152  return S_OK;
153 }
#define TRUE
Definition: types.h:120
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
const GUID IID_IUnknown
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
int ret
static double zero
Definition: j0_y0.c:96
Definition: parse.h:22
#define S_OK
Definition: intsafe.h:51
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
unsigned int ULONG
Definition: retypes.h:1
HRESULT WINAPI CoMarshalInterface(IStream *pStream, REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *pvDestContext, DWORD mshlFlags)
Definition: marshal.c:1876
static STGMEDIUM rem_stgmed
Definition: misc.c:2026
#define SUCCEEDED(hr)
Definition: intsafe.h:49
off
Definition: i386-dis.c:3909

Referenced by IBindStatusCallback_OnDataAvailable_Proxy().

◆ proxy_marshal_bindinfo()

static void proxy_marshal_bindinfo ( BINDINFO *  bindinfo,
RemBINDINFO *  rem_bindinfo 
)
static

Definition at line 198 of file usrmarshal.c.

199 {
200  rem_bindinfo->szExtraInfo = bindinfo->szExtraInfo;
201  rem_bindinfo->grfBindInfoF = bindinfo->grfBindInfoF;
202  rem_bindinfo->dwBindVerb = bindinfo->dwBindVerb;
203  rem_bindinfo->szCustomVerb = bindinfo->szCustomVerb;
204  rem_bindinfo->cbstgmedData = bindinfo->cbstgmedData;
205 }
static BINDINFO rem_bindinfo
Definition: misc.c:1960

Referenced by IBindStatusCallback_GetBindInfo_Proxy(), and IBindStatusCallbackEx_GetBindInfoEx_Proxy().

◆ proxy_unmarshal_bindinfo()

static void proxy_unmarshal_bindinfo ( RemBINDINFO *  rem_bindinfo,
BINDINFO *  bindinfo 
)
static

Definition at line 207 of file usrmarshal.c.

208 {
209  bindinfo->szExtraInfo = rem_bindinfo->szExtraInfo;
210  bindinfo->grfBindInfoF = rem_bindinfo->grfBindInfoF;
211  bindinfo->dwBindVerb = rem_bindinfo->dwBindVerb;
212  bindinfo->szCustomVerb = rem_bindinfo->szCustomVerb;
213  bindinfo->cbstgmedData = rem_bindinfo->cbstgmedData;
214  bindinfo->dwOptions = rem_bindinfo->dwOptions;
215  bindinfo->dwOptionsFlags = rem_bindinfo->dwOptionsFlags;
216  bindinfo->dwCodePage = rem_bindinfo->dwCodePage;
217  bindinfo->iid = IID_NULL;
218  bindinfo->pUnk = NULL;
219 }
smooth NULL
Definition: ftsmooth.c:416
static BINDINFO rem_bindinfo
Definition: misc.c:1960
#define IID_NULL
Definition: guiddef.h:98

Referenced by IBindStatusCallback_GetBindInfo_Proxy(), and IBindStatusCallbackEx_GetBindInfoEx_Proxy().

◆ stub_marshal_bindinfo()

static void stub_marshal_bindinfo ( BINDINFO *  bindinfo,
RemBINDINFO *  rem_bindinfo 
)
static

Definition at line 233 of file usrmarshal.c.

234 {
235  rem_bindinfo->cbSize = sizeof(*rem_bindinfo);
236  rem_bindinfo->szExtraInfo = bindinfo->szExtraInfo;
237  rem_bindinfo->grfBindInfoF = bindinfo->grfBindInfoF;
238  rem_bindinfo->dwBindVerb = bindinfo->dwBindVerb;
239  rem_bindinfo->szCustomVerb = bindinfo->szCustomVerb;
240  rem_bindinfo->cbstgmedData = bindinfo->cbstgmedData;
241  rem_bindinfo->dwOptions = bindinfo->dwOptions;
242  rem_bindinfo->dwOptionsFlags = bindinfo->dwOptionsFlags;
243  rem_bindinfo->dwCodePage = bindinfo->dwCodePage;
244  rem_bindinfo->pUnk = NULL;
245  rem_bindinfo->dwReserved = bindinfo->dwReserved;
246 }
smooth NULL
Definition: ftsmooth.c:416
static BINDINFO rem_bindinfo
Definition: misc.c:1960

Referenced by IBindStatusCallback_GetBindInfo_Stub(), and IBindStatusCallbackEx_GetBindInfoEx_Stub().

◆ stub_unmarshal_bindinfo()

static void stub_unmarshal_bindinfo ( RemBINDINFO *  rem_bindinfo,
BINDINFO *  bindinfo 
)
static

Definition at line 221 of file usrmarshal.c.

222 {
223  bindinfo->szExtraInfo = rem_bindinfo->szExtraInfo;
224  bindinfo->grfBindInfoF = rem_bindinfo->grfBindInfoF;
225  bindinfo->dwBindVerb = rem_bindinfo->dwBindVerb;
226  bindinfo->szCustomVerb = rem_bindinfo->szCustomVerb;
227  bindinfo->cbstgmedData = rem_bindinfo->cbstgmedData;
228 
229  if(bindinfo->stgmedData.tymed != TYMED_NULL)
230  WARN("stgmed data (tymed %u) will be lost!\n", bindinfo->stgmedData.tymed);
231 }
#define WARN(fmt,...)
Definition: debug.h:112
static BINDINFO rem_bindinfo
Definition: misc.c:1960

Referenced by IBindStatusCallback_GetBindInfo_Stub(), and IBindStatusCallbackEx_GetBindInfoEx_Stub().

◆ unmarshal_stgmed()

static HRESULT unmarshal_stgmed ( RemSTGMEDIUM *  rem_stgmed,
STGMEDIUM *  stgmed 
)
static

Definition at line 155 of file usrmarshal.c.

156 {
157  IStream *stream = NULL;
158  HRESULT hres = S_OK;
159 
160  stgmed->tymed = rem_stgmed->tymed;
161 
162  if((stgmed->tymed == TYMED_ISTREAM && rem_stgmed->pData) || rem_stgmed->pUnkForRelease) {
164 
166  if(FAILED(hres))
167  return hres;
168 
169  hres = IStream_Write(stream, rem_stgmed->data, rem_stgmed->cbData, NULL);
170  if(FAILED(hres)) {
171  IStream_Release(stream);
172  return hres;
173  }
174 
175  zero.QuadPart = 0;
176  IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL);
177  }
178 
179  switch(stgmed->tymed) {
180  case TYMED_NULL:
181  break;
182  case TYMED_ISTREAM:
183  if(rem_stgmed->pData)
184  hres = CoUnmarshalInterface(stream, &IID_IStream, (void**)&stgmed->u.pstm);
185  break;
186  default:
187  FIXME("unsupported tymed %u\n", stgmed->tymed);
188  break;
189  }
190 
191  if(SUCCEEDED(hres) && rem_stgmed->pUnkForRelease)
192  hres = CoUnmarshalInterface(stream, &IID_IUnknown, (void**)&stgmed->pUnkForRelease);
193  if(stream)
194  IStream_Release(stream);
195  return hres;
196 }
HRESULT WINAPI CoUnmarshalInterface(IStream *pStream, REFIID riid, LPVOID *ppv)
Definition: marshal.c:1981
#define TRUE
Definition: types.h:120
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
const GUID IID_IUnknown
static double zero
Definition: j0_y0.c:96
Definition: parse.h:22
#define S_OK
Definition: intsafe.h:51
static STGMEDIUM rem_stgmed
Definition: misc.c:2026
#define SUCCEEDED(hr)
Definition: intsafe.h:49

Referenced by IBindStatusCallback_OnDataAvailable_Stub().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( urlmon  )