ReactOS 0.4.16-dev-297-gc569aee
usrmarshal.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "ole2.h"
#include "oleauto.h"
#include "rpcproxy.h"
#include "wine/debug.h"
Include dependency graph for usrmarshal.c:

Go to the source code of this file.

Classes

struct  SNB_wire
 

Macros

#define COBJMACROS
 
#define NONAMELESSUNION
 
#define ALIGNED_LENGTH(_Len, _Align)   (((_Len)+(_Align))&~(_Align))
 
#define ALIGNED_POINTER(_Ptr, _Align)   ((LPVOID)ALIGNED_LENGTH((ULONG_PTR)(_Ptr), _Align))
 
#define ALIGN_LENGTH(_Len, _Align)   _Len = ALIGNED_LENGTH(_Len, _Align)
 
#define ALIGN_POINTER(_Ptr, _Align)   _Ptr = ALIGNED_POINTER(_Ptr, _Align)
 
#define USER_MARSHAL_PTR_PREFIX
 
#define IMPL_WIREM_HANDLE(type)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ole)
 
static const chardebugstr_user_flags (ULONG *pFlags)
 
ULONG __RPC_USER CLIPFORMAT_UserSize (ULONG *pFlags, ULONG size, CLIPFORMAT *pCF)
 
unsigned char *__RPC_USER CLIPFORMAT_UserMarshal (ULONG *pFlags, unsigned char *pBuffer, CLIPFORMAT *pCF)
 
unsigned char *__RPC_USER CLIPFORMAT_UserUnmarshal (ULONG *pFlags, unsigned char *pBuffer, CLIPFORMAT *pCF)
 
void __RPC_USER CLIPFORMAT_UserFree (ULONG *pFlags, CLIPFORMAT *pCF)
 
static ULONG handle_UserSize (ULONG *pFlags, ULONG StartingSize, HANDLE *handle)
 
static unsigned charhandle_UserMarshal (ULONG *pFlags, unsigned char *pBuffer, HANDLE *handle)
 
static unsigned charhandle_UserUnmarshal (ULONG *pFlags, unsigned char *pBuffer, HANDLE *handle)
 
static void handle_UserFree (ULONG *pFlags, HANDLE *handle)
 
ULONG __RPC_USER HGLOBAL_UserSize (ULONG *pFlags, ULONG StartingSize, HGLOBAL *phGlobal)
 
unsigned char *__RPC_USER HGLOBAL_UserMarshal (ULONG *pFlags, unsigned char *pBuffer, HGLOBAL *phGlobal)
 
unsigned char *__RPC_USER HGLOBAL_UserUnmarshal (ULONG *pFlags, unsigned char *pBuffer, HGLOBAL *phGlobal)
 
void __RPC_USER HGLOBAL_UserFree (ULONG *pFlags, HGLOBAL *phGlobal)
 
ULONG __RPC_USER HBITMAP_UserSize (ULONG *flags, ULONG size, HBITMAP *bmp)
 
unsigned char *__RPC_USER HBITMAP_UserMarshal (ULONG *flags, unsigned char *buffer, HBITMAP *bmp)
 
unsigned char *__RPC_USER HBITMAP_UserUnmarshal (ULONG *flags, unsigned char *buffer, HBITMAP *bmp)
 
void __RPC_USER HBITMAP_UserFree (ULONG *flags, HBITMAP *bmp)
 
ULONG __RPC_USER HPALETTE_UserSize (ULONG *pFlags, ULONG StartingSize, HPALETTE *phPal)
 
unsigned char *__RPC_USER HPALETTE_UserMarshal (ULONG *pFlags, unsigned char *pBuffer, HPALETTE *phPal)
 
unsigned char *__RPC_USER HPALETTE_UserUnmarshal (ULONG *pFlags, unsigned char *pBuffer, HPALETTE *phPal)
 
void __RPC_USER HPALETTE_UserFree (ULONG *pFlags, HPALETTE *phPal)
 
ULONG __RPC_USER HMETAFILE_UserSize (ULONG *pFlags, ULONG StartingSize, HMETAFILE *phmf)
 
unsigned char *__RPC_USER HMETAFILE_UserMarshal (ULONG *pFlags, unsigned char *pBuffer, HMETAFILE *phmf)
 
unsigned char *__RPC_USER HMETAFILE_UserUnmarshal (ULONG *pFlags, unsigned char *pBuffer, HMETAFILE *phmf)
 
void __RPC_USER HMETAFILE_UserFree (ULONG *pFlags, HMETAFILE *phmf)
 
ULONG __RPC_USER HENHMETAFILE_UserSize (ULONG *pFlags, ULONG size, HENHMETAFILE *phEmf)
 
unsigned char *__RPC_USER HENHMETAFILE_UserMarshal (ULONG *pFlags, unsigned char *pBuffer, HENHMETAFILE *phEmf)
 
unsigned char *__RPC_USER HENHMETAFILE_UserUnmarshal (ULONG *pFlags, unsigned char *pBuffer, HENHMETAFILE *phEmf)
 
void __RPC_USER HENHMETAFILE_UserFree (ULONG *pFlags, HENHMETAFILE *phEmf)
 
ULONG __RPC_USER HMETAFILEPICT_UserSize (ULONG *pFlags, ULONG size, HMETAFILEPICT *phMfp)
 
unsigned char *__RPC_USER HMETAFILEPICT_UserMarshal (ULONG *pFlags, unsigned char *pBuffer, HMETAFILEPICT *phMfp)
 
unsigned char *__RPC_USER HMETAFILEPICT_UserUnmarshal (ULONG *pFlags, unsigned char *pBuffer, HMETAFILEPICT *phMfp)
 
void __RPC_USER HMETAFILEPICT_UserFree (ULONG *pFlags, HMETAFILEPICT *phMfp)
 
ULONG __RPC_USER WdtpInterfacePointer_UserSize (ULONG *pFlags, ULONG RealFlags, ULONG StartingSize, IUnknown *punk, REFIID riid)
 
unsigned char *WINAPI WdtpInterfacePointer_UserMarshal (ULONG *pFlags, ULONG RealFlags, unsigned char *pBuffer, IUnknown *punk, REFIID riid)
 
unsigned char *WINAPI WdtpInterfacePointer_UserUnmarshal (ULONG *pFlags, unsigned char *pBuffer, IUnknown **ppunk, REFIID riid)
 
void WINAPI WdtpInterfacePointer_UserFree (IUnknown *punk)
 
ULONG __RPC_USER STGMEDIUM_UserSize (ULONG *pFlags, ULONG StartingSize, STGMEDIUM *pStgMedium)
 
unsigned char *__RPC_USER STGMEDIUM_UserMarshal (ULONG *pFlags, unsigned char *pBuffer, STGMEDIUM *pStgMedium)
 
unsigned char *__RPC_USER STGMEDIUM_UserUnmarshal (ULONG *pFlags, unsigned char *pBuffer, STGMEDIUM *pStgMedium)
 
void __RPC_USER STGMEDIUM_UserFree (ULONG *flags, STGMEDIUM *med)
 
ULONG __RPC_USER ASYNC_STGMEDIUM_UserSize (ULONG *pFlags, ULONG StartingSize, ASYNC_STGMEDIUM *pStgMedium)
 
unsigned char *__RPC_USER ASYNC_STGMEDIUM_UserMarshal (ULONG *pFlags, unsigned char *pBuffer, ASYNC_STGMEDIUM *pStgMedium)
 
unsigned char *__RPC_USER ASYNC_STGMEDIUM_UserUnmarshal (ULONG *pFlags, unsigned char *pBuffer, ASYNC_STGMEDIUM *pStgMedium)
 
void __RPC_USER ASYNC_STGMEDIUM_UserFree (ULONG *pFlags, ASYNC_STGMEDIUM *pStgMedium)
 
ULONG __RPC_USER FLAG_STGMEDIUM_UserSize (ULONG *pFlags, ULONG StartingSize, FLAG_STGMEDIUM *pStgMedium)
 
unsigned char *__RPC_USER FLAG_STGMEDIUM_UserMarshal (ULONG *pFlags, unsigned char *pBuffer, FLAG_STGMEDIUM *pStgMedium)
 
unsigned char *__RPC_USER FLAG_STGMEDIUM_UserUnmarshal (ULONG *pFlags, unsigned char *pBuffer, FLAG_STGMEDIUM *pStgMedium)
 
void __RPC_USER FLAG_STGMEDIUM_UserFree (ULONG *pFlags, FLAG_STGMEDIUM *pStgMedium)
 
ULONG __RPC_USER SNB_UserSize (ULONG *pFlags, ULONG StartingSize, SNB *pSnb)
 
unsigned char *__RPC_USER SNB_UserMarshal (ULONG *pFlags, unsigned char *pBuffer, SNB *pSnb)
 
unsigned char *__RPC_USER SNB_UserUnmarshal (ULONG *pFlags, unsigned char *pBuffer, SNB *pSnb)
 
void __RPC_USER SNB_UserFree (ULONG *pFlags, SNB *pSnb)
 
HRESULT CALLBACK IClassFactory_CreateInstance_Proxy (IClassFactory *This, IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
 
HRESULT __RPC_STUB IClassFactory_CreateInstance_Stub (IClassFactory *This, REFIID riid, IUnknown **ppvObject)
 
HRESULT CALLBACK IClassFactory_LockServer_Proxy (IClassFactory *This, BOOL fLock)
 
HRESULT __RPC_STUB IClassFactory_LockServer_Stub (IClassFactory *This, BOOL fLock)
 
HRESULT CALLBACK IEnumUnknown_Next_Proxy (IEnumUnknown *This, ULONG celt, IUnknown **rgelt, ULONG *pceltFetched)
 
HRESULT __RPC_STUB IEnumUnknown_Next_Stub (IEnumUnknown *This, ULONG celt, IUnknown **rgelt, ULONG *pceltFetched)
 
HRESULT CALLBACK IBindCtx_SetBindOptions_Proxy (IBindCtx *This, BIND_OPTS *pbindopts)
 
HRESULT __RPC_STUB IBindCtx_SetBindOptions_Stub (IBindCtx *This, BIND_OPTS2 *pbindopts)
 
HRESULT CALLBACK IBindCtx_GetBindOptions_Proxy (IBindCtx *This, BIND_OPTS *pbindopts)
 
HRESULT __RPC_STUB IBindCtx_GetBindOptions_Stub (IBindCtx *This, BIND_OPTS2 *pbindopts)
 
HRESULT CALLBACK IEnumMoniker_Next_Proxy (IEnumMoniker *This, ULONG celt, IMoniker **rgelt, ULONG *pceltFetched)
 
HRESULT __RPC_STUB IEnumMoniker_Next_Stub (IEnumMoniker *This, ULONG celt, IMoniker **rgelt, ULONG *pceltFetched)
 
BOOL CALLBACK IRunnableObject_IsRunning_Proxy (IRunnableObject *This)
 
HRESULT __RPC_STUB IRunnableObject_IsRunning_Stub (IRunnableObject *This)
 
HRESULT CALLBACK IMoniker_BindToObject_Proxy (IMoniker *This, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riidResult, void **ppvResult)
 
HRESULT __RPC_STUB IMoniker_BindToObject_Stub (IMoniker *This, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riidResult, IUnknown **ppvResult)
 
HRESULT CALLBACK IMoniker_BindToStorage_Proxy (IMoniker *This, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, void **ppvObj)
 
HRESULT __RPC_STUB IMoniker_BindToStorage_Stub (IMoniker *This, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, IUnknown **ppvObj)
 
HRESULT CALLBACK IEnumString_Next_Proxy (IEnumString *This, ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched)
 
HRESULT __RPC_STUB IEnumString_Next_Stub (IEnumString *This, ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched)
 
HRESULT CALLBACK ISequentialStream_Read_Proxy (ISequentialStream *This, void *pv, ULONG cb, ULONG *pcbRead)
 
HRESULT __RPC_STUB ISequentialStream_Read_Stub (ISequentialStream *This, byte *pv, ULONG cb, ULONG *pcbRead)
 
HRESULT CALLBACK ISequentialStream_Write_Proxy (ISequentialStream *This, const void *pv, ULONG cb, ULONG *pcbWritten)
 
HRESULT __RPC_STUB ISequentialStream_Write_Stub (ISequentialStream *This, const byte *pv, ULONG cb, ULONG *pcbWritten)
 
HRESULT CALLBACK IStream_Seek_Proxy (IStream *This, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
 
HRESULT __RPC_STUB IStream_Seek_Stub (IStream *This, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
 
HRESULT CALLBACK IStream_CopyTo_Proxy (IStream *This, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
 
HRESULT __RPC_STUB IStream_CopyTo_Stub (IStream *This, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
 
HRESULT CALLBACK IEnumSTATSTG_Next_Proxy (IEnumSTATSTG *This, ULONG celt, STATSTG *rgelt, ULONG *pceltFetched)
 
HRESULT __RPC_STUB IEnumSTATSTG_Next_Stub (IEnumSTATSTG *This, ULONG celt, STATSTG *rgelt, ULONG *pceltFetched)
 
HRESULT CALLBACK IStorage_OpenStream_Proxy (IStorage *This, LPCOLESTR pwcsName, void *reserved1, DWORD grfMode, DWORD reserved2, IStream **ppstm)
 
HRESULT __RPC_STUB IStorage_OpenStream_Stub (IStorage *This, LPCOLESTR pwcsName, ULONG cbReserved1, byte *reserved1, DWORD grfMode, DWORD reserved2, IStream **ppstm)
 
HRESULT CALLBACK IStorage_EnumElements_Proxy (IStorage *This, DWORD reserved1, void *reserved2, DWORD reserved3, IEnumSTATSTG **ppenum)
 
HRESULT __RPC_STUB IStorage_EnumElements_Stub (IStorage *This, DWORD reserved1, ULONG cbReserved2, byte *reserved2, DWORD reserved3, IEnumSTATSTG **ppenum)
 
HRESULT CALLBACK ILockBytes_ReadAt_Proxy (ILockBytes *This, ULARGE_INTEGER ulOffset, void *pv, ULONG cb, ULONG *pcbRead)
 
HRESULT __RPC_STUB ILockBytes_ReadAt_Stub (ILockBytes *This, ULARGE_INTEGER ulOffset, byte *pv, ULONG cb, ULONG *pcbRead)
 
HRESULT CALLBACK ILockBytes_WriteAt_Proxy (ILockBytes *This, ULARGE_INTEGER ulOffset, const void *pv, ULONG cb, ULONG *pcbWritten)
 
HRESULT __RPC_STUB ILockBytes_WriteAt_Stub (ILockBytes *This, ULARGE_INTEGER ulOffset, const byte *pv, ULONG cb, ULONG *pcbWritten)
 
HRESULT CALLBACK IFillLockBytes_FillAppend_Proxy (IFillLockBytes *This, const void *pv, ULONG cb, ULONG *pcbWritten)
 
HRESULT __RPC_STUB IFillLockBytes_FillAppend_Stub (IFillLockBytes *This, const byte *pv, ULONG cb, ULONG *pcbWritten)
 
HRESULT CALLBACK IFillLockBytes_FillAt_Proxy (IFillLockBytes *This, ULARGE_INTEGER ulOffset, const void *pv, ULONG cb, ULONG *pcbWritten)
 
HRESULT __RPC_STUB IFillLockBytes_FillAt_Stub (IFillLockBytes *This, ULARGE_INTEGER ulOffset, const byte *pv, ULONG cb, ULONG *pcbWritten)
 
HRESULT CALLBACK IEnumFORMATETC_Next_Proxy (IEnumFORMATETC *This, ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched)
 
HRESULT __RPC_STUB IEnumFORMATETC_Next_Stub (IEnumFORMATETC *This, ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched)
 
HRESULT CALLBACK IEnumSTATDATA_Next_Proxy (IEnumSTATDATA *This, ULONG celt, STATDATA *rgelt, ULONG *pceltFetched)
 
HRESULT __RPC_STUB IEnumSTATDATA_Next_Stub (IEnumSTATDATA *This, ULONG celt, STATDATA *rgelt, ULONG *pceltFetched)
 
void CALLBACK IAdviseSink_OnDataChange_Proxy (IAdviseSink *This, FORMATETC *pFormatetc, STGMEDIUM *pStgmed)
 
HRESULT __RPC_STUB IAdviseSink_OnDataChange_Stub (IAdviseSink *This, FORMATETC *pFormatetc, ASYNC_STGMEDIUM *pStgmed)
 
void CALLBACK IAdviseSink_OnViewChange_Proxy (IAdviseSink *This, DWORD dwAspect, LONG lindex)
 
HRESULT __RPC_STUB IAdviseSink_OnViewChange_Stub (IAdviseSink *This, DWORD dwAspect, LONG lindex)
 
void CALLBACK IAdviseSink_OnRename_Proxy (IAdviseSink *This, IMoniker *pmk)
 
HRESULT __RPC_STUB IAdviseSink_OnRename_Stub (IAdviseSink *This, IMoniker *pmk)
 
void CALLBACK IAdviseSink_OnSave_Proxy (IAdviseSink *This)
 
HRESULT __RPC_STUB IAdviseSink_OnSave_Stub (IAdviseSink *This)
 
void CALLBACK IAdviseSink_OnClose_Proxy (IAdviseSink *This)
 
HRESULT __RPC_STUB IAdviseSink_OnClose_Stub (IAdviseSink *This)
 
void CALLBACK IAdviseSink2_OnLinkSrcChange_Proxy (IAdviseSink2 *This, IMoniker *pmk)
 
HRESULT __RPC_STUB IAdviseSink2_OnLinkSrcChange_Stub (IAdviseSink2 *This, IMoniker *pmk)
 
HRESULT CALLBACK IDataObject_GetData_Proxy (IDataObject *This, FORMATETC *pformatetcIn, STGMEDIUM *pmedium)
 
HRESULT __RPC_STUB IDataObject_GetData_Stub (IDataObject *This, FORMATETC *pformatetcIn, STGMEDIUM *pRemoteMedium)
 
HRESULT CALLBACK IDataObject_GetDataHere_Proxy (IDataObject *iface, FORMATETC *fmt, STGMEDIUM *med)
 
HRESULT __RPC_STUB IDataObject_GetDataHere_Stub (IDataObject *This, FORMATETC *pformatetc, STGMEDIUM *pRemoteMedium)
 
HRESULT CALLBACK IDataObject_SetData_Proxy (IDataObject *This, FORMATETC *pformatetc, STGMEDIUM *pmedium, BOOL fRelease)
 
HRESULT __RPC_STUB IDataObject_SetData_Stub (IDataObject *This, FORMATETC *pformatetc, FLAG_STGMEDIUM *pmedium, BOOL fRelease)
 
HRESULT CALLBACK IOleInPlaceActiveObject_TranslateAccelerator_Proxy (IOleInPlaceActiveObject *This, LPMSG lpmsg)
 
HRESULT __RPC_STUB IOleInPlaceActiveObject_TranslateAccelerator_Stub (IOleInPlaceActiveObject *This)
 
HRESULT CALLBACK IOleInPlaceActiveObject_ResizeBorder_Proxy (IOleInPlaceActiveObject *This, LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow)
 
HRESULT __RPC_STUB IOleInPlaceActiveObject_ResizeBorder_Stub (IOleInPlaceActiveObject *This, LPCRECT prcBorder, REFIID riid, IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow)
 
HRESULT CALLBACK IOleCache2_UpdateCache_Proxy (IOleCache2 *This, LPDATAOBJECT pDataObject, DWORD grfUpdf, LPVOID pReserved)
 
HRESULT __RPC_STUB IOleCache2_UpdateCache_Stub (IOleCache2 *This, LPDATAOBJECT pDataObject, DWORD grfUpdf, LONG_PTR pReserved)
 
HRESULT CALLBACK IEnumOLEVERB_Next_Proxy (IEnumOLEVERB *This, ULONG celt, LPOLEVERB rgelt, ULONG *pceltFetched)
 
HRESULT __RPC_STUB IEnumOLEVERB_Next_Stub (IEnumOLEVERB *This, ULONG celt, LPOLEVERB rgelt, ULONG *pceltFetched)
 
HRESULT CALLBACK IViewObject_Draw_Proxy (IViewObject *This, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, BOOL(STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue)
 
HRESULT __RPC_STUB IViewObject_Draw_Stub (IViewObject *This, DWORD dwDrawAspect, LONG lindex, ULONG_PTR pvAspect, DVTARGETDEVICE *ptd, ULONG_PTR hdcTargetDev, ULONG_PTR hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, IContinue *pContinue)
 
HRESULT CALLBACK IViewObject_GetColorSet_Proxy (IViewObject *This, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet)
 
HRESULT __RPC_STUB IViewObject_GetColorSet_Stub (IViewObject *This, DWORD dwDrawAspect, LONG lindex, ULONG_PTR pvAspect, DVTARGETDEVICE *ptd, ULONG_PTR hicTargetDev, LOGPALETTE **ppColorSet)
 
HRESULT CALLBACK IViewObject_Freeze_Proxy (IViewObject *This, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze)
 
HRESULT __RPC_STUB IViewObject_Freeze_Stub (IViewObject *This, DWORD dwDrawAspect, LONG lindex, ULONG_PTR pvAspect, DWORD *pdwFreeze)
 
HRESULT CALLBACK IViewObject_GetAdvise_Proxy (IViewObject *This, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
 
HRESULT __RPC_STUB IViewObject_GetAdvise_Stub (IViewObject *This, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
 

Macro Definition Documentation

◆ ALIGN_LENGTH

#define ALIGN_LENGTH (   _Len,
  _Align 
)    _Len = ALIGNED_LENGTH(_Len, _Align)

Definition at line 44 of file usrmarshal.c.

◆ ALIGN_POINTER

#define ALIGN_POINTER (   _Ptr,
  _Align 
)    _Ptr = ALIGNED_POINTER(_Ptr, _Align)

Definition at line 45 of file usrmarshal.c.

◆ ALIGNED_LENGTH

#define ALIGNED_LENGTH (   _Len,
  _Align 
)    (((_Len)+(_Align))&~(_Align))

Definition at line 42 of file usrmarshal.c.

◆ ALIGNED_POINTER

#define ALIGNED_POINTER (   _Ptr,
  _Align 
)    ((LPVOID)ALIGNED_LENGTH((ULONG_PTR)(_Ptr), _Align))

Definition at line 43 of file usrmarshal.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 25 of file usrmarshal.c.

◆ IMPL_WIREM_HANDLE

#define IMPL_WIREM_HANDLE (   type)
Value:
ULONG __RPC_USER type##_UserSize(ULONG *pFlags, ULONG StartingSize, type *handle) \
{ \
TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, handle); \
return handle_UserSize(pFlags, StartingSize, (HANDLE *)handle); \
} \
\
unsigned char * __RPC_USER type##_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, type *handle) \
{ \
TRACE("(%s, %p, &%p\n", debugstr_user_flags(pFlags), pBuffer, *handle); \
return handle_UserMarshal(pFlags, pBuffer, (HANDLE *)handle); \
} \
\
unsigned char * __RPC_USER type##_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, type *handle) \
{ \
TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, handle); \
return handle_UserUnmarshal(pFlags, pBuffer, (HANDLE *)handle); \
} \
\
void __RPC_USER type##_UserFree(ULONG *pFlags, type *handle) \
{ \
TRACE("(%s, &%p\n", debugstr_user_flags(pFlags), *handle); \
handle_UserFree(pFlags, (HANDLE *)handle); \
}
static ULONG handle_UserSize(ULONG *pFlags, ULONG StartingSize, HANDLE *handle)
Definition: usrmarshal.c:280
static const char * debugstr_user_flags(ULONG *pFlags)
Definition: usrmarshal.c:51
static unsigned char * handle_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, HANDLE *handle)
Definition: usrmarshal.c:310
static unsigned char * handle_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HANDLE *handle)
Definition: usrmarshal.c:293
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
PVOID pBuffer
#define __RPC_USER
Definition: rpc.h:65
uint32_t ULONG
Definition: typedefs.h:59

