Author: cwittich
Date: Sun Jan 18 13:23:59 2009
New Revision: 38908
URL:
http://svn.reactos.org/svn/reactos?rev=38908&view=rev
Log:
sync ole32 and oleaut32 to wine 1.1.13
Modified:
trunk/reactos/dll/win32/ole32/clipboard.c
trunk/reactos/dll/win32/ole32/compobj.c
trunk/reactos/dll/win32/ole32/defaulthandler.c
trunk/reactos/dll/win32/ole32/ifs.h
trunk/reactos/dll/win32/ole32/moniker.c
trunk/reactos/dll/win32/ole32/ole16.c
trunk/reactos/dll/win32/ole32/ole32.spec
trunk/reactos/dll/win32/ole32/rpc.c
trunk/reactos/dll/win32/ole32/storage32.c
trunk/reactos/dll/win32/ole32/usrmarshal.c
trunk/reactos/dll/win32/oleaut32/olepicture.c
trunk/reactos/dll/win32/oleaut32/typelib.c
trunk/reactos/dll/win32/oleaut32/usrmarshal.c
Modified: trunk/reactos/dll/win32/ole32/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/clipboard.…
==============================================================================
--- trunk/reactos/dll/win32/ole32/clipboard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/clipboard.c [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -80,9 +80,10 @@
#include "compobj_private.h"
+WINE_DEFAULT_DEBUG_CHANNEL(ole);
+
#define HANDLE_ERROR(err) do { hr = err; TRACE("(HRESULT=%x)\n", (HRESULT)err);
goto CLEANUP; } while (0)
-WINE_DEFAULT_DEBUG_CHANNEL(ole);
/****************************************************************************
* OLEClipbrd
Modified: trunk/reactos/dll/win32/ole32/compobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/compobj.c?…
==============================================================================
--- trunk/reactos/dll/win32/ole32/compobj.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/compobj.c [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -55,6 +55,7 @@
#include "objbase.h"
#include "ole2.h"
#include "ole2ver.h"
+#include "ctxtcall.h"
#include "compobj_private.h"
@@ -3703,19 +3704,37 @@
typedef struct Context
{
const IComThreadingInfoVtbl *lpVtbl;
+ const IContextCallbackVtbl *lpCallbackVtbl;
LONG refs;
APTTYPE apttype;
} Context;
-static HRESULT WINAPI Context_QueryInterface(IComThreadingInfo *iface, REFIID riid,
LPVOID *ppv)
+static inline Context *impl_from_IComThreadingInfo( IComThreadingInfo *iface )
+{
+ return (Context *)((char*)iface - FIELD_OFFSET(Context, lpVtbl));
+}
+
+static inline Context *impl_from_IContextCallback( IContextCallback *iface )
+{
+ return (Context *)((char*)iface - FIELD_OFFSET(Context, lpCallbackVtbl));
+}
+
+static HRESULT Context_QueryInterface(Context *iface, REFIID riid, LPVOID *ppv)
{
*ppv = NULL;
if (IsEqualIID(riid, &IID_IComThreadingInfo) ||
IsEqualIID(riid, &IID_IUnknown))
{
- *ppv = iface;
- IUnknown_AddRef(iface);
+ *ppv = &iface->lpVtbl;
+ } else if (IsEqualIID(riid, &IID_IContextCallback))
+ {
+ *ppv = &iface->lpCallbackVtbl;
+ }
+
+ if (*ppv)
+ {
+ IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
@@ -3723,24 +3742,40 @@
return E_NOINTERFACE;
}
-static ULONG WINAPI Context_AddRef(IComThreadingInfo *iface)
-{
- Context *This = (Context *)iface;
+static ULONG Context_AddRef(Context *This)
+{
return InterlockedIncrement(&This->refs);
}
-static ULONG WINAPI Context_Release(IComThreadingInfo *iface)
-{
- Context *This = (Context *)iface;
+static ULONG Context_Release(Context *This)
+{
ULONG refs = InterlockedDecrement(&This->refs);
if (!refs)
HeapFree(GetProcessHeap(), 0, This);
return refs;
}
-static HRESULT WINAPI Context_GetCurrentApartmentType(IComThreadingInfo *iface, APTTYPE
*apttype)
-{
- Context *This = (Context *)iface;
+static HRESULT WINAPI Context_CTI_QueryInterface(IComThreadingInfo *iface, REFIID riid,
LPVOID *ppv)
+{
+ Context *This = impl_from_IComThreadingInfo(iface);
+ return Context_QueryInterface(This, riid, ppv);
+}
+
+static ULONG WINAPI Context_CTI_AddRef(IComThreadingInfo *iface)
+{
+ Context *This = impl_from_IComThreadingInfo(iface);
+ return Context_AddRef(This);
+}
+
+static ULONG WINAPI Context_CTI_Release(IComThreadingInfo *iface)
+{
+ Context *This = impl_from_IComThreadingInfo(iface);
+ return Context_Release(This);
+}
+
+static HRESULT WINAPI Context_CTI_GetCurrentApartmentType(IComThreadingInfo *iface,
APTTYPE *apttype)
+{
+ Context *This = impl_from_IComThreadingInfo(iface);
TRACE("(%p)\n", apttype);
@@ -3748,9 +3783,9 @@
return S_OK;
}
-static HRESULT WINAPI Context_GetCurrentThreadType(IComThreadingInfo *iface, THDTYPE
*thdtype)
-{
- Context *This = (Context *)iface;
+static HRESULT WINAPI Context_CTI_GetCurrentThreadType(IComThreadingInfo *iface, THDTYPE
*thdtype)
+{
+ Context *This = impl_from_IComThreadingInfo(iface);
TRACE("(%p)\n", thdtype);
@@ -3767,13 +3802,13 @@
return S_OK;
}
-static HRESULT WINAPI Context_GetCurrentLogicalThreadId(IComThreadingInfo *iface, GUID
*logical_thread_id)
+static HRESULT WINAPI Context_CTI_GetCurrentLogicalThreadId(IComThreadingInfo *iface,
GUID *logical_thread_id)
{
FIXME("(%p): stub\n", logical_thread_id);
return E_NOTIMPL;
}
-static HRESULT WINAPI Context_SetCurrentLogicalThreadId(IComThreadingInfo *iface, REFGUID
logical_thread_id)
+static HRESULT WINAPI Context_CTI_SetCurrentLogicalThreadId(IComThreadingInfo *iface,
REFGUID logical_thread_id)
{
FIXME("(%s): stub\n", debugstr_guid(logical_thread_id));
return E_NOTIMPL;
@@ -3781,14 +3816,50 @@
static const IComThreadingInfoVtbl Context_Threading_Vtbl =
{
- Context_QueryInterface,
- Context_AddRef,
- Context_Release,
- Context_GetCurrentApartmentType,
- Context_GetCurrentThreadType,
- Context_GetCurrentLogicalThreadId,
- Context_SetCurrentLogicalThreadId
+ Context_CTI_QueryInterface,
+ Context_CTI_AddRef,
+ Context_CTI_Release,
+ Context_CTI_GetCurrentApartmentType,
+ Context_CTI_GetCurrentThreadType,
+ Context_CTI_GetCurrentLogicalThreadId,
+ Context_CTI_SetCurrentLogicalThreadId
};
+
+static HRESULT WINAPI Context_CC_QueryInterface(IContextCallback *iface, REFIID riid,
LPVOID *ppv)
+{
+ Context *This = impl_from_IContextCallback(iface);
+ return Context_QueryInterface(This, riid, ppv);
+}
+
+static ULONG WINAPI Context_CC_AddRef(IContextCallback *iface)
+{
+ Context *This = impl_from_IContextCallback(iface);
+ return Context_AddRef(This);
+}
+
+static ULONG WINAPI Context_CC_Release(IContextCallback *iface)
+{
+ Context *This = impl_from_IContextCallback(iface);
+ return Context_Release(This);
+}
+
+static HRESULT WINAPI Context_CC_ContextCallback(IContextCallback *iface, PFNCONTEXTCALL
pCallback,
+ ComCallData *param, REFIID riid, int method, IUnknown *punk)
+{
+ Context *This = impl_from_IContextCallback(iface);
+
+ FIXME("(%p/%p)->(%p, %p, %s, %d, %p)\n", This, iface, pCallback, param,
debugstr_guid(riid), method, punk);
+ return E_NOTIMPL;
+}
+
+static const IContextCallbackVtbl Context_Callback_Vtbl =
+{
+ Context_CC_QueryInterface,
+ Context_CC_AddRef,
+ Context_CC_Release,
+ Context_CC_ContextCallback
+};
+
/***********************************************************************
* CoGetObjectContext [OLE32.@]
@@ -3823,6 +3894,7 @@
return E_OUTOFMEMORY;
context->lpVtbl = &Context_Threading_Vtbl;
+ context->lpCallbackVtbl = &Context_Callback_Vtbl;
context->refs = 1;
if (apt->multi_threaded)
context->apttype = APTTYPE_MTA;
Modified: trunk/reactos/dll/win32/ole32/defaulthandler.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/defaulthan…
==============================================================================
--- trunk/reactos/dll/win32/ole32/defaulthandler.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/defaulthandler.c [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -909,7 +909,7 @@
if (FAILED(hres))
*pdwStatus = 0;
- return S_OK;
+ return hres;
}
/************************************************************************
Modified: trunk/reactos/dll/win32/ole32/ifs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ifs.h?rev=…
==============================================================================
--- trunk/reactos/dll/win32/ole32/ifs.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/ifs.h [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -56,10 +56,6 @@
STDMETHOD16_(LPVOID,HeapMinimize)(THIS) PURE;
};
#undef INTERFACE
-
-/**********************************************************************/
-
-extern LPMALLOC16 IMalloc16_Constructor(void);
/**********************************************************************/
Modified: trunk/reactos/dll/win32/ole32/moniker.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/moniker.c?…
==============================================================================
--- trunk/reactos/dll/win32/ole32/moniker.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/moniker.c [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -1344,7 +1344,7 @@
return ref;
}
/***********************************************************************
- * EnmumMoniker_Next
+ * EnumMoniker_Next
*/
static HRESULT WINAPI EnumMonikerImpl_Next(IEnumMoniker* iface, ULONG celt, IMoniker**
rgelt, ULONG * pceltFetched)
{
@@ -1379,7 +1379,7 @@
}
/***********************************************************************
- * EnmumMoniker_Skip
+ * EnumMoniker_Skip
*/
static HRESULT WINAPI EnumMonikerImpl_Skip(IEnumMoniker* iface, ULONG celt)
{
@@ -1396,7 +1396,7 @@
}
/***********************************************************************
- * EnmumMoniker_Reset
+ * EnumMoniker_Reset
*/
static HRESULT WINAPI EnumMonikerImpl_Reset(IEnumMoniker* iface)
{
@@ -1410,7 +1410,7 @@
}
/***********************************************************************
- * EnmumMoniker_Clone
+ * EnumMoniker_Clone
*/
static HRESULT WINAPI EnumMonikerImpl_Clone(IEnumMoniker* iface, IEnumMoniker **
ppenum)
{
Modified: trunk/reactos/dll/win32/ole32/ole16.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole16.c?re…
==============================================================================
--- trunk/reactos/dll/win32/ole32/ole16.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/ole16.c [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -171,7 +171,7 @@
/******************************************************************************
* IMalloc16_Constructor [VTABLE]
*/
-LPMALLOC16
+static LPMALLOC16
IMalloc16_Constructor(void)
{
static IMalloc16Vtbl vt16;
Modified: trunk/reactos/dll/win32/ole32/ole32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32.spec…
==============================================================================
--- trunk/reactos/dll/win32/ole32/ole32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/ole32.spec [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -138,6 +138,10 @@
@ stdcall HGLOBAL_UserMarshal(ptr ptr ptr)
@ stdcall HGLOBAL_UserSize(ptr long ptr)
@ stdcall HGLOBAL_UserUnmarshal(ptr ptr ptr)
+@ stdcall HICON_UserFree(ptr ptr)
+@ stdcall HICON_UserMarshal(ptr ptr ptr)
+@ stdcall HICON_UserSize(ptr long ptr)
+@ stdcall HICON_UserUnmarshal(ptr ptr ptr)
@ stdcall HMENU_UserFree(ptr ptr)
@ stdcall HMENU_UserMarshal(ptr ptr ptr)
@ stdcall HMENU_UserSize(ptr long ptr)
Modified: trunk/reactos/dll/win32/ole32/rpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/rpc.c?rev=…
==============================================================================
--- trunk/reactos/dll/win32/ole32/rpc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/rpc.c [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -568,7 +568,7 @@
/* save away the message state again */
msg->Handle = message_state;
- TRACE("-- %ld\n", status);
+ TRACE("-- %d\n", status);
return HRESULT_FROM_WIN32(status);
}
@@ -751,7 +751,7 @@
HeapFree(GetProcessHeap(), 0, channel_hook_data);
- TRACE("-- %ld\n", status);
+ TRACE("-- %d\n", status);
return HRESULT_FROM_WIN32(status);
}
@@ -771,7 +771,7 @@
* RPC functions do */
data->status = I_RpcSendReceive((RPC_MESSAGE *)data->msg);
- TRACE("completed with status 0x%lx\n", data->status);
+ TRACE("completed with status 0x%x\n", data->status);
SetEvent(data->handle);
@@ -893,7 +893,7 @@
orpcthat.flags = ORPCF_NULL;
orpcthat.extensions = NULL;
- TRACE("RPC call status: 0x%lx\n", status);
+ TRACE("RPC call status: 0x%x\n", status);
if (status != RPC_S_OK)
hr = HRESULT_FROM_WIN32(status);
@@ -967,7 +967,7 @@
msg->Handle = message_state;
- TRACE("-- %ld\n", status);
+ TRACE("-- %d\n", status);
return HRESULT_FROM_WIN32(status);
}
@@ -1003,7 +1003,7 @@
IRpcChannelBuffer_Release(message_state->params.chan);
HeapFree(GetProcessHeap(), 0, message_state);
- TRACE("-- %ld\n", status);
+ TRACE("-- %d\n", status);
return HRESULT_FROM_WIN32(status);
}
@@ -1104,7 +1104,7 @@
if (status != RPC_S_OK)
{
- ERR("Couldn't get binding for endpoint %s, status = %ld\n",
debugstr_w(endpoint), status);
+ ERR("Couldn't get binding for endpoint %s, status = %d\n",
debugstr_w(endpoint), status);
return HRESULT_FROM_WIN32(status);
}
@@ -1536,7 +1536,7 @@
list_add_tail(®istered_interfaces, &rif->entry);
else
{
- ERR("RpcServerRegisterIfEx failed with error %ld\n", status);
+ ERR("RpcServerRegisterIfEx failed with error %d\n", status);
HeapFree(GetProcessHeap(), 0, rif);
hr = HRESULT_FROM_WIN32(status);
}
Modified: trunk/reactos/dll/win32/ole32/storage32.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/storage32.…
==============================================================================
--- trunk/reactos/dll/win32/ole32/storage32.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/storage32.c [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -6280,6 +6280,9 @@
if(!pStg)
return E_INVALIDARG;
+
+ if(!rclsid)
+ return STG_E_INVALIDPOINTER;
hRes = IStorage_SetClass(pStg, rclsid);
Modified: trunk/reactos/dll/win32/ole32/usrmarshal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/usrmarshal…
==============================================================================
--- trunk/reactos/dll/win32/ole32/usrmarshal.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/usrmarshal.c [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -642,6 +642,105 @@
* This function is only intended to be called by the RPC runtime.
*/
void __RPC_USER HBITMAP_UserFree(ULONG *pFlags, HBITMAP *phBmp)
+{
+ FIXME(":stub\n");
+}
+
+/******************************************************************************
+ * HICON_UserSize [OLE32.@]
+ *
+ * Calculates the buffer size required to marshal an icon.
+ *
+ * PARAMS
+ * pFlags [I] Flags. See notes.
+ * StartingSize [I] Starting size of the buffer. This value is added on to
+ * the buffer size required for the icon.
+ * phIcon [I] Icon to size.
+ *
+ * RETURNS
+ * The buffer size required to marshal an icon plus the starting size.
+ *
+ * NOTES
+ * Even though the function is documented to take a pointer to a ULONG in
+ * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which
+ * the first parameter is a ULONG.
+ * This function is only intended to be called by the RPC runtime.
+ */
+ULONG __RPC_USER HICON_UserSize(ULONG *pFlags, ULONG StartingSize, HICON *phIcon)
+{
+ FIXME(":stub\n");
+ return StartingSize;
+}
+
+/******************************************************************************
+* HICON_UserMarshal [OLE32.@]
+*
+* Marshals an icon into a buffer.
+*
+* PARAMS
+* pFlags [I] Flags. See notes.
+* pBuffer [I] Buffer to marshal the icon into.
+* phIcon [I] Icon to marshal.
+*
+* RETURNS
+* The end of the marshaled data in the buffer.
+*
+* NOTES
+* Even though the function is documented to take a pointer to a ULONG in
+* pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which
+* the first parameter is a ULONG.
+* This function is only intended to be called by the RPC runtime.
+*/
+unsigned char * __RPC_USER HICON_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HICON
*phIcon)
+{
+ FIXME(":stub\n");
+ return pBuffer;
+}
+
+/******************************************************************************
+ * HICON_UserUnmarshal [OLE32.@]
+ *
+ * Unmarshals an icon from a buffer.
+ *
+ * PARAMS
+ * pFlags [I] Flags. See notes.
+ * pBuffer [I] Buffer to marshal the icon from.
+ * phIcon [O] Address that receive the unmarshaled icon.
+ *
+ * RETURNS
+ * The end of the marshaled data in the buffer.
+ *
+ * NOTES
+ * Even though the function is documented to take a pointer to an ULONG in
+ * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which
+ * the first parameter is an ULONG.
+ * This function is only intended to be called by the RPC runtime.
+ */
+unsigned char * __RPC_USER HICON_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer,
HICON *phIcon)
+{
+ FIXME(":stub\n");
+ return pBuffer;
+}
+
+/******************************************************************************
+ * HICON_UserFree [OLE32.@]
+ *
+ * Frees an unmarshaled icon.
+ *
+ * PARAMS
+ * pFlags [I] Flags. See notes.
+ * phIcon [I] Icon to free.
+ *
+ * RETURNS
+ * The end of the marshaled data in the buffer.
+ *
+ * NOTES
+ * Even though the function is documented to take a pointer to a ULONG in
+ * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of
+ * which the first parameter is a ULONG.
+ * This function is only intended to be called by the RPC runtime.
+ */
+void __RPC_USER HICON_UserFree(ULONG *pFlags, HICON *phIcon)
{
FIXME(":stub\n");
}
Modified: trunk/reactos/dll/win32/oleaut32/olepicture.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/olepict…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -519,22 +519,26 @@
{
OLEPictureImpl *This = (OLEPictureImpl *)iface;
TRACE("(%p)->(%p)\n", This, phandle);
+
+ if(!phandle)
+ return E_POINTER;
+
switch(This->desc.picType) {
case PICTYPE_NONE:
case PICTYPE_UNINITIALIZED:
*phandle = 0;
break;
case PICTYPE_BITMAP:
- *phandle = (OLE_HANDLE)This->desc.u.bmp.hbitmap;
+ *phandle = HandleToUlong(This->desc.u.bmp.hbitmap);
break;
case PICTYPE_METAFILE:
- *phandle = (OLE_HANDLE)This->desc.u.wmf.hmeta;
+ *phandle = HandleToUlong(This->desc.u.wmf.hmeta);
break;
case PICTYPE_ICON:
- *phandle = (OLE_HANDLE)This->desc.u.icon.hicon;
+ *phandle = HandleToUlong(This->desc.u.icon.hicon);
break;
case PICTYPE_ENHMETAFILE:
- *phandle = (OLE_HANDLE)This->desc.u.emf.hemf;
+ *phandle = HandleToUlong(This->desc.u.emf.hemf);
break;
default:
FIXME("Unimplemented type %d\n", This->desc.picType);
@@ -564,7 +568,7 @@
hres = S_FALSE;
break;
case PICTYPE_BITMAP:
- *phandle = (OLE_HANDLE)This->desc.u.bmp.hpal;
+ *phandle = HandleToUlong(This->desc.u.bmp.hpal);
hres = S_OK;
break;
case PICTYPE_METAFILE:
@@ -591,6 +595,10 @@
{
OLEPictureImpl *This = (OLEPictureImpl *)iface;
TRACE("(%p)->(%p): type is %d\n", This, ptype, This->desc.picType);
+
+ if(!ptype)
+ return E_POINTER;
+
*ptype = This->desc.picType;
return S_OK;
}
@@ -774,7 +782,7 @@
*phdcOut = This->hDCCur;
This->hDCCur = hdcIn;
if (phbmpOut)
- *phbmpOut = (OLE_HANDLE)This->desc.u.bmp.hbitmap;
+ *phbmpOut = HandleToUlong(This->desc.u.bmp.hbitmap);
return S_OK;
} else {
FIXME("Don't know how to select picture type
%d\n",This->desc.picType);
@@ -842,8 +850,14 @@
{
OLEPictureImpl *This = (OLEPictureImpl *)iface;
TRACE("(%p)->(%p).\n", This, pdwAttr);
+
+ if(!pdwAttr)
+ return E_POINTER;
+
*pdwAttr = 0;
switch (This->desc.picType) {
+ case PICTYPE_UNINITIALIZED:
+ case PICTYPE_NONE: break;
case PICTYPE_BITMAP: if (This->hbmMask) *pdwAttr = PICTURE_TRANSPARENT; break; /*
not 'truly' scalable, see MSDN. */
case PICTYPE_ICON: *pdwAttr = PICTURE_TRANSPARENT;break;
case PICTYPE_ENHMETAFILE: /* fall through */
Modified: trunk/reactos/dll/win32/oleaut32/typelib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -2214,6 +2214,8 @@
debugstr_w(ptiRet->Name),
debugstr_guid(&ptiRet->TypeAttr.guid),
typekind_desc[ptiRet->TypeAttr.typekind]);
+ if (TRACE_ON(typelib))
+ dump_TypeInfo(ptiRet);
return ptiRet;
}
Modified: trunk/reactos/dll/win32/oleaut32/usrmarshal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/usrmars…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/usrmarshal.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/usrmarshal.c [iso-8859-1] Sun Jan 18 13:23:59 2009
@@ -2017,8 +2017,35 @@
VARIANT *pVar,
IErrorLog *pErrorLog)
{
- FIXME("not implemented\n");
- return E_FAIL;
+ IUnknown *pUnk = NULL;
+ TRACE("(%p, %s, %p, %p)\n", This, debugstr_w(pszPropName), pVar, pErrorLog);
+
+ if(!pVar)
+ return E_POINTER;
+
+ if(V_VT(pVar) & (VT_BYREF | VT_ARRAY | VT_VECTOR))
+ {
+ FIXME("Variant type %x is byref, array or vector. Not implemented.\n",
V_VT(pVar));
+ return E_NOTIMPL;
+ }
+
+ switch(V_VT(pVar))
+ {
+ case VT_DISPATCH:
+ pUnk = (IUnknown*)V_DISPATCH(pVar);
+ break;
+ case VT_UNKNOWN:
+ pUnk = V_UNKNOWN(pVar);
+ break;
+ case VT_SAFEARRAY:
+ FIXME("Safearray support not yet implemented.\n");
+ return E_NOTIMPL;
+ default:
+ break;
+ }
+
+ return IPropertyBag_RemoteRead_Proxy(This, pszPropName, pVar, pErrorLog,
+ V_VT(pVar), pUnk);
}
HRESULT __RPC_STUB IPropertyBag_Read_Stub(
@@ -2029,8 +2056,45 @@
DWORD varType,
IUnknown *pUnkObj)
{
- FIXME("not implemented\n");
- return E_FAIL;
+ static const WCHAR emptyWstr[1] = {0};
+ IDispatch *disp;
+ HRESULT hr;
+ TRACE("(%p, %s, %p, %p, %x, %p)\n", This, debugstr_w(pszPropName), pVar,
+ pErrorLog, varType, pUnkObj);
+
+ if(varType & (VT_BYREF | VT_ARRAY | VT_VECTOR))
+ {
+ FIXME("Variant type %x is byref, array or vector. Not implemented.\n",
V_VT(pVar));
+ return E_NOTIMPL;
+ }
+
+ V_VT(pVar) = varType;
+ switch(varType)
+ {
+ case VT_DISPATCH:
+ hr = IUnknown_QueryInterface(pUnkObj, &IID_IDispatch, (LPVOID*)&disp);
+ if(FAILED(hr))
+ return hr;
+ IUnknown_Release(pUnkObj);
+ V_DISPATCH(pVar) = disp;
+ break;
+ case VT_UNKNOWN:
+ V_UNKNOWN(pVar) = pUnkObj;
+ break;
+ case VT_BSTR:
+ V_BSTR(pVar) = SysAllocString(emptyWstr);
+ break;
+ case VT_SAFEARRAY:
+ FIXME("Safearray support not yet implemented.\n");
+ return E_NOTIMPL;
+ default:
+ break;
+ }
+ hr = IPropertyBag_Read(This, pszPropName, pVar, pErrorLog);
+ if(FAILED(hr))
+ VariantClear(pVar);
+
+ return hr;
}
/* call_as/local stubs for ocidl.idl */