Definition at line 327 of file usrmarshal.c.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 26 of file usrmarshal.c.

◆ USER_MARSHAL_PTR_PREFIX

#define USER_MARSHAL_PTR_PREFIX
Value:
( (DWORD)'U' | ( (DWORD)'s' << 8 ) | \
( (DWORD)'e' << 16 ) | ( (DWORD)'r' << 24 ) )
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DWORD
Definition: nt_native.h:44

Definition at line 47 of file usrmarshal.c.

Function Documentation

◆ ASYNC_STGMEDIUM_UserFree()

void __RPC_USER ASYNC_STGMEDIUM_UserFree ( ULONG pFlags,
ASYNC_STGMEDIUM *  pStgMedium 
)

Definition at line 2081 of file usrmarshal.c.

2082{
2083 TRACE("\n");
2084 STGMEDIUM_UserFree(pFlags, pStgMedium);
2085}
void __RPC_USER STGMEDIUM_UserFree(ULONG *flags, STGMEDIUM *med)
Definition: usrmarshal.c:2038
#define TRACE(s)
Definition: solgame.cpp:4

◆ ASYNC_STGMEDIUM_UserMarshal()

unsigned char *__RPC_USER ASYNC_STGMEDIUM_UserMarshal ( ULONG pFlags,
unsigned char pBuffer,
ASYNC_STGMEDIUM *  pStgMedium 
)

Definition at line 2069 of file usrmarshal.c.

2070{
2071 TRACE("\n");
2072 return STGMEDIUM_UserMarshal(pFlags, pBuffer, pStgMedium);
2073}
unsigned char *__RPC_USER STGMEDIUM_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, STGMEDIUM *pStgMedium)
Definition: usrmarshal.c:1785

◆ ASYNC_STGMEDIUM_UserSize()

ULONG __RPC_USER ASYNC_STGMEDIUM_UserSize ( ULONG pFlags,
ULONG  StartingSize,
ASYNC_STGMEDIUM *  pStgMedium 
)

Definition at line 2063 of file usrmarshal.c.

2064{
2065 TRACE("\n");
2066 return STGMEDIUM_UserSize(pFlags, StartingSize, pStgMedium);
2067}
ULONG __RPC_USER STGMEDIUM_UserSize(ULONG *pFlags, ULONG StartingSize, STGMEDIUM *pStgMedium)
Definition: usrmarshal.c:1690

◆ ASYNC_STGMEDIUM_UserUnmarshal()

unsigned char *__RPC_USER ASYNC_STGMEDIUM_UserUnmarshal ( ULONG pFlags,
unsigned char pBuffer,
ASYNC_STGMEDIUM *  pStgMedium 
)

Definition at line 2075 of file usrmarshal.c.

2076{
2077 TRACE("\n");
2078 return STGMEDIUM_UserUnmarshal(pFlags, pBuffer, pStgMedium);
2079}
unsigned char *__RPC_USER STGMEDIUM_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, STGMEDIUM *pStgMedium)
Definition: usrmarshal.c:1895

◆ CLIPFORMAT_UserFree()

void __RPC_USER CLIPFORMAT_UserFree ( ULONG pFlags,
CLIPFORMAT *  pCF 
)

Definition at line 274 of file usrmarshal.c.

275{
276 /* there is no inverse of the RegisterClipboardFormat function,
277 * so nothing to do */
278}

Referenced by test_marshal_CLIPFORMAT().

◆ CLIPFORMAT_UserMarshal()

unsigned char *__RPC_USER CLIPFORMAT_UserMarshal ( ULONG pFlags,
unsigned char pBuffer,
CLIPFORMAT *  pCF 
)

Definition at line 145 of file usrmarshal.c.

146{
147 TRACE("(%s, %p, &0x%04x\n", debugstr_user_flags(pFlags), pBuffer, *pCF);
148
150
151 /* only need to marshal the name if it is not a pre-defined type and
152 * we are going remote */
153 if ((*pCF >= 0xc000) && (LOWORD(*pFlags) == MSHCTX_DIFFERENTMACHINE))
154 {
155 WCHAR format[255];
156 UINT len;
157
158 *(DWORD *)pBuffer = WDT_REMOTE_CALL;
159 pBuffer += 4;
160 *(DWORD *)pBuffer = *pCF;
161 pBuffer += 4;
162
164 if (!len)
166 len += 1;
167 *(UINT *)pBuffer = len;
168 pBuffer += sizeof(UINT);
169 *(UINT *)pBuffer = 0;
170 pBuffer += sizeof(UINT);
171 *(UINT *)pBuffer = len;
172 pBuffer += sizeof(UINT);
173 TRACE("marshaling format name %s\n", debugstr_w(format));
174 memcpy(pBuffer, format, len * sizeof(WCHAR));
175 pBuffer += len * sizeof(WCHAR);
176 }
177 else
178 {
179 *(DWORD *)pBuffer = WDT_INPROC_CALL;
180 pBuffer += 4;
181 *(DWORD *)pBuffer = *pCF;
182 pBuffer += 4;
183 }
184
185 return pBuffer;
186}
#define ARRAY_SIZE(A)
Definition: main.h:20
#define NULL
Definition: types.h:112
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition: except.c:700
#define ALIGN_POINTER(_Ptr, _Align)
Definition: usrmarshal.c:45
GLenum GLsizei len
Definition: glext.h:6722
#define debugstr_w
Definition: kernel32.h:32
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned int UINT
Definition: ndis.h:50
#define LOWORD(l)
Definition: pedump.c:82
Definition: format.c:58
#define DV_E_CLIPFORMAT
Definition: winerror.h:2639
int WINAPI GetClipboardFormatNameW(_In_ UINT format, _Out_writes_(cchMaxCount) LPWSTR lpszFormatName, _In_ int cchMaxCount)
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by test_marshal_CLIPFORMAT().

◆ CLIPFORMAT_UserSize()

ULONG __RPC_USER CLIPFORMAT_UserSize ( ULONG pFlags,
ULONG  size,
CLIPFORMAT *  pCF 
)

Definition at line 100 of file usrmarshal.c.

101{
102 TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), size, pCF);
103
104 ALIGN_LENGTH(size, 3);
105
106 size += 8;
107
108 /* only need to marshal the name if it is not a pre-defined type and
109 * we are going remote */
110 if ((*pCF >= 0xc000) && (LOWORD(*pFlags) == MSHCTX_DIFFERENTMACHINE))
111 {
112 WCHAR format[255];
113 INT ret;
114 size += 3 * sizeof(UINT);
115 /* urg! this function is badly designed because it won't tell us how
116 * much space is needed without doing a dummy run of storing the
117 * name into a buffer */
119 if (!ret)
121 size += (ret + 1) * sizeof(WCHAR);
122 }
123 return size;
124}
#define ALIGN_LENGTH(_Len, _Align)
Definition: usrmarshal.c:44
GLsizeiptr size
Definition: glext.h:5919
int32_t INT
Definition: typedefs.h:58
int ret

Referenced by test_marshal_CLIPFORMAT().

◆ CLIPFORMAT_UserUnmarshal()

unsigned char *__RPC_USER CLIPFORMAT_UserUnmarshal ( ULONG pFlags,
unsigned char pBuffer,
CLIPFORMAT *  pCF 
)

Definition at line 207 of file usrmarshal.c.

208{
209 LONG fContext;
210
211 TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, pCF);
212
214
215 fContext = *(DWORD *)pBuffer;
216 pBuffer += 4;
217
218 if (fContext == WDT_INPROC_CALL)
219 {
220 *pCF = *(CLIPFORMAT *)pBuffer;
221 pBuffer += 4;
222 }
223 else if (fContext == WDT_REMOTE_CALL)
224 {
225 CLIPFORMAT cf;
226 UINT len;
227
228 /* pointer ID for registered clip format string */
229 if (*(DWORD *)pBuffer == 0)
231 pBuffer += 4;
232
233 len = *(UINT *)pBuffer;
234 pBuffer += sizeof(UINT);
235 if (*(UINT *)pBuffer != 0)
237 pBuffer += sizeof(UINT);
238 if (*(UINT *)pBuffer != len)
240 pBuffer += sizeof(UINT);
241 if (((WCHAR *)pBuffer)[len - 1] != '\0')
243 TRACE("unmarshaling clip format %s\n", debugstr_w((LPCWSTR)pBuffer));
245 pBuffer += len * sizeof(WCHAR);
246 if (!cf)
248 *pCF = cf;
249 }
250 else
251 /* code not really appropriate, but nearest I can find */
253 return pBuffer;
254}
long LONG
Definition: pedump.c:60
#define RPC_S_INVALID_BOUND
Definition: winerror.h:1043
#define RPC_S_INVALID_TAG
Definition: winerror.h:1042
UINT WINAPI RegisterClipboardFormatW(_In_ LPCWSTR)
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by test_marshal_CLIPFORMAT().

◆ debugstr_user_flags()

static const char * debugstr_user_flags ( ULONG pFlags)
static

Definition at line 51 of file usrmarshal.c.

52{
53 char buf[12];
54 const char* loword;
55 switch (LOWORD(*pFlags))
56 {
57 case MSHCTX_LOCAL:
58 loword="MSHCTX_LOCAL";
59 break;
60 case MSHCTX_NOSHAREDMEM:
61 loword="MSHCTX_NOSHAREDMEM";
62 break;
63 case MSHCTX_DIFFERENTMACHINE:
64 loword="MSHCTX_DIFFERENTMACHINE";
65 break;
66 case MSHCTX_INPROC:
67 loword="MSHCTX_INPROC";
68 break;
69 default:
70 sprintf(buf, "%d", LOWORD(*pFlags));
71 loword=buf;
72 }
73
75 return wine_dbg_sprintf("MAKELONG(%s, NDR_LOCAL_DATA_REPRESENTATION)", loword);
76 else
77 return wine_dbg_sprintf("MAKELONG(%s, 0x%04x)", loword, HIWORD(*pFlags));
78}
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:296
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define NDR_LOCAL_DATA_REPRESENTATION
Definition: rpcndr.h:107
#define HIWORD(l)
Definition: typedefs.h:247

Referenced by CLIPFORMAT_UserMarshal(), CLIPFORMAT_UserSize(), CLIPFORMAT_UserUnmarshal(), HBITMAP_UserFree(), HBITMAP_UserMarshal(), HBITMAP_UserSize(), HBITMAP_UserUnmarshal(), HENHMETAFILE_UserFree(), HENHMETAFILE_UserMarshal(), HENHMETAFILE_UserSize(), HENHMETAFILE_UserUnmarshal(), HGLOBAL_UserFree(), HGLOBAL_UserMarshal(), HGLOBAL_UserSize(), HGLOBAL_UserUnmarshal(), HMETAFILE_UserFree(), HMETAFILE_UserMarshal(), HMETAFILE_UserSize(), HMETAFILE_UserUnmarshal(), HMETAFILEPICT_UserFree(), HMETAFILEPICT_UserMarshal(), HMETAFILEPICT_UserSize(), HMETAFILEPICT_UserUnmarshal(), SNB_UserMarshal(), SNB_UserSize(), SNB_UserUnmarshal(), STGMEDIUM_UserFree(), STGMEDIUM_UserMarshal(), STGMEDIUM_UserSize(), STGMEDIUM_UserUnmarshal(), WdtpInterfacePointer_UserMarshal(), WdtpInterfacePointer_UserSize(), and WdtpInterfacePointer_UserUnmarshal().

◆ FLAG_STGMEDIUM_UserFree()

void __RPC_USER FLAG_STGMEDIUM_UserFree ( ULONG pFlags,
FLAG_STGMEDIUM *  pStgMedium 
)

Definition at line 2105 of file usrmarshal.c.

2106{
2107 FIXME(":stub\n");
2108}
#define FIXME(fmt,...)
Definition: precomp.h:53

◆ FLAG_STGMEDIUM_UserMarshal()

unsigned char *__RPC_USER FLAG_STGMEDIUM_UserMarshal ( ULONG pFlags,
unsigned char pBuffer,
FLAG_STGMEDIUM *  pStgMedium 
)

Definition at line 2093 of file usrmarshal.c.

2094{
2095 FIXME(":stub\n");
2096 return pBuffer;
2097}

◆ FLAG_STGMEDIUM_UserSize()

ULONG __RPC_USER FLAG_STGMEDIUM_UserSize ( ULONG pFlags,
ULONG  StartingSize,
FLAG_STGMEDIUM *  pStgMedium 
)

Definition at line 2087 of file usrmarshal.c.

2088{
2089 FIXME(":stub\n");
2090 return StartingSize;
2091}

◆ FLAG_STGMEDIUM_UserUnmarshal()

unsigned char *__RPC_USER FLAG_STGMEDIUM_UserUnmarshal ( ULONG pFlags,
unsigned char pBuffer,
FLAG_STGMEDIUM *  pStgMedium 
)

Definition at line 2099 of file usrmarshal.c.

2100{
2101 FIXME(":stub\n");
2102 return pBuffer;
2103}

◆ handle_UserFree()

static void handle_UserFree ( ULONG pFlags,
HANDLE handle 
)
static

Definition at line 322 of file usrmarshal.c.

323{
324 /* nothing to do */
325}

◆ handle_UserMarshal()

static unsigned char * handle_UserMarshal ( ULONG pFlags,
unsigned char pBuffer,
HANDLE handle 
)
static

Definition at line 293 of file usrmarshal.c.

294{
295 RemotableHandle *remhandle;
296 if (LOWORD(*pFlags) == MSHCTX_DIFFERENTMACHINE)
297 {
298 ERR("can't remote a local handle\n");
300 return pBuffer;
301 }
302
304 remhandle = (RemotableHandle *)pBuffer;
305 remhandle->fContext = WDT_INPROC_CALL;
306 remhandle->u.hInproc = (LONG_PTR)*handle;
307 return pBuffer + sizeof(RemotableHandle);
308}
#define ERR(fmt,...)
Definition: precomp.h:57
#define LONG_PTR
Definition: treelist.c:79

◆ handle_UserSize()

static ULONG handle_UserSize ( ULONG pFlags,
ULONG  StartingSize,
HANDLE handle 
)
static

Definition at line 280 of file usrmarshal.c.

281{
282 if (LOWORD(*pFlags) == MSHCTX_DIFFERENTMACHINE)
283 {
284 ERR("can't remote a local handle\n");
286 return StartingSize;
287 }
288
289 ALIGN_LENGTH(StartingSize, 3);
290 return StartingSize + sizeof(RemotableHandle);
291}

◆ handle_UserUnmarshal()

static unsigned char * handle_UserUnmarshal ( ULONG pFlags,
unsigned char pBuffer,
HANDLE handle 
)
static

Definition at line 310 of file usrmarshal.c.

311{
312 RemotableHandle *remhandle;
313
315 remhandle = (RemotableHandle *)pBuffer;
316 if (remhandle->fContext != WDT_INPROC_CALL)
318 *handle = (HANDLE)(LONG_PTR)remhandle->u.hInproc;
319 return pBuffer + sizeof(RemotableHandle);
320}
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
PVOID HANDLE
Definition: typedefs.h:73
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090

◆ HBITMAP_UserFree()

void __RPC_USER HBITMAP_UserFree ( ULONG flags,
HBITMAP bmp 
)

Definition at line 771 of file usrmarshal.c.

772{
773 TRACE("(%s, %p)\n", debugstr_user_flags(flags), *bmp);
774
775 if (LOWORD(*flags) != MSHCTX_INPROC)
777}
pKey DeleteObject()
GLbitfield flags
Definition: glext.h:7161
BITMAP bmp
Definition: alphablend.c:62

Referenced by test_marshal_HBITMAP().

◆ HBITMAP_UserMarshal()

unsigned char *__RPC_USER HBITMAP_UserMarshal ( ULONG flags,
unsigned char buffer,
HBITMAP bmp 
)

Definition at line 641 of file usrmarshal.c.

642{
643 TRACE("(%s, %p, %p)\n", debugstr_user_flags(flags), buffer, *bmp);
644
646
647 if (LOWORD(*flags) == MSHCTX_INPROC)
648 {
649 *(ULONG *)buffer = WDT_INPROC_CALL;
650 buffer += sizeof(ULONG);
651 *(ULONG *)buffer = (ULONG)(ULONG_PTR)*bmp;
652 buffer += sizeof(ULONG);
653 }
654 else
655 {
656 *(ULONG *)buffer = WDT_REMOTE_CALL;
657 buffer += sizeof(ULONG);
658 *(ULONG *)buffer = (ULONG)(ULONG_PTR)*bmp;
659 buffer += sizeof(ULONG);
660
661 if (*bmp)
662 {
663 static const ULONG header_size = FIELD_OFFSET(userBITMAP, cbSize);
665 ULONG bitmap_size;
666
667 bitmap_size = GetBitmapBits(*bmp, 0, NULL);
668 *(ULONG *)buffer = bitmap_size;
669 buffer += sizeof(ULONG);
670
671 GetObjectW(*bmp, sizeof(BITMAP), &bitmap);
672 memcpy(buffer, &bitmap, header_size);
673 buffer += header_size;
674
675 GetBitmapBits(*bmp, bitmap_size, buffer);
676 buffer += bitmap_size;
677 }
678 }
679 return buffer;
680}
#define ULONG_PTR
Definition: config.h:101
GLuint buffer
Definition: glext.h:5915
Definition: bl.h:1331
Definition: uimain.c:89
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
LONG WINAPI GetBitmapBits(_In_ HBITMAP hbit, _In_ LONG cb, _Out_writes_bytes_(cb) LPVOID lpvBits)

Referenced by STGMEDIUM_UserMarshal(), and test_marshal_HBITMAP().

◆ HBITMAP_UserSize()

ULONG __RPC_USER HBITMAP_UserSize ( ULONG flags,
ULONG  size,
HBITMAP bmp 
)

Definition at line 598 of file usrmarshal.c.

599{
600 TRACE("(%s, %d, %p)\n", debugstr_user_flags(flags), size, *bmp);
601
602 ALIGN_LENGTH(size, 3);
603
604 size += sizeof(ULONG);
605 if (LOWORD(*flags) == MSHCTX_INPROC)
606 size += sizeof(ULONG);
607 else
608 {
609 size += sizeof(ULONG);
610
611 if (*bmp)
612 {
613 size += sizeof(ULONG);
614 size += FIELD_OFFSET(userBITMAP, cbSize);
615 size += GetBitmapBits(*bmp, 0, NULL);
616 }
617 }
618
619 return size;
620}

Referenced by STGMEDIUM_UserSize(), and test_marshal_HBITMAP().

◆ HBITMAP_UserUnmarshal()

unsigned char *__RPC_USER HBITMAP_UserUnmarshal ( ULONG flags,
unsigned char buffer,
HBITMAP bmp 
)

Definition at line 701 of file usrmarshal.c.

702{
704
705 TRACE("(%s, %p, %p)\n", debugstr_user_flags(flags), buffer, bmp);
706
708
709 context = *(ULONG *)buffer;
710 buffer += sizeof(ULONG);
711
712 if (context == WDT_INPROC_CALL)
713 {
714 *bmp = *(HBITMAP *)buffer;
715 buffer += sizeof(*bmp);
716 }
717 else if (context == WDT_REMOTE_CALL)
718 {
719 ULONG handle = *(ULONG *)buffer;
720 buffer += sizeof(ULONG);
721
722 if (handle)
723 {
724 static const ULONG header_size = FIELD_OFFSET(userBITMAP, cbSize);
726 ULONG bitmap_size;
727 unsigned char *bits;
728
729 bitmap_size = *(ULONG *)buffer;
730 buffer += sizeof(ULONG);
731 bits = HeapAlloc(GetProcessHeap(), 0, bitmap_size);
732
733 memcpy(&bitmap, buffer, header_size);
734 buffer += header_size;
735
736 memcpy(bits, buffer, bitmap_size);
737 buffer += bitmap_size;
738
739 bitmap.bmBits = bits;
741
743 }
744 else
745 *bmp = NULL;
746 }
747 else
749
750 return buffer;
751}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
#define bits
Definition: infblock.c:15
static HBITMAP
Definition: button.c:44
Definition: http.c:7252
HBITMAP WINAPI CreateBitmapIndirect(_In_ const BITMAP *pbm)

Referenced by STGMEDIUM_UserUnmarshal(), and test_marshal_HBITMAP().

◆ HENHMETAFILE_UserFree()

void __RPC_USER HENHMETAFILE_UserFree ( ULONG pFlags,
HENHMETAFILE *  phEmf 
)

Definition at line 1265 of file usrmarshal.c.

1266{
1267 TRACE("(%s, &%p\n", debugstr_user_flags(pFlags), *phEmf);
1268
1269 if (LOWORD(*pFlags) != MSHCTX_INPROC)
1270 DeleteEnhMetaFile(*phEmf);
1271}
BOOL WINAPI DeleteEnhMetaFile(_In_opt_ HENHMETAFILE)

Referenced by test_marshal_HENHMETAFILE().

◆ HENHMETAFILE_UserMarshal()

unsigned char *__RPC_USER HENHMETAFILE_UserMarshal ( ULONG pFlags,
unsigned char pBuffer,
HENHMETAFILE *  phEmf 
)

Definition at line 1142 of file usrmarshal.c.

1143{
1144 TRACE("(%s, %p, &%p\n", debugstr_user_flags(pFlags), pBuffer, *phEmf);
1145
1147
1148 if (LOWORD(*pFlags) == MSHCTX_INPROC)
1149 {
1150 if (sizeof(*phEmf) == 8)
1151 *(ULONG *)pBuffer = WDT_INPROC64_CALL;
1152 else
1153 *(ULONG *)pBuffer = WDT_INPROC_CALL;
1154 pBuffer += sizeof(ULONG);
1155 *(HENHMETAFILE *)pBuffer = *phEmf;
1156 pBuffer += sizeof(HENHMETAFILE);
1157 }
1158 else
1159 {
1160 *(ULONG *)pBuffer = WDT_REMOTE_CALL;
1161 pBuffer += sizeof(ULONG);
1162 *(ULONG *)pBuffer = (ULONG)(ULONG_PTR)*phEmf;
1163 pBuffer += sizeof(ULONG);
1164
1165 if (*phEmf)
1166 {
1167 UINT emfsize = GetEnhMetaFileBits(*phEmf, 0, NULL);
1168
1169 *(ULONG *)pBuffer = emfsize;
1170 pBuffer += sizeof(ULONG);
1171 *(ULONG *)pBuffer = emfsize;
1172 pBuffer += sizeof(ULONG);
1173 GetEnhMetaFileBits(*phEmf, emfsize, pBuffer);
1174 pBuffer += emfsize;
1175 }
1176 }
1177
1178 return pBuffer;
1179}
UINT WINAPI GetEnhMetaFileBits(_In_ HENHMETAFILE hEMF, _In_ UINT nSize, _Out_writes_bytes_opt_(nSize) LPBYTE lpData)

Referenced by STGMEDIUM_UserMarshal(), and test_marshal_HENHMETAFILE().

◆ HENHMETAFILE_UserSize()

ULONG __RPC_USER HENHMETAFILE_UserSize ( ULONG pFlags,
ULONG  size,
HENHMETAFILE *  phEmf 
)

Definition at line 1097 of file usrmarshal.c.

1098{
1099 TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), size, *phEmf);
1100
1101 ALIGN_LENGTH(size, 3);
1102
1103 size += sizeof(ULONG);
1104 if (LOWORD(*pFlags) == MSHCTX_INPROC)
1105 size += sizeof(ULONG_PTR);
1106 else
1107 {
1108 size += sizeof(ULONG);
1109
1110 if (*phEmf)
1111 {
1112 UINT emfsize;
1113
1114 size += 2 * sizeof(ULONG);
1115 emfsize = GetEnhMetaFileBits(*phEmf, 0, NULL);
1116 size += emfsize;
1117 }
1118 }
1119
1120 return size;
1121}
uint32_t ULONG_PTR
Definition: typedefs.h:65

Referenced by STGMEDIUM_UserSize(), and test_marshal_HENHMETAFILE().

◆ HENHMETAFILE_UserUnmarshal()

unsigned char *__RPC_USER HENHMETAFILE_UserUnmarshal ( ULONG pFlags,
unsigned char pBuffer,
HENHMETAFILE *  phEmf 
)

Definition at line 1200 of file usrmarshal.c.

1201{
1202 ULONG fContext;
1203
1204 TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, phEmf);
1205
1207
1208 fContext = *(ULONG *)pBuffer;
1209 pBuffer += sizeof(ULONG);
1210
1211 if (((fContext == WDT_INPROC_CALL) && (sizeof(*phEmf) < 8)) ||
1212 ((fContext == WDT_INPROC64_CALL) && (sizeof(*phEmf) == 8)))
1213 {
1214 *phEmf = *(HENHMETAFILE *)pBuffer;
1215 pBuffer += sizeof(*phEmf);
1216 }
1217 else if (fContext == WDT_REMOTE_CALL)
1218 {
1219 ULONG handle;
1220
1221 handle = *(ULONG *)pBuffer;
1222 pBuffer += sizeof(ULONG);
1223
1224 if (handle)
1225 {
1226 ULONG size;
1227 size = *(ULONG *)pBuffer;
1228 pBuffer += sizeof(ULONG);
1229 if (size != *(ULONG *)pBuffer)
1230 {
1232 return pBuffer;
1233 }
1234 pBuffer += sizeof(ULONG);
1235 *phEmf = SetEnhMetaFileBits(size, pBuffer);
1236 pBuffer += size;
1237 }
1238 else
1239 *phEmf = NULL;
1240 }
1241 else
1243
1244 return pBuffer;
1245}
HENHMETAFILE WINAPI SetEnhMetaFileBits(_In_ UINT nSize, _In_reads_bytes_(nSize) const BYTE *pb)

Referenced by STGMEDIUM_UserUnmarshal(), and test_marshal_HENHMETAFILE().

◆ HGLOBAL_UserFree()

void __RPC_USER HGLOBAL_UserFree ( ULONG pFlags,
HGLOBAL phGlobal 
)

Definition at line 570 of file usrmarshal.c.

571{
572 TRACE("(%s, &%p\n", debugstr_user_flags(pFlags), *phGlobal);
573
574 if (LOWORD(*pFlags) != MSHCTX_INPROC && *phGlobal)
575 GlobalFree(*phGlobal);
576}
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611

Referenced by test_marshal_HGLOBAL().

◆ HGLOBAL_UserMarshal()

unsigned char *__RPC_USER HGLOBAL_UserMarshal ( ULONG pFlags,
unsigned char pBuffer,
HGLOBAL phGlobal 
)

Definition at line 425 of file usrmarshal.c.

426{
427 TRACE("(%s, %p, &%p\n", debugstr_user_flags(pFlags), pBuffer, *phGlobal);
428
430
431 if (LOWORD(*pFlags) == MSHCTX_INPROC)
432 {
433 if (sizeof(*phGlobal) == 8)
434 *(ULONG *)pBuffer = WDT_INPROC64_CALL;
435 else
436 *(ULONG *)pBuffer = WDT_INPROC_CALL;
437 pBuffer += sizeof(ULONG);
438 *(HGLOBAL *)pBuffer = *phGlobal;
439 pBuffer += sizeof(HGLOBAL);
440 }
441 else
442 {
443 *(ULONG *)pBuffer = WDT_REMOTE_CALL;
444 pBuffer += sizeof(ULONG);
445 *(ULONG *)pBuffer = HandleToULong(*phGlobal);
446 pBuffer += sizeof(ULONG);
447 if (*phGlobal)
448 {
449 const unsigned char *memory;
450 SIZE_T size = GlobalSize(*phGlobal);
451 *(ULONG *)pBuffer = (ULONG)size;
452 pBuffer += sizeof(ULONG);
453 *(ULONG *)pBuffer = HandleToULong(*phGlobal);
454 pBuffer += sizeof(ULONG);
455 *(ULONG *)pBuffer = (ULONG)size;
456 pBuffer += sizeof(ULONG);
457
458 memory = GlobalLock(*phGlobal);
460 pBuffer += size;
461 GlobalUnlock(*phGlobal);
462 }
463 }
464
465 return pBuffer;
466}
#define HandleToULong(h)
Definition: basetsd.h:95
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
Definition: heapmem.c:1090
static char memory[1024 *256]
Definition: process.c:116
#define HGLOBAL
Definition: ole.h:15
ULONG_PTR SIZE_T
Definition: typedefs.h:80

Referenced by STGMEDIUM_UserMarshal(), and test_marshal_HGLOBAL().

◆ HGLOBAL_UserSize()

ULONG __RPC_USER HGLOBAL_UserSize ( ULONG pFlags,
ULONG  StartingSize,
HGLOBAL phGlobal 
)

Definition at line 379 of file usrmarshal.c.

380{
381 ULONG size = StartingSize;
382
383 TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, phGlobal);
384
385 ALIGN_LENGTH(size, 3);
386
387 size += sizeof(ULONG);
388
389 if (LOWORD(*pFlags) == MSHCTX_INPROC)
390 size += sizeof(HGLOBAL);
391 else
392 {
393 size += sizeof(ULONG);
394 if (*phGlobal)
395 {
396 SIZE_T ret;
397 size += 3 * sizeof(ULONG);
398 ret = GlobalSize(*phGlobal);
399 size += (ULONG)ret;
400 }
401 }
402
403 return size;
404}

Referenced by STGMEDIUM_UserSize(), and test_marshal_HGLOBAL().

◆ HGLOBAL_UserUnmarshal()

unsigned char *__RPC_USER HGLOBAL_UserUnmarshal ( ULONG pFlags,
unsigned char pBuffer,
HGLOBAL phGlobal 
)

Definition at line 487 of file usrmarshal.c.

488{
489 ULONG fContext;
490
491 TRACE("(%s, %p, &%p\n", debugstr_user_flags(pFlags), pBuffer, *phGlobal);
492
494
495 fContext = *(ULONG *)pBuffer;
496 pBuffer += sizeof(ULONG);
497
498 if (((fContext == WDT_INPROC_CALL) && (sizeof(*phGlobal) < 8)) ||
499 ((fContext == WDT_INPROC64_CALL) && (sizeof(*phGlobal) == 8)))
500 {
501 *phGlobal = *(HGLOBAL *)pBuffer;
502 pBuffer += sizeof(*phGlobal);
503 }
504 else if (fContext == WDT_REMOTE_CALL)
505 {
507
508 handle = *(ULONG *)pBuffer;
509 pBuffer += sizeof(ULONG);
510
511 if (handle)
512 {
513 ULONG size;
514 void *memory;
515
516 size = *(ULONG *)pBuffer;
517 pBuffer += sizeof(ULONG);
518 /* redundancy is bad - it means you have to check consistency like
519 * this: */
520 if (*(ULONG *)pBuffer != handle)
521 {
523 return pBuffer;
524 }
525 pBuffer += sizeof(ULONG);
526 /* redundancy is bad - it means you have to check consistency like
527 * this: */
528 if (*(ULONG *)pBuffer != size)
529 {
531 return pBuffer;
532 }
533 pBuffer += sizeof(ULONG);
534
535 /* FIXME: check size is not too big */
536
537 *phGlobal = GlobalAlloc(GMEM_MOVEABLE, size);
538 memory = GlobalLock(*phGlobal);
540 pBuffer += size;
541 GlobalUnlock(*phGlobal);
542 }
543 else
544 *phGlobal = NULL;
545 }
546 else
548
549 return pBuffer;
550}
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
#define GMEM_MOVEABLE
Definition: winbase.h:320

Referenced by STGMEDIUM_UserUnmarshal(), and test_marshal_HGLOBAL().

◆ HMETAFILE_UserFree()

void __RPC_USER HMETAFILE_UserFree ( ULONG pFlags,
HMETAFILE *  phmf 
)

Definition at line 1069 of file usrmarshal.c.

1070{
1071 TRACE("(%s, &%p\n", debugstr_user_flags(pFlags), *phmf);
1072
1073 if (LOWORD(*pFlags) != MSHCTX_INPROC)
1074 DeleteMetaFile(*phmf);
1075}
BOOL WINAPI DeleteMetaFile(_In_ HMETAFILE)

Referenced by HMETAFILEPICT_UserFree(), and test_marshal_HMETAFILE().

◆ HMETAFILE_UserMarshal()

unsigned char *__RPC_USER HMETAFILE_UserMarshal ( ULONG pFlags,
unsigned char pBuffer,
HMETAFILE *  phmf 
)

Definition at line 946 of file usrmarshal.c.

947{
948 TRACE("(%s, %p, &%p\n", debugstr_user_flags(pFlags), pBuffer, *phmf);
949
951
952 if (LOWORD(*pFlags) == MSHCTX_INPROC)
953 {
954 if (sizeof(*phmf) == 8)
955 *(ULONG *)pBuffer = WDT_INPROC64_CALL;
956 else
957 *(ULONG *)pBuffer = WDT_INPROC_CALL;
958 pBuffer += sizeof(ULONG);
959 *(HMETAFILE *)pBuffer = *phmf;
960 pBuffer += sizeof(HMETAFILE);
961 }
962 else
963 {
964 *(ULONG *)pBuffer = WDT_REMOTE_CALL;
965 pBuffer += sizeof(ULONG);
966 *(ULONG *)pBuffer = (ULONG)(ULONG_PTR)*phmf;
967 pBuffer += sizeof(ULONG);
968
969 if (*phmf)
970 {
971 UINT mfsize = GetMetaFileBitsEx(*phmf, 0, NULL);
972
973 *(ULONG *)pBuffer = mfsize;
974 pBuffer += sizeof(ULONG);
975 *(ULONG *)pBuffer = mfsize;
976 pBuffer += sizeof(ULONG);
977 GetMetaFileBitsEx(*phmf, mfsize, pBuffer);
978 pBuffer += mfsize;
979 }
980 }
981
982 return pBuffer;
983}
UINT WINAPI GetMetaFileBitsEx(_In_ HMETAFILE hMF, _In_ UINT cbBuffer, _Out_writes_bytes_opt_(cbBuffer) LPVOID lpData)

Referenced by HMETAFILEPICT_UserMarshal(), and test_marshal_HMETAFILE().

◆ HMETAFILE_UserSize()

ULONG __RPC_USER HMETAFILE_UserSize ( ULONG pFlags,
ULONG  StartingSize,
HMETAFILE *  phmf 
)

Definition at line 899 of file usrmarshal.c.

900{
901 ULONG size = StartingSize;
902
903 TRACE("(%s, %d, &%p\n", debugstr_user_flags(pFlags), StartingSize, *phmf);
904
905 ALIGN_LENGTH(size, 3);
906
907 size += sizeof(ULONG);
908 if (LOWORD(*pFlags) == MSHCTX_INPROC)
909 size += sizeof(ULONG_PTR);
910 else
911 {
912 size += sizeof(ULONG);
913
914 if (*phmf)
915 {
916 UINT mfsize;
917
918 size += 2 * sizeof(ULONG);
919 mfsize = GetMetaFileBitsEx(*phmf, 0, NULL);
920 size += mfsize;
921 }
922 }
923
924 return size;
925}

Referenced by HMETAFILEPICT_UserSize(), and test_marshal_HMETAFILE().

◆ HMETAFILE_UserUnmarshal()

unsigned char *__RPC_USER HMETAFILE_UserUnmarshal ( ULONG pFlags,
unsigned char pBuffer,
HMETAFILE *  phmf 
)

Definition at line 1004 of file usrmarshal.c.

1005{
1006 ULONG fContext;
1007
1008 TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, phmf);
1009
1011
1012 fContext = *(ULONG *)pBuffer;
1013 pBuffer += sizeof(ULONG);
1014
1015 if (((fContext == WDT_INPROC_CALL) && (sizeof(*phmf) < 8)) ||
1016 ((fContext == WDT_INPROC64_CALL) && (sizeof(*phmf) == 8)))
1017 {
1018 *phmf = *(HMETAFILE *)pBuffer;
1019 pBuffer += sizeof(*phmf);
1020 }
1021 else if (fContext == WDT_REMOTE_CALL)
1022 {
1023 ULONG handle;
1024
1025 handle = *(ULONG *)pBuffer;
1026 pBuffer += sizeof(ULONG);
1027
1028 if (handle)
1029 {
1030 ULONG size;
1031 size = *(ULONG *)pBuffer;
1032 pBuffer += sizeof(ULONG);
1033 if (size != *(ULONG *)pBuffer)
1034 {
1036 return pBuffer;
1037 }
1038 pBuffer += sizeof(ULONG);
1039 *phmf = SetMetaFileBitsEx(size, pBuffer);
1040 pBuffer += size;
1041 }
1042 else
1043 *phmf = NULL;
1044 }
1045 else
1047
1048 return pBuffer;
1049}
HMETAFILE WINAPI SetMetaFileBitsEx(_In_ UINT cbBuffer, _In_reads_bytes_(cbBuffer) CONST BYTE *lpData)

Referenced by HMETAFILEPICT_UserUnmarshal(), and test_marshal_HMETAFILE().

◆ HMETAFILEPICT_UserFree()

void __RPC_USER HMETAFILEPICT_UserFree ( ULONG pFlags,
HMETAFILEPICT *  phMfp 
)

Definition at line 1477 of file usrmarshal.c.

1478{
1479 TRACE("(%s, &%p)\n", debugstr_user_flags(pFlags), *phMfp);
1480
1481 if ((LOWORD(*pFlags) != MSHCTX_INPROC) && *phMfp)
1482 {
1483 METAFILEPICT *mfpict;
1484
1485 mfpict = GlobalLock(*phMfp);
1486 /* FIXME: raise an exception if mfpict is NULL? */
1487 HMETAFILE_UserFree(pFlags, &mfpict->hMF);
1488 GlobalUnlock(*phMfp);
1489
1490 GlobalFree(*phMfp);
1491 }
1492}
void __RPC_USER HMETAFILE_UserFree(ULONG *pFlags, HMETAFILE *phmf)
Definition: usrmarshal.c:1069
HMETAFILE hMF
Definition: wingdi.h:2608

Referenced by test_marshal_HMETAFILEPICT().

◆ HMETAFILEPICT_UserMarshal()

unsigned char *__RPC_USER HMETAFILEPICT_UserMarshal ( ULONG pFlags,
unsigned char pBuffer,
HMETAFILEPICT *  phMfp 
)

Definition at line 1343 of file usrmarshal.c.

1344{
1345 TRACE("(%s, %p, &%p)\n", debugstr_user_flags(pFlags), pBuffer, *phMfp);
1346
1348
1349 if (LOWORD(*pFlags) == MSHCTX_INPROC)
1350 {
1351 if (sizeof(HMETAFILEPICT) == 8)
1352 *(ULONG *)pBuffer = WDT_INPROC64_CALL;
1353 else
1354 *(ULONG *)pBuffer = WDT_INPROC_CALL;
1355 pBuffer += sizeof(ULONG);
1356 *(HMETAFILEPICT *)pBuffer = *phMfp;
1357 pBuffer += sizeof(HMETAFILEPICT);
1358 }
1359 else
1360 {
1361 *(ULONG *)pBuffer = WDT_REMOTE_CALL;
1362 pBuffer += sizeof(ULONG);
1363 *(ULONG *)pBuffer = (ULONG)(ULONG_PTR)*phMfp;
1364 pBuffer += sizeof(ULONG);
1365
1366 if (*phMfp)
1367 {
1368 METAFILEPICT *mfpict = GlobalLock(*phMfp);
1369 remoteMETAFILEPICT * remmfpict = (remoteMETAFILEPICT *)pBuffer;
1370
1371 /* FIXME: raise an exception if mfpict is NULL? */
1372 remmfpict->mm = mfpict->mm;
1373 remmfpict->xExt = mfpict->xExt;
1374 remmfpict->yExt = mfpict->yExt;
1375 pBuffer += 3 * sizeof(ULONG);
1377 pBuffer += sizeof(ULONG);
1378
1379 pBuffer = HMETAFILE_UserMarshal(pFlags, pBuffer, &mfpict->hMF);
1380
1381 GlobalUnlock(*phMfp);
1382 }
1383 }
1384 return pBuffer;
1385}
#define USER_MARSHAL_PTR_PREFIX
Definition: usrmarshal.c:47
unsigned char *__RPC_USER HMETAFILE_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HMETAFILE *phmf)
Definition: usrmarshal.c:946

Referenced by STGMEDIUM_UserMarshal(), and test_marshal_HMETAFILEPICT().

◆ HMETAFILEPICT_UserSize()

ULONG __RPC_USER HMETAFILEPICT_UserSize ( ULONG pFlags,
ULONG  size,
HMETAFILEPICT *  phMfp 
)

Definition at line 1293 of file usrmarshal.c.

1294{
1295 TRACE("(%s, %d, &%p)\n", debugstr_user_flags(pFlags), size, *phMfp);
1296
1297 ALIGN_LENGTH(size, 3);
1298
1299 size += sizeof(ULONG);
1300
1301 if(LOWORD(*pFlags) == MSHCTX_INPROC)
1302 size += sizeof(HMETAFILEPICT);
1303 else
1304 {
1305 size += sizeof(ULONG);
1306
1307 if (*phMfp)
1308 {
1309 METAFILEPICT *mfpict = GlobalLock(*phMfp);
1310
1311 /* FIXME: raise an exception if mfpict is NULL? */
1312 size += 3 * sizeof(ULONG);
1313 size += sizeof(ULONG);
1314
1315 size = HMETAFILE_UserSize(pFlags, size, &mfpict->hMF);
1316
1317 GlobalUnlock(*phMfp);
1318 }
1319 }
1320
1321 return size;
1322}
ULONG __RPC_USER HMETAFILE_UserSize(ULONG *pFlags, ULONG StartingSize, HMETAFILE *phmf)
Definition: usrmarshal.c:899

Referenced by STGMEDIUM_UserSize(), and test_marshal_HMETAFILEPICT().

◆ HMETAFILEPICT_UserUnmarshal()

unsigned char *__RPC_USER HMETAFILEPICT_UserUnmarshal ( ULONG pFlags,
unsigned char pBuffer,
HMETAFILEPICT *  phMfp 
)

Definition at line 1406 of file usrmarshal.c.

1407{
1408 ULONG fContext;
1409
1410 TRACE("(%s, %p, %p)\n", debugstr_user_flags(pFlags), pBuffer, phMfp);
1411
1413
1414 fContext = *(ULONG *)pBuffer;
1415 pBuffer += sizeof(ULONG);
1416
1417 if ((fContext == WDT_INPROC_CALL) || fContext == WDT_INPROC64_CALL)
1418 {
1419 *phMfp = *(HMETAFILEPICT *)pBuffer;
1420 pBuffer += sizeof(HMETAFILEPICT);
1421 }
1422 else
1423 {
1424 ULONG handle = *(ULONG *)pBuffer;
1425 pBuffer += sizeof(ULONG);
1426 *phMfp = NULL;
1427
1428 if(handle)
1429 {
1430 METAFILEPICT *mfpict;
1431 const remoteMETAFILEPICT *remmfpict;
1432 ULONG user_marshal_prefix;
1433
1434 remmfpict = (const remoteMETAFILEPICT *)pBuffer;
1435
1436 *phMfp = GlobalAlloc(GMEM_MOVEABLE, sizeof(METAFILEPICT));
1437 if (!*phMfp)
1439
1440 mfpict = GlobalLock(*phMfp);
1441 mfpict->mm = remmfpict->mm;
1442 mfpict->xExt = remmfpict->xExt;
1443 mfpict->yExt = remmfpict->yExt;
1444 pBuffer += 3 * sizeof(ULONG);
1445 user_marshal_prefix = *(ULONG *)pBuffer;
1446 pBuffer += sizeof(ULONG);
1447
1448 if (user_marshal_prefix != USER_MARSHAL_PTR_PREFIX)
1450
1451 pBuffer = HMETAFILE_UserUnmarshal(pFlags, pBuffer, &mfpict->hMF);
1452
1453 GlobalUnlock(*phMfp);
1454 }
1455 }
1456 return pBuffer;
1457}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
unsigned char *__RPC_USER HMETAFILE_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, HMETAFILE *phmf)
Definition: usrmarshal.c:1004
#define RPC_X_INVALID_TAG
Definition: rpcnterr.h:37
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:188

Referenced by STGMEDIUM_UserUnmarshal(), and test_marshal_HMETAFILEPICT().

◆ HPALETTE_UserFree()

void __RPC_USER HPALETTE_UserFree ( ULONG pFlags,
HPALETTE *  phPal 
)

Definition at line 873 of file usrmarshal.c.

874{
875 FIXME(":stub\n");
876}

◆ HPALETTE_UserMarshal()

unsigned char *__RPC_USER HPALETTE_UserMarshal ( ULONG pFlags,
unsigned char pBuffer,
HPALETTE *  phPal 
)

Definition at line 824 of file usrmarshal.c.

825{
826 FIXME(":stub\n");
827 return pBuffer;
828}

◆ HPALETTE_UserSize()

ULONG __RPC_USER HPALETTE_UserSize ( ULONG pFlags,
ULONG  StartingSize,
HPALETTE *  phPal 
)

Definition at line 799 of file usrmarshal.c.

800{
801 FIXME(":stub\n");
802 return StartingSize;
803}

◆ HPALETTE_UserUnmarshal()

unsigned char *__RPC_USER HPALETTE_UserUnmarshal ( ULONG pFlags,
unsigned char pBuffer,
HPALETTE *  phPal 
)

Definition at line 849 of file usrmarshal.c.

850{
851 FIXME(":stub\n");
852 return pBuffer;
853}

◆ IAdviseSink2_OnLinkSrcChange_Proxy()

void CALLBACK IAdviseSink2_OnLinkSrcChange_Proxy ( IAdviseSink2 This,
IMoniker pmk 
)

Definition at line 2884 of file usrmarshal.c.

2887{
2888 TRACE("(%p)->(%p)\n", This, pmk);
2889 IAdviseSink2_RemoteOnLinkSrcChange_Proxy(This, pmk);
2890}

◆ IAdviseSink2_OnLinkSrcChange_Stub()

HRESULT __RPC_STUB IAdviseSink2_OnLinkSrcChange_Stub ( IAdviseSink2 This,
IMoniker pmk 
)

Definition at line 2892 of file usrmarshal.c.

2895{
2896 TRACE("(%p)->(%p)\n", This, pmk);
2897 IAdviseSink2_OnLinkSrcChange(This, pmk);
2898 return S_OK;
2899}
#define S_OK
Definition: intsafe.h:52

◆ IAdviseSink_OnClose_Proxy()

void CALLBACK IAdviseSink_OnClose_Proxy ( IAdviseSink This)

Definition at line 2869 of file usrmarshal.c.

2871{
2872 TRACE("(%p)\n", This);
2873 IAdviseSink_RemoteOnClose_Proxy(This);
2874}

◆ IAdviseSink_OnClose_Stub()

HRESULT __RPC_STUB IAdviseSink_OnClose_Stub ( IAdviseSink This)

Definition at line 2876 of file usrmarshal.c.

2878{
2879 TRACE("(%p)\n", This);
2880 IAdviseSink_OnClose(This);
2881 return S_OK;
2882}

◆ IAdviseSink_OnDataChange_Proxy()

void CALLBACK IAdviseSink_OnDataChange_Proxy ( IAdviseSink This,
FORMATETC *  pFormatetc,
STGMEDIUM *  pStgmed 
)

Definition at line 2799 of file usrmarshal.c.

2803{
2804 TRACE("(%p)->(%p, %p)\n", This, pFormatetc, pStgmed);
2805 IAdviseSink_RemoteOnDataChange_Proxy(This, pFormatetc, pStgmed);
2806}

◆ IAdviseSink_OnDataChange_Stub()

HRESULT __RPC_STUB IAdviseSink_OnDataChange_Stub ( IAdviseSink This,
FORMATETC *  pFormatetc,
ASYNC_STGMEDIUM *  pStgmed 
)

Definition at line 2808 of file usrmarshal.c.

2812{
2813 TRACE("(%p)->(%p, %p)\n", This, pFormatetc, pStgmed);
2814 IAdviseSink_OnDataChange(This, pFormatetc, pStgmed);
2815 return S_OK;
2816}

◆ IAdviseSink_OnRename_Proxy()

void CALLBACK IAdviseSink_OnRename_Proxy ( IAdviseSink This,
IMoniker pmk 
)

Definition at line 2837 of file usrmarshal.c.

2840{
2841 TRACE("(%p)->(%p)\n", This, pmk);
2842 IAdviseSink_RemoteOnRename_Proxy(This, pmk);
2843}

◆ IAdviseSink_OnRename_Stub()

HRESULT __RPC_STUB IAdviseSink_OnRename_Stub ( IAdviseSink This,
IMoniker pmk 
)

Definition at line 2845 of file usrmarshal.c.

2848{
2849 TRACE("(%p)->(%p)\n", This, pmk);
2850 IAdviseSink_OnRename(This, pmk);
2851 return S_OK;
2852}

◆ IAdviseSink_OnSave_Proxy()

void CALLBACK IAdviseSink_OnSave_Proxy ( IAdviseSink This)

Definition at line 2854 of file usrmarshal.c.

2856{
2857 TRACE("(%p)\n", This);
2858 IAdviseSink_RemoteOnSave_Proxy(This);
2859}

◆ IAdviseSink_OnSave_Stub()

HRESULT __RPC_STUB IAdviseSink_OnSave_Stub ( IAdviseSink This)

Definition at line 2861 of file usrmarshal.c.

2863{
2864 TRACE("(%p)\n", This);
2865 IAdviseSink_OnSave(This);
2866 return S_OK;
2867}

◆ IAdviseSink_OnViewChange_Proxy()

void CALLBACK IAdviseSink_OnViewChange_Proxy ( IAdviseSink This,
DWORD  dwAspect,
LONG  lindex 
)

Definition at line 2818 of file usrmarshal.c.

2822{
2823 TRACE("(%p)->(%d, %d)\n", This, dwAspect, lindex);
2824 IAdviseSink_RemoteOnViewChange_Proxy(This, dwAspect, lindex);
2825}

◆ IAdviseSink_OnViewChange_Stub()

HRESULT __RPC_STUB IAdviseSink_OnViewChange_Stub ( IAdviseSink This,
DWORD  dwAspect,
LONG  lindex 
)

Definition at line 2827 of file usrmarshal.c.

2831{
2832 TRACE("(%p)->(%d, %d)\n", This, dwAspect, lindex);
2833 IAdviseSink_OnViewChange(This, dwAspect, lindex);
2834 return S_OK;
2835}

◆ IBindCtx_GetBindOptions_Proxy()

HRESULT CALLBACK IBindCtx_GetBindOptions_Proxy ( IBindCtx This,
BIND_OPTS *  pbindopts 
)

Definition at line 2313 of file usrmarshal.c.

2316{
2317 FIXME(":stub\n");
2318 return E_NOTIMPL;
2319}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IBindCtx_GetBindOptions_Stub()

HRESULT __RPC_STUB IBindCtx_GetBindOptions_Stub ( IBindCtx This,
BIND_OPTS2 *  pbindopts 
)

Definition at line 2321 of file usrmarshal.c.

2324{
2325 FIXME(":stub\n");
2326 return E_NOTIMPL;
2327}

◆ IBindCtx_SetBindOptions_Proxy()

HRESULT CALLBACK IBindCtx_SetBindOptions_Proxy ( IBindCtx This,
BIND_OPTS *  pbindopts 
)

Definition at line 2297 of file usrmarshal.c.

2300{
2301 FIXME(":stub\n");
2302 return E_NOTIMPL;
2303}

◆ IBindCtx_SetBindOptions_Stub()

HRESULT __RPC_STUB IBindCtx_SetBindOptions_Stub ( IBindCtx This,
BIND_OPTS2 *  pbindopts 
)

Definition at line 2305 of file usrmarshal.c.

2308{
2309 FIXME(":stub\n");
2310 return E_NOTIMPL;
2311}

◆ IClassFactory_CreateInstance_Proxy()

HRESULT CALLBACK IClassFactory_CreateInstance_Proxy ( IClassFactory This,
IUnknown pUnkOuter,
REFIID  riid,
void **  ppvObject 
)

Definition at line 2227 of file usrmarshal.c.

2232{
2233 TRACE("(%p, %s, %p)\n", pUnkOuter, debugstr_guid(riid), ppvObject);
2234 *ppvObject = NULL;
2235 if (pUnkOuter)
2236 {
2237 ERR("aggregation is not allowed on remote objects\n");
2238 return CLASS_E_NOAGGREGATION;
2239 }
2240 return IClassFactory_RemoteCreateInstance_Proxy(This, riid,
2241 (IUnknown **) ppvObject);
2242}
REFIID riid
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662

◆ IClassFactory_CreateInstance_Stub()

HRESULT __RPC_STUB IClassFactory_CreateInstance_Stub ( IClassFactory This,
REFIID  riid,
IUnknown **  ppvObject 
)

Definition at line 2244 of file usrmarshal.c.

2248{
2249 TRACE("(%s, %p)\n", debugstr_guid(riid), ppvObject);
2250 return IClassFactory_CreateInstance(This, NULL, riid, (void **) ppvObject);
2251}

◆ IClassFactory_LockServer_Proxy()

HRESULT CALLBACK IClassFactory_LockServer_Proxy ( IClassFactory This,
BOOL  fLock 
)

Definition at line 2253 of file usrmarshal.c.

2256{
2257 FIXME(":stub\n");
2258 return E_NOTIMPL;
2259}

◆ IClassFactory_LockServer_Stub()

HRESULT __RPC_STUB IClassFactory_LockServer_Stub ( IClassFactory This,
BOOL  fLock 
)

Definition at line 2261 of file usrmarshal.c.

2264{
2265 FIXME(":stub\n");
2266 return E_NOTIMPL;
2267}

◆ IDataObject_GetData_Proxy()

HRESULT CALLBACK IDataObject_GetData_Proxy ( IDataObject This,
FORMATETC *  pformatetcIn,
STGMEDIUM *  pmedium 
)

Definition at line 2901 of file usrmarshal.c.

2905{
2906 TRACE("(%p)->(%p, %p)\n", This, pformatetcIn, pmedium);
2907 return IDataObject_RemoteGetData_Proxy(This, pformatetcIn, pmedium);
2908}

◆ IDataObject_GetData_Stub()

HRESULT __RPC_STUB IDataObject_GetData_Stub ( IDataObject This,
FORMATETC *  pformatetcIn,
STGMEDIUM *  pRemoteMedium 
)

Definition at line 2910 of file usrmarshal.c.

2914{
2915 TRACE("(%p)->(%p, %p)\n", This, pformatetcIn, pRemoteMedium);
2916 return IDataObject_GetData(This, pformatetcIn, pRemoteMedium);
2917}

◆ IDataObject_GetDataHere_Proxy()

HRESULT CALLBACK IDataObject_GetDataHere_Proxy ( IDataObject iface,
FORMATETC *  fmt,
STGMEDIUM *  med 
)

Definition at line 2919 of file usrmarshal.c.

2920{
2921 IUnknown *release;
2922 IStorage *stg = NULL;
2923 HRESULT hr;
2924
2925 TRACE("(%p)->(%p, %p)\n", iface, fmt, med);
2926
2927 if ((med->tymed & (TYMED_HGLOBAL | TYMED_FILE | TYMED_ISTREAM | TYMED_ISTORAGE)) == 0)
2928 return DV_E_TYMED;
2929 if (med->tymed != fmt->tymed)
2930 return DV_E_TYMED;
2931
2932 release = med->pUnkForRelease;
2933 med->pUnkForRelease = NULL;
2934
2935 if (med->tymed == TYMED_ISTREAM || med->tymed == TYMED_ISTORAGE)
2936 {
2937 stg = med->u.pstg; /* This may actually be a stream, but that's ok */
2938 if (stg) IStorage_AddRef( stg );
2939 }
2940
2941 hr = IDataObject_RemoteGetDataHere_Proxy(iface, fmt, med);
2942
2943 med->pUnkForRelease = release;
2944 if (stg)
2945 {
2946 if (med->u.pstg)
2947 IStorage_Release( med->u.pstg );
2948 med->u.pstg = stg;
2949 }
2950
2951 return hr;
2952}
HRESULT hr
Definition: shlfolder.c:183
Definition: dsound.c:943
#define DV_E_TYMED
Definition: winerror.h:2638

◆ IDataObject_GetDataHere_Stub()

HRESULT __RPC_STUB IDataObject_GetDataHere_Stub ( IDataObject This,
FORMATETC *  pformatetc,
STGMEDIUM *  pRemoteMedium 
)

Definition at line 2954 of file usrmarshal.c.

2958{
2959 TRACE("(%p)->(%p, %p)\n", This, pformatetc, pRemoteMedium);
2960 return IDataObject_GetDataHere(This, pformatetc, pRemoteMedium);
2961}

◆ IDataObject_SetData_Proxy()

HRESULT CALLBACK IDataObject_SetData_Proxy ( IDataObject This,
FORMATETC *  pformatetc,
STGMEDIUM *  pmedium,
BOOL  fRelease 
)

Definition at line 2963 of file usrmarshal.c.

2968{
2969 FIXME(":stub\n");
2970 return E_NOTIMPL;
2971}

◆ IDataObject_SetData_Stub()

HRESULT __RPC_STUB IDataObject_SetData_Stub ( IDataObject This,
FORMATETC *  pformatetc,
FLAG_STGMEDIUM *  pmedium,
BOOL  fRelease 
)

Definition at line 2973 of file usrmarshal.c.

2978{
2979 FIXME(":stub\n");
2980 return E_NOTIMPL;
2981}

◆ IEnumFORMATETC_Next_Proxy()

HRESULT CALLBACK IEnumFORMATETC_Next_Proxy ( IEnumFORMATETC This,
ULONG  celt,
FORMATETC *  rgelt,
ULONG pceltFetched 
)

Definition at line 2749 of file usrmarshal.c.

2754{
2755 ULONG fetched;
2756 if (!pceltFetched) pceltFetched = &fetched;
2757 return IEnumFORMATETC_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
2758}

◆ IEnumFORMATETC_Next_Stub()

HRESULT __RPC_STUB IEnumFORMATETC_Next_Stub ( IEnumFORMATETC This,
ULONG  celt,
FORMATETC *  rgelt,
ULONG pceltFetched 
)

Definition at line 2760 of file usrmarshal.c.

2765{
2766 HRESULT hr;
2767 *pceltFetched = 0;
2768 hr = IEnumFORMATETC_Next(This, celt, rgelt, pceltFetched);
2769 if (hr == S_OK) *pceltFetched = celt;
2770 return hr;
2771}

◆ IEnumMoniker_Next_Proxy()

HRESULT CALLBACK IEnumMoniker_Next_Proxy ( IEnumMoniker This,
ULONG  celt,
IMoniker **  rgelt,
ULONG pceltFetched 
)

Definition at line 2329 of file usrmarshal.c.

2334{
2335 ULONG fetched;
2336 TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
2337 if (!pceltFetched) pceltFetched = &fetched;
2338 return IEnumMoniker_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
2339}

◆ IEnumMoniker_Next_Stub()

HRESULT __RPC_STUB IEnumMoniker_Next_Stub ( IEnumMoniker This,
ULONG  celt,
IMoniker **  rgelt,
ULONG pceltFetched 
)

Definition at line 2341 of file usrmarshal.c.

2346{
2347 HRESULT hr;
2348 TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
2349 *pceltFetched = 0;
2350 hr = IEnumMoniker_Next(This, celt, rgelt, pceltFetched);
2351 if (hr == S_OK) *pceltFetched = celt;
2352 return hr;
2353}

◆ IEnumOLEVERB_Next_Proxy()

HRESULT CALLBACK IEnumOLEVERB_Next_Proxy ( IEnumOLEVERB This,
ULONG  celt,
LPOLEVERB  rgelt,
ULONG pceltFetched 
)

Definition at line 3041 of file usrmarshal.c.

3046{
3047 ULONG fetched;
3048 TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
3049 if (!pceltFetched) pceltFetched = &fetched;
3050 return IEnumOLEVERB_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
3051}

◆ IEnumOLEVERB_Next_Stub()

HRESULT __RPC_STUB IEnumOLEVERB_Next_Stub ( IEnumOLEVERB This,
ULONG  celt,
LPOLEVERB  rgelt,
ULONG pceltFetched 
)

Definition at line 3053 of file usrmarshal.c.

3058{
3059 HRESULT hr;
3060 TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
3061 *pceltFetched = 0;
3062 hr = IEnumOLEVERB_Next(This, celt, rgelt, pceltFetched);
3063 if (hr == S_OK) *pceltFetched = celt;
3064 return hr;
3065}

◆ IEnumSTATDATA_Next_Proxy()

HRESULT CALLBACK IEnumSTATDATA_Next_Proxy ( IEnumSTATDATA This,
ULONG  celt,
STATDATA *  rgelt,
ULONG pceltFetched 
)

Definition at line 2773 of file usrmarshal.c.

2778{
2779 ULONG fetched;
2780 TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
2781 if (!pceltFetched) pceltFetched = &fetched;
2782 return IEnumSTATDATA_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
2783}

◆ IEnumSTATDATA_Next_Stub()

HRESULT __RPC_STUB IEnumSTATDATA_Next_Stub ( IEnumSTATDATA This,
ULONG  celt,
STATDATA *  rgelt,
ULONG pceltFetched 
)

Definition at line 2785 of file usrmarshal.c.

2790{
2791 HRESULT hr;
2792 TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
2793 *pceltFetched = 0;
2794 hr = IEnumSTATDATA_Next(This, celt, rgelt, pceltFetched);
2795 if (hr == S_OK) *pceltFetched = celt;
2796 return hr;
2797}

◆ IEnumSTATSTG_Next_Proxy()

HRESULT CALLBACK IEnumSTATSTG_Next_Proxy ( IEnumSTATSTG This,
ULONG  celt,
STATSTG *  rgelt,
ULONG pceltFetched 
)

Definition at line 2553 of file usrmarshal.c.

2558{
2559 ULONG fetched;
2560 TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
2561 if (!pceltFetched) pceltFetched = &fetched;
2562 return IEnumSTATSTG_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
2563}

◆ IEnumSTATSTG_Next_Stub()

HRESULT __RPC_STUB IEnumSTATSTG_Next_Stub ( IEnumSTATSTG This,
ULONG  celt,
STATSTG *  rgelt,
ULONG pceltFetched 
)

Definition at line 2565 of file usrmarshal.c.

2570{
2571 HRESULT hr;
2572 TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
2573 *pceltFetched = 0;
2574 hr = IEnumSTATSTG_Next(This, celt, rgelt, pceltFetched);
2575 if (hr == S_OK) *pceltFetched = celt;
2576 return hr;
2577}

◆ IEnumString_Next_Proxy()

HRESULT CALLBACK IEnumString_Next_Proxy ( IEnumString This,
ULONG  celt,
LPOLESTR rgelt,
ULONG pceltFetched 
)

Definition at line 2415 of file usrmarshal.c.

2420{
2421 ULONG fetched;
2422 TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
2423 if (!pceltFetched) pceltFetched = &fetched;
2424 return IEnumString_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
2425}

◆ IEnumString_Next_Stub()

HRESULT __RPC_STUB IEnumString_Next_Stub ( IEnumString This,
ULONG  celt,
LPOLESTR rgelt,
ULONG pceltFetched 
)

Definition at line 2427 of file usrmarshal.c.

2432{
2433 HRESULT hr;
2434 TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
2435 *pceltFetched = 0;
2436 hr = IEnumString_Next(This, celt, rgelt, pceltFetched);
2437 if (hr == S_OK) *pceltFetched = celt;
2438 return hr;
2439}

◆ IEnumUnknown_Next_Proxy()

HRESULT CALLBACK IEnumUnknown_Next_Proxy ( IEnumUnknown This,
ULONG  celt,
IUnknown **  rgelt,
ULONG pceltFetched 
)

Definition at line 2271 of file usrmarshal.c.

2276{
2277 ULONG fetched;
2278 TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
2279 if (!pceltFetched) pceltFetched = &fetched;
2280 return IEnumUnknown_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
2281}

◆ IEnumUnknown_Next_Stub()

HRESULT __RPC_STUB IEnumUnknown_Next_Stub ( IEnumUnknown This,
ULONG  celt,
IUnknown **  rgelt,
ULONG pceltFetched 
)

Definition at line 2283 of file usrmarshal.c.

2288{
2289 HRESULT hr;
2290 TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
2291 *pceltFetched = 0;
2292 hr = IEnumUnknown_Next(This, celt, rgelt, pceltFetched);
2293 if (hr == S_OK) *pceltFetched = celt;
2294 return hr;
2295}

◆ IFillLockBytes_FillAppend_Proxy()

HRESULT CALLBACK IFillLockBytes_FillAppend_Proxy ( IFillLockBytes This,
const void pv,
ULONG  cb,
ULONG pcbWritten 
)

Definition at line 2693 of file usrmarshal.c.

2698{
2699 ULONG written;
2700 HRESULT hr;
2701
2702 TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
2703
2704 hr = IFillLockBytes_RemoteFillAppend_Proxy(This, pv, cb, &written);
2705 if(pcbWritten) *pcbWritten = written;
2706
2707 return hr;
2708}
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33

◆ IFillLockBytes_FillAppend_Stub()

HRESULT __RPC_STUB IFillLockBytes_FillAppend_Stub ( IFillLockBytes This,
const byte pv,
ULONG  cb,
ULONG pcbWritten 
)

Definition at line 2710 of file usrmarshal.c.

2715{
2716 TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
2717 return IFillLockBytes_FillAppend(This, pv, cb, pcbWritten);
2718}

◆ IFillLockBytes_FillAt_Proxy()

HRESULT CALLBACK IFillLockBytes_FillAt_Proxy ( IFillLockBytes This,
ULARGE_INTEGER  ulOffset,
const void pv,
ULONG  cb,
ULONG pcbWritten 
)

Definition at line 2720 of file usrmarshal.c.

2726{
2727 ULONG written;
2728 HRESULT hr;
2729
2730 TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
2731
2732 hr = IFillLockBytes_RemoteFillAt_Proxy(This, ulOffset, pv, cb, &written);
2733 if(pcbWritten) *pcbWritten = written;
2734
2735 return hr;
2736}
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185

◆ IFillLockBytes_FillAt_Stub()

HRESULT __RPC_STUB IFillLockBytes_FillAt_Stub ( IFillLockBytes This,
ULARGE_INTEGER  ulOffset,
const byte pv,
ULONG  cb,
ULONG pcbWritten 
)

Definition at line 2738 of file usrmarshal.c.

2744{
2745 TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
2746 return IFillLockBytes_FillAt(This, ulOffset, pv, cb, pcbWritten);
2747}

◆ ILockBytes_ReadAt_Proxy()

HRESULT CALLBACK ILockBytes_ReadAt_Proxy ( ILockBytes This,
ULARGE_INTEGER  ulOffset,
void pv,
ULONG  cb,
ULONG pcbRead 
)

Definition at line 2635 of file usrmarshal.c.

2641{
2642 ULONG read;
2643 HRESULT hr;
2644
2645 TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
2646
2647 hr = ILockBytes_RemoteReadAt_Proxy(This, ulOffset, pv, cb, &read);
2648 if(pcbRead) *pcbRead = read;
2649
2650 return hr;
2651}
#define read
Definition: acwin.h:96

◆ ILockBytes_ReadAt_Stub()

HRESULT __RPC_STUB ILockBytes_ReadAt_Stub ( ILockBytes This,
ULARGE_INTEGER  ulOffset,
byte pv,
ULONG  cb,
ULONG pcbRead 
)

Definition at line 2653 of file usrmarshal.c.

2659{
2660 TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
2661 return ILockBytes_ReadAt(This, ulOffset, pv, cb, pcbRead);
2662}

◆ ILockBytes_WriteAt_Proxy()

HRESULT CALLBACK ILockBytes_WriteAt_Proxy ( ILockBytes This,
ULARGE_INTEGER  ulOffset,
const void pv,
ULONG  cb,
ULONG pcbWritten 
)

Definition at line 2664 of file usrmarshal.c.

2670{
2671 ULONG written;
2672 HRESULT hr;
2673
2674 TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
2675
2676 hr = ILockBytes_RemoteWriteAt_Proxy(This, ulOffset, pv, cb, &written);
2677 if(pcbWritten) *pcbWritten = written;
2678
2679 return hr;
2680}

◆ ILockBytes_WriteAt_Stub()

HRESULT __RPC_STUB ILockBytes_WriteAt_Stub ( ILockBytes This,
ULARGE_INTEGER  ulOffset,
const byte pv,
ULONG  cb,
ULONG pcbWritten 
)

Definition at line 2682 of file usrmarshal.c.

2688{
2689 TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
2690 return ILockBytes_WriteAt(This, ulOffset, pv, cb, pcbWritten);
2691}

◆ IMoniker_BindToObject_Proxy()

HRESULT CALLBACK IMoniker_BindToObject_Proxy ( IMoniker This,
IBindCtx pbc,
IMoniker pmkToLeft,
REFIID  riidResult,
void **  ppvResult 
)

Definition at line 2371 of file usrmarshal.c.

2377{
2378 FIXME(":stub\n");
2379 return E_NOTIMPL;
2380}

◆ IMoniker_BindToObject_Stub()

HRESULT __RPC_STUB IMoniker_BindToObject_Stub ( IMoniker This,
IBindCtx pbc,
IMoniker pmkToLeft,
REFIID  riidResult,
IUnknown **  ppvResult 
)

Definition at line 2382 of file usrmarshal.c.

2388{
2389 FIXME(":stub\n");
2390 return E_NOTIMPL;
2391}

◆ IMoniker_BindToStorage_Proxy()

HRESULT CALLBACK IMoniker_BindToStorage_Proxy ( IMoniker This,
IBindCtx pbc,
IMoniker pmkToLeft,
REFIID  riid,
void **  ppvObj 
)

Definition at line 2393 of file usrmarshal.c.

2399{
2400 TRACE("(%p)->(%p %p %s %p)\n", This, pbc, pmkToLeft, debugstr_guid(riid), ppvObj);
2401 return IMoniker_RemoteBindToStorage_Proxy(This, pbc, pmkToLeft, riid, (IUnknown**)ppvObj);
2402}

◆ IMoniker_BindToStorage_Stub()

HRESULT __RPC_STUB IMoniker_BindToStorage_Stub ( IMoniker This,
IBindCtx pbc,
IMoniker pmkToLeft,
REFIID  riid,
IUnknown **  ppvObj 
)

Definition at line 2404 of file usrmarshal.c.

2410{
2411 TRACE("(%p)->(%p %p %s %p)\n", This, pbc, pmkToLeft, debugstr_guid(riid), ppvObj);
2412 return IMoniker_BindToStorage(This, pbc, pmkToLeft, riid, (void**)ppvObj);
2413}

◆ IOleCache2_UpdateCache_Proxy()

HRESULT CALLBACK IOleCache2_UpdateCache_Proxy ( IOleCache2 This,
LPDATAOBJECT  pDataObject,
DWORD  grfUpdf,
LPVOID  pReserved 
)

Definition at line 3021 of file usrmarshal.c.

3026{
3027 TRACE("(%p, %p, 0x%08x, %p)\n", This, pDataObject, grfUpdf, pReserved);
3028 return IOleCache2_RemoteUpdateCache_Proxy(This, pDataObject, grfUpdf, (LONG_PTR)pReserved);
3029}

◆ IOleCache2_UpdateCache_Stub()

HRESULT __RPC_STUB IOleCache2_UpdateCache_Stub ( IOleCache2 This,
LPDATAOBJECT  pDataObject,
DWORD  grfUpdf,
LONG_PTR  pReserved 
)

Definition at line 3031 of file usrmarshal.c.

3036{
3037 TRACE("(%p, %p, 0x%08x, %li)\n", This, pDataObject, grfUpdf, pReserved);
3038 return IOleCache2_UpdateCache(This, pDataObject, grfUpdf, (void*)pReserved);
3039}

◆ IOleInPlaceActiveObject_ResizeBorder_Proxy()

HRESULT CALLBACK IOleInPlaceActiveObject_ResizeBorder_Proxy ( IOleInPlaceActiveObject This,
LPCRECT  prcBorder,
IOleInPlaceUIWindow pUIWindow,
BOOL  fFrameWindow 
)

Definition at line 3000 of file usrmarshal.c.

3005{
3006 FIXME(":stub\n");
3007 return E_NOTIMPL;
3008}

◆ IOleInPlaceActiveObject_ResizeBorder_Stub()

HRESULT __RPC_STUB IOleInPlaceActiveObject_ResizeBorder_Stub ( IOleInPlaceActiveObject This,
LPCRECT  prcBorder,
REFIID  riid,
IOleInPlaceUIWindow pUIWindow,
BOOL  fFrameWindow 
)

Definition at line 3010 of file usrmarshal.c.

3016{
3017 FIXME(":stub\n");
3018 return E_NOTIMPL;
3019}

◆ IOleInPlaceActiveObject_TranslateAccelerator_Proxy()

HRESULT CALLBACK IOleInPlaceActiveObject_TranslateAccelerator_Proxy ( IOleInPlaceActiveObject This,
LPMSG  lpmsg 
)

Definition at line 2985 of file usrmarshal.c.

2988{
2989 TRACE("(%p %p)\n", This, lpmsg);
2990 return IOleInPlaceActiveObject_RemoteTranslateAccelerator_Proxy(This);
2991}

◆ IOleInPlaceActiveObject_TranslateAccelerator_Stub()

HRESULT __RPC_STUB IOleInPlaceActiveObject_TranslateAccelerator_Stub ( IOleInPlaceActiveObject This)

Definition at line 2993 of file usrmarshal.c.

2995{
2996 TRACE("(%p)\n", This);
2997 return S_FALSE;
2998}
#define S_FALSE
Definition: winerror.h:2357

◆ IRunnableObject_IsRunning_Proxy()

BOOL CALLBACK IRunnableObject_IsRunning_Proxy ( IRunnableObject This)

Definition at line 2355 of file usrmarshal.c.

2357{
2358 BOOL rv;
2359 FIXME(":stub\n");
2360 memset(&rv, 0, sizeof rv);
2361 return rv;
2362}
unsigned int BOOL
Definition: ntddk_ex.h:94
#define memset(x, y, z)
Definition: compat.h:39

◆ IRunnableObject_IsRunning_Stub()

HRESULT __RPC_STUB IRunnableObject_IsRunning_Stub ( IRunnableObject This)

Definition at line 2364 of file usrmarshal.c.

2366{
2367 FIXME(":stub\n");
2368 return E_NOTIMPL;
2369}

◆ ISequentialStream_Read_Proxy()

HRESULT CALLBACK ISequentialStream_Read_Proxy ( ISequentialStream This,
void pv,
ULONG  cb,
ULONG pcbRead 
)

Definition at line 2441 of file usrmarshal.c.

2446{
2447 ULONG read;
2448 HRESULT hr;
2449
2450 TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbRead);
2451
2452 hr = ISequentialStream_RemoteRead_Proxy(This, pv, cb, &read);
2453 if(pcbRead) *pcbRead = read;
2454
2455 return hr;
2456}

◆ ISequentialStream_Read_Stub()

HRESULT __RPC_STUB ISequentialStream_Read_Stub ( ISequentialStream This,
byte pv,
ULONG  cb,
ULONG pcbRead 
)

Definition at line 2458 of file usrmarshal.c.

2463{
2464 TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbRead);
2465 return ISequentialStream_Read(This, pv, cb, pcbRead);
2466}

◆ ISequentialStream_Write_Proxy()

HRESULT CALLBACK ISequentialStream_Write_Proxy ( ISequentialStream This,
const void pv,
ULONG  cb,
ULONG pcbWritten 
)

Definition at line 2468 of file usrmarshal.c.

2473{
2474 ULONG written;
2475 HRESULT hr;
2476
2477 TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
2478
2479 hr = ISequentialStream_RemoteWrite_Proxy(This, pv, cb, &written);
2480 if(pcbWritten) *pcbWritten = written;
2481
2482 return hr;
2483}

◆ ISequentialStream_Write_Stub()

HRESULT __RPC_STUB ISequentialStream_Write_Stub ( ISequentialStream This,
const byte pv,
ULONG  cb,
ULONG pcbWritten 
)

Definition at line 2485 of file usrmarshal.c.

2490{
2491 TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
2492 return ISequentialStream_Write(This, pv, cb, pcbWritten);
2493}

◆ IStorage_EnumElements_Proxy()

HRESULT CALLBACK IStorage_EnumElements_Proxy ( IStorage This,
DWORD  reserved1,
void reserved2,
DWORD  reserved3,
IEnumSTATSTG **  ppenum 
)

Definition at line 2608 of file usrmarshal.c.

2614{
2615 TRACE("(%p)->(%d, %p, %d, %p)\n", This, reserved1, reserved2, reserved3, ppenum);
2616 if(reserved2) WARN("reserved2 %p\n", reserved2);
2617
2618 return IStorage_RemoteEnumElements_Proxy(This, reserved1, 0, NULL, reserved3, ppenum);
2619}
#define WARN(fmt,...)
Definition: precomp.h:61
uint8_t reserved2[12]
Definition: fsck.fat.h:23
uint8_t reserved3
Definition: fsck.fat.h:26

◆ IStorage_EnumElements_Stub()

HRESULT __RPC_STUB IStorage_EnumElements_Stub ( IStorage This,
DWORD  reserved1,
ULONG  cbReserved2,
byte reserved2,
DWORD  reserved3,
IEnumSTATSTG **  ppenum 
)

Definition at line 2621 of file usrmarshal.c.

2628{
2629 TRACE("(%p)->(%d, %d, %p, %d, %p)\n", This, reserved1, cbReserved2, reserved2, reserved3, ppenum);
2630 if(cbReserved2 || reserved2) WARN("cbReserved2 %d reserved2 %p\n", cbReserved2, reserved2);
2631
2632 return IStorage_EnumElements(This, reserved1, NULL, reserved3, ppenum);
2633}

◆ IStorage_OpenStream_Proxy()

HRESULT CALLBACK IStorage_OpenStream_Proxy ( IStorage This,
LPCOLESTR  pwcsName,
void reserved1,
DWORD  grfMode,
DWORD  reserved2,
IStream **  ppstm 
)

Definition at line 2579 of file usrmarshal.c.

2586{
2587 TRACE("(%p)->(%s, %p, %08x, %d %p)\n", This, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
2588 if(reserved1) WARN("reserved1 %p\n", reserved1);
2589
2590 return IStorage_RemoteOpenStream_Proxy(This, pwcsName, 0, NULL, grfMode, reserved2, ppstm);
2591}

◆ IStorage_OpenStream_Stub()

HRESULT __RPC_STUB IStorage_OpenStream_Stub ( IStorage This,
LPCOLESTR  pwcsName,
ULONG  cbReserved1,
byte reserved1,
DWORD  grfMode,
DWORD  reserved2,
IStream **  ppstm 
)

Definition at line 2593 of file usrmarshal.c.

2601{
2602 TRACE("(%p)->(%s, %d, %p, %08x, %d %p)\n", This, debugstr_w(pwcsName), cbReserved1, reserved1, grfMode, reserved2, ppstm);
2603 if(cbReserved1 || reserved1) WARN("cbReserved1 %d reserved1 %p\n", cbReserved1, reserved1);
2604
2605 return IStorage_OpenStream(This, pwcsName, NULL, grfMode, reserved2, ppstm);
2606}

◆ IStream_CopyTo_Proxy()

HRESULT CALLBACK IStream_CopyTo_Proxy ( IStream This,
IStream pstm,
ULARGE_INTEGER  cb,
ULARGE_INTEGER pcbRead,
ULARGE_INTEGER pcbWritten 
)

Definition at line 2522 of file usrmarshal.c.

2528{
2529 ULARGE_INTEGER read, written;
2530 HRESULT hr;
2531
2532 TRACE("(%p)->(%p, %s, %p, %p)\n", This, pstm, wine_dbgstr_longlong(cb.QuadPart), pcbRead, pcbWritten);
2533
2534 hr = IStream_RemoteCopyTo_Proxy(This, pstm, cb, &read, &written);
2535 if(pcbRead) *pcbRead = read;
2536 if(pcbWritten) *pcbWritten = written;
2537
2538 return hr;
2539}

◆ IStream_CopyTo_Stub()

HRESULT __RPC_STUB IStream_CopyTo_Stub ( IStream This,
IStream pstm,
ULARGE_INTEGER  cb,
ULARGE_INTEGER pcbRead,
ULARGE_INTEGER pcbWritten 
)

Definition at line 2541 of file usrmarshal.c.

2547{
2548 TRACE("(%p)->(%p, %s, %p, %p)\n", This, pstm, wine_dbgstr_longlong(cb.QuadPart), pcbRead, pcbWritten);
2549
2550 return IStream_CopyTo(This, pstm, cb, pcbRead, pcbWritten);
2551}

◆ IStream_Seek_Proxy()

HRESULT CALLBACK IStream_Seek_Proxy ( IStream This,
LARGE_INTEGER  dlibMove,
DWORD  dwOrigin,
ULARGE_INTEGER plibNewPosition 
)

Definition at line 2495 of file usrmarshal.c.

2500{
2501 ULARGE_INTEGER newpos;
2502 HRESULT hr;
2503
2504 TRACE("(%p)->(%s, %d, %p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
2505
2506 hr = IStream_RemoteSeek_Proxy(This, dlibMove, dwOrigin, &newpos);
2507 if(plibNewPosition) *plibNewPosition = newpos;
2508
2509 return hr;
2510}
LONGLONG QuadPart
Definition: typedefs.h:114

◆ IStream_Seek_Stub()

HRESULT __RPC_STUB IStream_Seek_Stub ( IStream This,
LARGE_INTEGER  dlibMove,
DWORD  dwOrigin,
ULARGE_INTEGER plibNewPosition 
)

Definition at line 2512 of file usrmarshal.c.

2517{
2518 TRACE("(%p)->(%s, %d, %p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
2519 return IStream_Seek(This, dlibMove, dwOrigin, plibNewPosition);
2520}

◆ IViewObject_Draw_Proxy()

HRESULT CALLBACK IViewObject_Draw_Proxy ( IViewObject This,
DWORD  dwDrawAspect,
LONG  lindex,
void pvAspect,
DVTARGETDEVICE *  ptd,
HDC  hdcTargetDev,
HDC  hdcDraw,
LPCRECTL  lprcBounds,
LPCRECTL  lprcWBounds,
BOOL(STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR dwContinue)  ,
ULONG_PTR  dwContinue 
)

Definition at line 3067 of file usrmarshal.c.

3079{
3080 FIXME(":stub\n");
3081 return E_NOTIMPL;
3082}

◆ IViewObject_Draw_Stub()

HRESULT __RPC_STUB IViewObject_Draw_Stub ( IViewObject This,
DWORD  dwDrawAspect,
LONG  lindex,
ULONG_PTR  pvAspect,
DVTARGETDEVICE *  ptd,
ULONG_PTR  hdcTargetDev,
ULONG_PTR  hdcDraw,
LPCRECTL  lprcBounds,
LPCRECTL  lprcWBounds,
IContinue pContinue 
)

Definition at line 3084 of file usrmarshal.c.

3095{
3096 FIXME(":stub\n");
3097 return E_NOTIMPL;
3098}

◆ IViewObject_Freeze_Proxy()

HRESULT CALLBACK IViewObject_Freeze_Proxy ( IViewObject This,
DWORD  dwDrawAspect,
LONG  lindex,
void pvAspect,
DWORD pdwFreeze 
)

Definition at line 3126 of file usrmarshal.c.

3132{
3133 FIXME(":stub\n");
3134 return E_NOTIMPL;
3135}

◆ IViewObject_Freeze_Stub()

HRESULT __RPC_STUB IViewObject_Freeze_Stub ( IViewObject This,
DWORD  dwDrawAspect,
LONG  lindex,
ULONG_PTR  pvAspect,
DWORD pdwFreeze 
)

Definition at line 3137 of file usrmarshal.c.

3143{
3144 FIXME(":stub\n");
3145 return E_NOTIMPL;
3146}

◆ IViewObject_GetAdvise_Proxy()

HRESULT CALLBACK IViewObject_GetAdvise_Proxy ( IViewObject This,
DWORD pAspects,
DWORD pAdvf,
IAdviseSink **  ppAdvSink 
)

Definition at line 3148 of file usrmarshal.c.

3153{
3154 FIXME(":stub\n");
3155 return E_NOTIMPL;
3156}

◆ IViewObject_GetAdvise_Stub()

HRESULT __RPC_STUB IViewObject_GetAdvise_Stub ( IViewObject This,
DWORD pAspects,
DWORD pAdvf,
IAdviseSink **  ppAdvSink 
)

Definition at line 3158 of file usrmarshal.c.

3163{
3164 FIXME(":stub\n");
3165 return E_NOTIMPL;
3166}

◆ IViewObject_GetColorSet_Proxy()

HRESULT CALLBACK IViewObject_GetColorSet_Proxy ( IViewObject This,
DWORD  dwDrawAspect,
LONG  lindex,
void pvAspect,
DVTARGETDEVICE *  ptd,
HDC  hicTargetDev,
LOGPALETTE **  ppColorSet 
)

Definition at line 3100 of file usrmarshal.c.

3108{
3109 FIXME(":stub\n");
3110 return E_NOTIMPL;
3111}

◆ IViewObject_GetColorSet_Stub()

HRESULT __RPC_STUB IViewObject_GetColorSet_Stub ( IViewObject This,
DWORD  dwDrawAspect,
LONG  lindex,
ULONG_PTR  pvAspect,
DVTARGETDEVICE *  ptd,
ULONG_PTR  hicTargetDev,
LOGPALETTE **  ppColorSet 
)

Definition at line 3113 of file usrmarshal.c.

3121{
3122 FIXME(":stub\n");
3123 return E_NOTIMPL;
3124}

◆ SNB_UserFree()

void __RPC_USER SNB_UserFree ( ULONG pFlags,
SNB *  pSnb 
)

Definition at line 2217 of file usrmarshal.c.

2218{
2219 USER_MARSHAL_CB *umcb = (USER_MARSHAL_CB*)pFlags;
2220 TRACE("(%p)\n", pSnb);
2221 if (*pSnb)
2222 umcb->pStubMsg->pfnFree(*pSnb);
2223}
PMIDL_STUB_MESSAGE pStubMsg
Definition: rpcndr.h:333

Referenced by test_marshal_SNB().

◆ SNB_UserMarshal()

unsigned char *__RPC_USER SNB_UserMarshal ( ULONG pFlags,
unsigned char pBuffer,
SNB *  pSnb 
)

Definition at line 2143 of file usrmarshal.c.

2144{
2145 struct SNB_wire *wire;
2146 ULONG size;
2147
2148 TRACE("(%s, %p, %p)\n", debugstr_user_flags(pFlags), pBuffer, pSnb);
2149
2151
2152 wire = (struct SNB_wire*)pBuffer;
2153 wire->charcnt = wire->strcnt = 0;
2154 size = 3*sizeof(ULONG);
2155
2156 if (*pSnb)
2157 {
2158 WCHAR **ptrW = *pSnb;
2159 WCHAR *dataW = wire->data;
2160
2161 while (*ptrW)
2162 {
2163 ULONG len = lstrlenW(*ptrW) + 1;
2164
2165 wire->strcnt++;
2166 wire->charcnt += len;
2167 memcpy(dataW, *ptrW, len*sizeof(WCHAR));
2168 dataW += len;
2169
2170 size += len*sizeof(WCHAR);
2171 ptrW++;
2172 }
2173 }
2174
2175 wire->datalen = wire->charcnt;
2176 return pBuffer + size;
2177}
#define lstrlenW
Definition: compat.h:750
WCHAR data[1]
Definition: usrmarshal.c:2140
ULONG strcnt
Definition: usrmarshal.c:2138
ULONG datalen
Definition: usrmarshal.c:2139
ULONG charcnt
Definition: usrmarshal.c:2137

Referenced by test_marshal_SNB().

◆ SNB_UserSize()

ULONG __RPC_USER SNB_UserSize ( ULONG pFlags,
ULONG  StartingSize,
SNB *  pSnb 
)

Definition at line 2110 of file usrmarshal.c.

2111{
2112 ULONG size = StartingSize;
2113
2114 TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, pSnb);
2115
2116 ALIGN_LENGTH(size, 3);
2117
2118 /* two counters from RemSNB header, plus one more ULONG */
2119 size += 3*sizeof(ULONG);
2120
2121 /* now actual data length */
2122 if (*pSnb)
2123 {
2124 WCHAR **ptrW = *pSnb;
2125
2126 while (*ptrW)
2127 {
2128 size += (lstrlenW(*ptrW) + 1)*sizeof(WCHAR);
2129 ptrW++;
2130 }
2131 }
2132
2133 return size;
2134}

Referenced by test_marshal_SNB().

◆ SNB_UserUnmarshal()

unsigned char *__RPC_USER SNB_UserUnmarshal ( ULONG pFlags,
unsigned char pBuffer,
SNB *  pSnb 
)

Definition at line 2179 of file usrmarshal.c.

2180{
2181 USER_MARSHAL_CB *umcb = (USER_MARSHAL_CB*)pFlags;
2182 struct SNB_wire *wire;
2183
2184 TRACE("(%s, %p, %p)\n", debugstr_user_flags(pFlags), pBuffer, pSnb);
2185
2186 wire = (struct SNB_wire*)pBuffer;
2187
2188 if (*pSnb)
2189 umcb->pStubMsg->pfnFree(*pSnb);
2190
2191 if (wire->datalen == 0)
2192 *pSnb = NULL;
2193 else
2194 {
2195 WCHAR *src = wire->data, *dest;
2196 WCHAR **ptrW;
2197 ULONG i;
2198
2199 ptrW = *pSnb = umcb->pStubMsg->pfnAllocate((wire->strcnt+1)*sizeof(WCHAR*) + wire->datalen*sizeof(WCHAR));
2200 dest = (WCHAR*)(*pSnb + wire->strcnt + 1);
2201
2202 for (i = 0; i < wire->strcnt; i++)
2203 {
2204 ULONG len = lstrlenW(src);
2205 memcpy(dest, src, (len + 1)*sizeof(WCHAR));
2206 *ptrW = dest;
2207 src += len + 1;
2208 dest += len + 1;
2209 ptrW++;
2210 }
2211 *ptrW = NULL;
2212 }
2213
2214 return pBuffer + 3*sizeof(ULONG) + wire->datalen*sizeof(WCHAR);
2215}
GLenum src
Definition: glext.h:6340
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static char * dest
Definition: rtl.c:135

Referenced by test_marshal_SNB().

◆ STGMEDIUM_UserFree()

void __RPC_USER STGMEDIUM_UserFree ( ULONG flags,
STGMEDIUM *  med 
)

Definition at line 2038 of file usrmarshal.c.

2039{
2040 TRACE("(%s, %p)\n", debugstr_user_flags(flags), med);
2041
2042 switch (med->tymed)
2043 {
2044 case TYMED_NULL:
2045 case TYMED_FILE:
2046 case TYMED_ISTREAM:
2047 case TYMED_ISTORAGE:
2048 ReleaseStgMedium(med);
2049 break;
2050 case TYMED_HGLOBAL:
2051 case TYMED_GDI:
2052 case TYMED_MFPICT:
2053 case TYMED_ENHMF:
2054 if (LOWORD(*flags) == MSHCTX_INPROC)
2055 med->tymed = TYMED_NULL;
2056 ReleaseStgMedium(med);
2057 break;
2058 default:
2060 }
2061}
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2033

Referenced by ASYNC_STGMEDIUM_UserFree(), and marshal_STGMEDIUM().

◆ STGMEDIUM_UserMarshal()

unsigned char *__RPC_USER STGMEDIUM_UserMarshal ( ULONG pFlags,
unsigned char pBuffer,
STGMEDIUM *  pStgMedium 
)

Definition at line 1785 of file usrmarshal.c.

1786{
1787 TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, pStgMedium);
1788
1790
1791 *(DWORD *)pBuffer = pStgMedium->tymed;
1792 pBuffer += sizeof(DWORD);
1793 if (pStgMedium->tymed != TYMED_NULL)
1794 {
1795 *(DWORD *)pBuffer = (DWORD)(DWORD_PTR)pStgMedium->u.pstg;
1796 pBuffer += sizeof(DWORD);
1797 }
1798 *(DWORD *)pBuffer = (DWORD)(DWORD_PTR)pStgMedium->pUnkForRelease;
1799 pBuffer += sizeof(DWORD);
1800
1801 switch (pStgMedium->tymed)
1802 {
1803 case TYMED_NULL:
1804 TRACE("TYMED_NULL\n");
1805 break;
1806 case TYMED_HGLOBAL:
1807 TRACE("TYMED_HGLOBAL\n");
1808 if (pStgMedium->u.hGlobal)
1809 pBuffer = HGLOBAL_UserMarshal(pFlags, pBuffer, &pStgMedium->u.hGlobal);
1810 break;
1811 case TYMED_FILE:
1812 TRACE("TYMED_FILE\n");
1813 if (pStgMedium->u.lpszFileName)
1814 {
1815 DWORD len;
1816 len = lstrlenW(pStgMedium->u.lpszFileName);
1817 /* conformance */
1818 *(DWORD *)pBuffer = len + 1;
1819 pBuffer += sizeof(DWORD);
1820 /* offset */
1821 *(DWORD *)pBuffer = 0;
1822 pBuffer += sizeof(DWORD);
1823 /* variance */
1824 *(DWORD *)pBuffer = len + 1;
1825 pBuffer += sizeof(DWORD);
1826
1827 TRACE("file name is %s\n", debugstr_w(pStgMedium->u.lpszFileName));
1828 memcpy(pBuffer, pStgMedium->u.lpszFileName, (len + 1) * sizeof(WCHAR));
1829 }
1830 break;
1831 case TYMED_ISTREAM:
1832 TRACE("TYMED_ISTREAM\n");
1833 if (pStgMedium->u.pstm)
1834 {
1835 IUnknown *unk;
1836 IStream_QueryInterface(pStgMedium->u.pstm, &IID_IUnknown, (void**)&unk);
1837 pBuffer = WdtpInterfacePointer_UserMarshal(pFlags, LOWORD(*pFlags), pBuffer, unk, &IID_IStream);
1838 IUnknown_Release(unk);
1839 }
1840 break;
1841 case TYMED_ISTORAGE:
1842 TRACE("TYMED_ISTORAGE\n");
1843 if (pStgMedium->u.pstg)
1844 {
1845 IUnknown *unk;
1846 IStorage_QueryInterface(pStgMedium->u.pstg, &IID_IUnknown, (void**)&unk);
1847 pBuffer = WdtpInterfacePointer_UserMarshal(pFlags, LOWORD(*pFlags), pBuffer, unk, &IID_IStorage);
1848 IUnknown_Release(unk);
1849 }
1850 break;
1851 case TYMED_GDI:
1852 TRACE("TYMED_GDI\n");
1853 if (pStgMedium->u.hBitmap)
1854 pBuffer = HBITMAP_UserMarshal(pFlags, pBuffer, &pStgMedium->u.hBitmap);
1855 break;
1856 case TYMED_MFPICT:
1857 TRACE("TYMED_MFPICT\n");
1858 if (pStgMedium->u.hMetaFilePict)
1859 pBuffer = HMETAFILEPICT_UserMarshal(pFlags, pBuffer, &pStgMedium->u.hMetaFilePict);
1860 break;
1861 case TYMED_ENHMF:
1862 TRACE("TYMED_ENHMF\n");
1863 if (pStgMedium->u.hEnhMetaFile)
1864 pBuffer = HENHMETAFILE_UserMarshal(pFlags, pBuffer, &pStgMedium->u.hEnhMetaFile);
1865 break;
1866 default:
1868 }
1869
1870 if (pStgMedium->pUnkForRelease)
1871 pBuffer = WdtpInterfacePointer_UserMarshal(pFlags, LOWORD(*pFlags), pBuffer, pStgMedium->pUnkForRelease, &IID_IUnknown);
1872
1873 return pBuffer;
1874}
const GUID IID_IUnknown
unsigned char *WINAPI WdtpInterfacePointer_UserMarshal(ULONG *pFlags, ULONG RealFlags, unsigned char *pBuffer, IUnknown *punk, REFIID riid)
Definition: usrmarshal.c:1550
unsigned char *__RPC_USER HGLOBAL_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HGLOBAL *phGlobal)
Definition: usrmarshal.c:425
unsigned char *__RPC_USER HBITMAP_UserMarshal(ULONG *flags, unsigned char *buffer, HBITMAP *bmp)
Definition: usrmarshal.c:641
unsigned char *__RPC_USER HMETAFILEPICT_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HMETAFILEPICT *phMfp)
Definition: usrmarshal.c:1343
unsigned char *__RPC_USER HENHMETAFILE_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HENHMETAFILE *phEmf)
Definition: usrmarshal.c:1142
#define DWORD_PTR
Definition: treelist.c:76

Referenced by ASYNC_STGMEDIUM_UserMarshal(), and marshal_STGMEDIUM().

◆ STGMEDIUM_UserSize()

ULONG __RPC_USER STGMEDIUM_UserSize ( ULONG pFlags,
ULONG  StartingSize,
STGMEDIUM *  pStgMedium 
)

Definition at line 1690 of file usrmarshal.c.

1691{
1692 ULONG size = StartingSize;
1693
1694 TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, pStgMedium);
1695
1696 ALIGN_LENGTH(size, 3);
1697
1698 size += 2 * sizeof(DWORD);
1699 if (pStgMedium->tymed != TYMED_NULL)
1700 size += sizeof(DWORD);
1701
1702 switch (pStgMedium->tymed)
1703 {
1704 case TYMED_NULL:
1705 TRACE("TYMED_NULL\n");
1706 break;
1707 case TYMED_HGLOBAL:
1708 TRACE("TYMED_HGLOBAL\n");
1709 if (pStgMedium->u.hGlobal)
1710 size = HGLOBAL_UserSize(pFlags, size, &pStgMedium->u.hGlobal);
1711 break;
1712 case TYMED_FILE:
1713 TRACE("TYMED_FILE\n");
1714 if (pStgMedium->u.lpszFileName)
1715 {
1716 TRACE("file name is %s\n", debugstr_w(pStgMedium->u.lpszFileName));
1717 size += 3 * sizeof(DWORD) +
1718 (lstrlenW(pStgMedium->u.lpszFileName) + 1) * sizeof(WCHAR);
1719 }
1720 break;
1721 case TYMED_ISTREAM:
1722 TRACE("TYMED_ISTREAM\n");
1723 if (pStgMedium->u.pstm)
1724 {
1725 IUnknown *unk;
1726 IStream_QueryInterface(pStgMedium->u.pstm, &IID_IUnknown, (void**)&unk);
1727 size = WdtpInterfacePointer_UserSize(pFlags, LOWORD(*pFlags), size, unk, &IID_IStream);
1728 IUnknown_Release(unk);
1729 }
1730 break;
1731 case TYMED_ISTORAGE:
1732 TRACE("TYMED_ISTORAGE\n");
1733 if (pStgMedium->u.pstg)
1734 {
1735 IUnknown *unk;
1736 IStorage_QueryInterface(pStgMedium->u.pstg, &IID_IUnknown, (void**)&unk);
1737 size = WdtpInterfacePointer_UserSize(pFlags, LOWORD(*pFlags), size, unk, &IID_IStorage);
1738 IUnknown_Release(unk);
1739 }
1740 break;
1741 case TYMED_GDI:
1742 TRACE("TYMED_GDI\n");
1743 if (pStgMedium->u.hBitmap)
1744 size = HBITMAP_UserSize(pFlags, size, &pStgMedium->u.hBitmap);
1745 break;
1746 case TYMED_MFPICT:
1747 TRACE("TYMED_MFPICT\n");
1748 if (pStgMedium->u.hMetaFilePict)
1749 size = HMETAFILEPICT_UserSize(pFlags, size, &pStgMedium->u.hMetaFilePict);
1750 break;
1751 case TYMED_ENHMF:
1752 TRACE("TYMED_ENHMF\n");
1753 if (pStgMedium->u.hEnhMetaFile)
1754 size = HENHMETAFILE_UserSize(pFlags, size, &pStgMedium->u.hEnhMetaFile);
1755 break;
1756 default:
1758 }
1759
1760 if (pStgMedium->pUnkForRelease)
1761 size = WdtpInterfacePointer_UserSize(pFlags, LOWORD(*pFlags), size, pStgMedium->pUnkForRelease, &IID_IUnknown);
1762
1763 return size;
1764}
ULONG __RPC_USER HMETAFILEPICT_UserSize(ULONG *pFlags, ULONG size, HMETAFILEPICT *phMfp)
Definition: usrmarshal.c:1293
ULONG __RPC_USER HBITMAP_UserSize(ULONG *flags, ULONG size, HBITMAP *bmp)
Definition: usrmarshal.c:598
ULONG __RPC_USER HENHMETAFILE_UserSize(ULONG *pFlags, ULONG size, HENHMETAFILE *phEmf)
Definition: usrmarshal.c:1097
ULONG __RPC_USER HGLOBAL_UserSize(ULONG *pFlags, ULONG StartingSize, HGLOBAL *phGlobal)
Definition: usrmarshal.c:379
ULONG __RPC_USER WdtpInterfacePointer_UserSize(ULONG *pFlags, ULONG RealFlags, ULONG StartingSize, IUnknown *punk, REFIID riid)
Definition: usrmarshal.c:1515

Referenced by ASYNC_STGMEDIUM_UserSize(), and marshal_STGMEDIUM().

◆ STGMEDIUM_UserUnmarshal()

unsigned char *__RPC_USER STGMEDIUM_UserUnmarshal ( ULONG pFlags,
unsigned char pBuffer,
STGMEDIUM *  pStgMedium 
)

Definition at line 1895 of file usrmarshal.c.

1896{
1897 DWORD content = 0;
1898 DWORD releaseunk;
1899
1901
1902 TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, pStgMedium);
1903
1904 pStgMedium->tymed = *(DWORD *)pBuffer;
1905 pBuffer += sizeof(DWORD);
1906 if (pStgMedium->tymed != TYMED_NULL)
1907 {
1908 content = *(DWORD *)pBuffer;
1909 pBuffer += sizeof(DWORD);
1910 }
1911 releaseunk = *(DWORD *)pBuffer;
1912 pBuffer += sizeof(DWORD);
1913
1914 switch (pStgMedium->tymed)
1915 {
1916 case TYMED_NULL:
1917 TRACE("TYMED_NULL\n");
1918 break;
1919 case TYMED_HGLOBAL:
1920 TRACE("TYMED_HGLOBAL\n");
1921 if (content)
1922 pBuffer = HGLOBAL_UserUnmarshal(pFlags, pBuffer, &pStgMedium->u.hGlobal);
1923 break;
1924 case TYMED_FILE:
1925 TRACE("TYMED_FILE\n");
1926 if (content)
1927 {
1928 DWORD conformance;
1929 DWORD variance;
1930 conformance = *(DWORD *)pBuffer;
1931 pBuffer += sizeof(DWORD);
1932 if (*(DWORD *)pBuffer != 0)
1933 {
1934 ERR("invalid offset %d\n", *(DWORD *)pBuffer);
1936 return NULL;
1937 }
1938 pBuffer += sizeof(DWORD);
1939 variance = *(DWORD *)pBuffer;
1940 pBuffer += sizeof(DWORD);
1941 if (conformance != variance)
1942 {
1943 ERR("conformance (%d) and variance (%d) should be equal\n",
1944 conformance, variance);
1946 return NULL;
1947 }
1948 if (conformance > 0x7fffffff)
1949 {
1950 ERR("conformance 0x%x too large\n", conformance);
1952 return NULL;
1953 }
1954 pStgMedium->u.lpszFileName = CoTaskMemAlloc(conformance * sizeof(WCHAR));
1955 if (!pStgMedium->u.lpszFileName) RpcRaiseException(ERROR_OUTOFMEMORY);
1956 TRACE("unmarshalled file name is %s\n", debugstr_wn((const WCHAR *)pBuffer, variance));
1957 memcpy(pStgMedium->u.lpszFileName, pBuffer, variance * sizeof(WCHAR));
1958 pBuffer += variance * sizeof(WCHAR);
1959 }
1960 else
1961 pStgMedium->u.lpszFileName = NULL;
1962 break;
1963 case TYMED_ISTREAM:
1964 TRACE("TYMED_ISTREAM\n");
1965 if (content)
1966 {
1967 pBuffer = WdtpInterfacePointer_UserUnmarshal(pFlags, pBuffer, (IUnknown**)&pStgMedium->u.pstm, &IID_IStream);
1968 }
1969 else
1970 {
1971 if (pStgMedium->u.pstm) IStream_Release( pStgMedium->u.pstm );
1972 pStgMedium->u.pstm = NULL;
1973 }
1974 break;
1975 case TYMED_ISTORAGE:
1976 TRACE("TYMED_ISTORAGE\n");
1977 if (content)
1978 {
1979 pBuffer = WdtpInterfacePointer_UserUnmarshal(pFlags, pBuffer, (IUnknown**)&pStgMedium->u.pstg, &IID_IStorage);
1980 }
1981 else
1982 {
1983 if (pStgMedium->u.pstg) IStorage_Release( pStgMedium->u.pstg );
1984 pStgMedium->u.pstg = NULL;
1985 }
1986 break;
1987 case TYMED_GDI:
1988 TRACE("TYMED_GDI\n");
1989 if (content)
1990 pBuffer = HBITMAP_UserUnmarshal(pFlags, pBuffer, &pStgMedium->u.hBitmap);
1991 else
1992 pStgMedium->u.hBitmap = NULL;
1993 break;
1994 case TYMED_MFPICT:
1995 TRACE("TYMED_MFPICT\n");
1996 if (content)
1997 pBuffer = HMETAFILEPICT_UserUnmarshal(pFlags, pBuffer, &pStgMedium->u.hMetaFilePict);
1998 else
1999 pStgMedium->u.hMetaFilePict = NULL;
2000 break;
2001 case TYMED_ENHMF:
2002 TRACE("TYMED_ENHMF\n");
2003 if (content)
2004 pBuffer = HENHMETAFILE_UserUnmarshal(pFlags, pBuffer, &pStgMedium->u.hEnhMetaFile);
2005 else
2006 pStgMedium->u.hEnhMetaFile = NULL;
2007 break;
2008 default:
2010 }
2011
2012 if (releaseunk)
2013 pBuffer = WdtpInterfacePointer_UserUnmarshal(pFlags, pBuffer, &pStgMedium->pUnkForRelease, &IID_IUnknown);
2014 /* Unlike the IStream / IStorage ifaces, the existing pUnkForRelease
2015 is left intact if a NULL ptr is unmarshalled - see the tests. */
2016
2017 return pBuffer;
2018}
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
content
Definition: atl_ax.c:994
unsigned char *__RPC_USER HMETAFILEPICT_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, HMETAFILEPICT *phMfp)
Definition: usrmarshal.c:1406
unsigned char *__RPC_USER HENHMETAFILE_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, HENHMETAFILE *phEmf)
Definition: usrmarshal.c:1200
unsigned char *__RPC_USER HBITMAP_UserUnmarshal(ULONG *flags, unsigned char *buffer, HBITMAP *bmp)
Definition: usrmarshal.c:701
unsigned char *WINAPI WdtpInterfacePointer_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, IUnknown **ppunk, REFIID riid)
Definition: usrmarshal.c:1607
unsigned char *__RPC_USER HGLOBAL_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, HGLOBAL *phGlobal)
Definition: usrmarshal.c:487
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
#define debugstr_wn
Definition: kernel32.h:33

Referenced by ASYNC_STGMEDIUM_UserUnmarshal(), and marshal_STGMEDIUM().

◆ WdtpInterfacePointer_UserFree()

void WINAPI WdtpInterfacePointer_UserFree ( IUnknown punk)

Definition at line 1664 of file usrmarshal.c.

1665{
1666 TRACE("(%p)\n", punk);
1667 if(punk) IUnknown_Release(punk);
1668}

◆ WdtpInterfacePointer_UserMarshal()

unsigned char *WINAPI WdtpInterfacePointer_UserMarshal ( ULONG pFlags,
ULONG  RealFlags,
unsigned char pBuffer,
IUnknown punk,
REFIID  riid 
)

Definition at line 1550 of file usrmarshal.c.

1551{
1553 IStream *stm;
1554 DWORD size;
1555 void *ptr;
1556
1557 TRACE("(%s, 0x%x, %p, &%p, %s)\n", debugstr_user_flags(pFlags), RealFlags, pBuffer, punk, debugstr_guid(riid));
1558
1559 if(!h) return NULL;
1560 if(CreateStreamOnHGlobal(h, TRUE, &stm) != S_OK)
1561 {
1562 GlobalFree(h);
1563 return NULL;
1564 }
1565
1566 if(CoMarshalInterface(stm, riid, punk, LOWORD(RealFlags), NULL, MSHLFLAGS_NORMAL) != S_OK)
1567 {
1568 IStream_Release(stm);
1569 return pBuffer;
1570 }
1571
1573 size = GlobalSize(h);
1574
1575 *(DWORD *)pBuffer = size;
1576 pBuffer += sizeof(DWORD);
1577 *(DWORD *)pBuffer = size;
1578 pBuffer += sizeof(DWORD);
1579
1580 ptr = GlobalLock(h);
1582 GlobalUnlock(h);
1583
1584 IStream_Release(stm);
1585 return pBuffer + size;
1586}
#define TRUE
Definition: types.h:120
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI CoMarshalInterface(IStream *pStream, REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *pvDestContext, DWORD mshlFlags)
Definition: marshal.c:1876
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
static PVOID ptr
Definition: dispmode.c:27

Referenced by interface_variant_marshal(), marshal_STGMEDIUM(), marshal_WdtpInterfacePointer(), and STGMEDIUM_UserMarshal().

◆ WdtpInterfacePointer_UserSize()

ULONG __RPC_USER WdtpInterfacePointer_UserSize ( ULONG pFlags,
ULONG  RealFlags,
ULONG  StartingSize,
IUnknown punk,
REFIID  riid 
)

Definition at line 1515 of file usrmarshal.c.

1516{
1517 DWORD marshal_size = 0;
1518 HRESULT hr;
1519
1520 TRACE("(%s, 0%x, %d, %p, %s)\n", debugstr_user_flags(pFlags), RealFlags, StartingSize, punk, debugstr_guid(riid));
1521
1522 hr = CoGetMarshalSizeMax(&marshal_size, riid, punk, LOWORD(RealFlags), NULL, MSHLFLAGS_NORMAL);
1523 if(FAILED(hr)) return StartingSize;
1524
1525 ALIGN_LENGTH(StartingSize, 3);
1526 StartingSize += 2 * sizeof(DWORD);
1527 return StartingSize + marshal_size;
1528}
HRESULT WINAPI CoGetMarshalSizeMax(ULONG *pulSize, REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *pvDestContext, DWORD mshlFlags)
Definition: marshal.c:1800
#define FAILED(hr)
Definition: intsafe.h:51

Referenced by interface_variant_size(), marshal_STGMEDIUM(), marshal_WdtpInterfacePointer(), and STGMEDIUM_UserSize().

◆ WdtpInterfacePointer_UserUnmarshal()

unsigned char *WINAPI WdtpInterfacePointer_UserUnmarshal ( ULONG pFlags,
unsigned char pBuffer,
IUnknown **  ppunk,
REFIID  riid 
)

Definition at line 1607 of file usrmarshal.c.

1608{
1609 HRESULT hr;
1610 HGLOBAL h;
1611 IStream *stm;
1612 DWORD size;
1613 void *ptr;
1614 IUnknown *orig;
1615
1616 TRACE("(%s, %p, %p, %s)\n", debugstr_user_flags(pFlags), pBuffer, ppunk, debugstr_guid(riid));
1617
1619
1620 size = *(DWORD *)pBuffer;
1621 pBuffer += sizeof(DWORD);
1622 if(size != *(DWORD *)pBuffer)
1624
1625 pBuffer += sizeof(DWORD);
1626
1627 /* FIXME: sanity check on size */
1628
1630 if(!h) RaiseException(RPC_X_NO_MEMORY, 0, 0, NULL);
1631
1632 if(CreateStreamOnHGlobal(h, TRUE, &stm) != S_OK)
1633 {
1634 GlobalFree(h);
1636 }
1637
1638 ptr = GlobalLock(h);
1640 GlobalUnlock(h);
1641
1642 orig = *ppunk;
1643 hr = CoUnmarshalInterface(stm, riid, (void**)ppunk);
1644 IStream_Release(stm);
1645
1646 if(hr != S_OK) RaiseException(hr, 0, 0, NULL);
1647
1648 if(orig) IUnknown_Release(orig);
1649
1650 return pBuffer + size;
1651}
HRESULT WINAPI CoUnmarshalInterface(IStream *pStream, REFIID riid, LPVOID *ppv)
Definition: marshal.c:1981
#define RPC_X_NO_MEMORY
Definition: rpcnterr.h:35

Referenced by interface_variant_unmarshal(), marshal_WdtpInterfacePointer(), and STGMEDIUM_UserUnmarshal().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ole  )