mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:02:56 +00:00
sync ole32 and oleaut32 to wine 1.1.13
svn path=/trunk/; revision=38908
This commit is contained in:
parent
130bfcf51a
commit
747111402a
13 changed files with 304 additions and 49 deletions
|
@ -80,9 +80,10 @@
|
||||||
|
|
||||||
#include "compobj_private.h"
|
#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)
|
#define HANDLE_ERROR(err) do { hr = err; TRACE("(HRESULT=%x)\n", (HRESULT)err); goto CLEANUP; } while (0)
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* OLEClipbrd
|
* OLEClipbrd
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
#include "objbase.h"
|
#include "objbase.h"
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
#include "ole2ver.h"
|
#include "ole2ver.h"
|
||||||
|
#include "ctxtcall.h"
|
||||||
|
|
||||||
#include "compobj_private.h"
|
#include "compobj_private.h"
|
||||||
|
|
||||||
|
@ -3703,19 +3704,37 @@ HRESULT WINAPI CoRegisterChannelHook(REFGUID guidExtension, IChannelHook *pChann
|
||||||
typedef struct Context
|
typedef struct Context
|
||||||
{
|
{
|
||||||
const IComThreadingInfoVtbl *lpVtbl;
|
const IComThreadingInfoVtbl *lpVtbl;
|
||||||
|
const IContextCallbackVtbl *lpCallbackVtbl;
|
||||||
LONG refs;
|
LONG refs;
|
||||||
APTTYPE apttype;
|
APTTYPE apttype;
|
||||||
} Context;
|
} 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;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (IsEqualIID(riid, &IID_IComThreadingInfo) ||
|
if (IsEqualIID(riid, &IID_IComThreadingInfo) ||
|
||||||
IsEqualIID(riid, &IID_IUnknown))
|
IsEqualIID(riid, &IID_IUnknown))
|
||||||
{
|
{
|
||||||
*ppv = iface;
|
*ppv = &iface->lpVtbl;
|
||||||
IUnknown_AddRef(iface);
|
} else if (IsEqualIID(riid, &IID_IContextCallback))
|
||||||
|
{
|
||||||
|
*ppv = &iface->lpCallbackVtbl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*ppv)
|
||||||
|
{
|
||||||
|
IUnknown_AddRef((IUnknown*)*ppv);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3723,24 +3742,40 @@ static HRESULT WINAPI Context_QueryInterface(IComThreadingInfo *iface, REFIID ri
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI Context_AddRef(IComThreadingInfo *iface)
|
static ULONG Context_AddRef(Context *This)
|
||||||
{
|
{
|
||||||
Context *This = (Context *)iface;
|
|
||||||
return InterlockedIncrement(&This->refs);
|
return InterlockedIncrement(&This->refs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI Context_Release(IComThreadingInfo *iface)
|
static ULONG Context_Release(Context *This)
|
||||||
{
|
{
|
||||||
Context *This = (Context *)iface;
|
|
||||||
ULONG refs = InterlockedDecrement(&This->refs);
|
ULONG refs = InterlockedDecrement(&This->refs);
|
||||||
if (!refs)
|
if (!refs)
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
return refs;
|
return refs;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI Context_GetCurrentApartmentType(IComThreadingInfo *iface, APTTYPE *apttype)
|
static HRESULT WINAPI Context_CTI_QueryInterface(IComThreadingInfo *iface, REFIID riid, LPVOID *ppv)
|
||||||
{
|
{
|
||||||
Context *This = (Context *)iface;
|
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);
|
TRACE("(%p)\n", apttype);
|
||||||
|
|
||||||
|
@ -3748,9 +3783,9 @@ static HRESULT WINAPI Context_GetCurrentApartmentType(IComThreadingInfo *iface,
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI Context_GetCurrentThreadType(IComThreadingInfo *iface, THDTYPE *thdtype)
|
static HRESULT WINAPI Context_CTI_GetCurrentThreadType(IComThreadingInfo *iface, THDTYPE *thdtype)
|
||||||
{
|
{
|
||||||
Context *This = (Context *)iface;
|
Context *This = impl_from_IComThreadingInfo(iface);
|
||||||
|
|
||||||
TRACE("(%p)\n", thdtype);
|
TRACE("(%p)\n", thdtype);
|
||||||
|
|
||||||
|
@ -3767,13 +3802,13 @@ static HRESULT WINAPI Context_GetCurrentThreadType(IComThreadingInfo *iface, THD
|
||||||
return S_OK;
|
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);
|
FIXME("(%p): stub\n", logical_thread_id);
|
||||||
return E_NOTIMPL;
|
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));
|
FIXME("(%s): stub\n", debugstr_guid(logical_thread_id));
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
|
@ -3781,15 +3816,51 @@ static HRESULT WINAPI Context_SetCurrentLogicalThreadId(IComThreadingInfo *iface
|
||||||
|
|
||||||
static const IComThreadingInfoVtbl Context_Threading_Vtbl =
|
static const IComThreadingInfoVtbl Context_Threading_Vtbl =
|
||||||
{
|
{
|
||||||
Context_QueryInterface,
|
Context_CTI_QueryInterface,
|
||||||
Context_AddRef,
|
Context_CTI_AddRef,
|
||||||
Context_Release,
|
Context_CTI_Release,
|
||||||
Context_GetCurrentApartmentType,
|
Context_CTI_GetCurrentApartmentType,
|
||||||
Context_GetCurrentThreadType,
|
Context_CTI_GetCurrentThreadType,
|
||||||
Context_GetCurrentLogicalThreadId,
|
Context_CTI_GetCurrentLogicalThreadId,
|
||||||
Context_SetCurrentLogicalThreadId
|
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.@]
|
* CoGetObjectContext [OLE32.@]
|
||||||
*
|
*
|
||||||
|
@ -3823,6 +3894,7 @@ HRESULT WINAPI CoGetObjectContext(REFIID riid, void **ppv)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
context->lpVtbl = &Context_Threading_Vtbl;
|
context->lpVtbl = &Context_Threading_Vtbl;
|
||||||
|
context->lpCallbackVtbl = &Context_Callback_Vtbl;
|
||||||
context->refs = 1;
|
context->refs = 1;
|
||||||
if (apt->multi_threaded)
|
if (apt->multi_threaded)
|
||||||
context->apttype = APTTYPE_MTA;
|
context->apttype = APTTYPE_MTA;
|
||||||
|
|
|
@ -909,7 +909,7 @@ static HRESULT WINAPI DefaultHandler_GetMiscStatus(
|
||||||
if (FAILED(hres))
|
if (FAILED(hres))
|
||||||
*pdwStatus = 0;
|
*pdwStatus = 0;
|
||||||
|
|
||||||
return S_OK;
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
|
|
@ -59,10 +59,6 @@ DECLARE_INTERFACE_(IMalloc16,IUnknown)
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
extern LPMALLOC16 IMalloc16_Constructor(void);
|
|
||||||
|
|
||||||
/**********************************************************************/
|
|
||||||
|
|
||||||
typedef struct ILockBytes16 *LPLOCKBYTES16;
|
typedef struct ILockBytes16 *LPLOCKBYTES16;
|
||||||
|
|
||||||
#define INTERFACE ILockBytes16
|
#define INTERFACE ILockBytes16
|
||||||
|
|
|
@ -1344,7 +1344,7 @@ static ULONG WINAPI EnumMonikerImpl_Release(IEnumMoniker* iface)
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* EnmumMoniker_Next
|
* EnumMoniker_Next
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI EnumMonikerImpl_Next(IEnumMoniker* iface, ULONG celt, IMoniker** rgelt, ULONG * pceltFetched)
|
static HRESULT WINAPI EnumMonikerImpl_Next(IEnumMoniker* iface, ULONG celt, IMoniker** rgelt, ULONG * pceltFetched)
|
||||||
{
|
{
|
||||||
|
@ -1379,7 +1379,7 @@ static HRESULT WINAPI EnumMonikerImpl_Next(IEnumMoniker* iface, ULONG celt, IM
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* EnmumMoniker_Skip
|
* EnumMoniker_Skip
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI EnumMonikerImpl_Skip(IEnumMoniker* iface, ULONG celt)
|
static HRESULT WINAPI EnumMonikerImpl_Skip(IEnumMoniker* iface, ULONG celt)
|
||||||
{
|
{
|
||||||
|
@ -1396,7 +1396,7 @@ static HRESULT WINAPI EnumMonikerImpl_Skip(IEnumMoniker* iface, ULONG celt)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* EnmumMoniker_Reset
|
* EnumMoniker_Reset
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI EnumMonikerImpl_Reset(IEnumMoniker* iface)
|
static HRESULT WINAPI EnumMonikerImpl_Reset(IEnumMoniker* iface)
|
||||||
{
|
{
|
||||||
|
@ -1410,7 +1410,7 @@ static HRESULT WINAPI EnumMonikerImpl_Reset(IEnumMoniker* iface)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* EnmumMoniker_Clone
|
* EnumMoniker_Clone
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI EnumMonikerImpl_Clone(IEnumMoniker* iface, IEnumMoniker ** ppenum)
|
static HRESULT WINAPI EnumMonikerImpl_Clone(IEnumMoniker* iface, IEnumMoniker ** ppenum)
|
||||||
{
|
{
|
||||||
|
|
|
@ -171,7 +171,7 @@ LPVOID CDECL IMalloc16_fnHeapMinimize(IMalloc16* iface) {
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* IMalloc16_Constructor [VTABLE]
|
* IMalloc16_Constructor [VTABLE]
|
||||||
*/
|
*/
|
||||||
LPMALLOC16
|
static LPMALLOC16
|
||||||
IMalloc16_Constructor(void)
|
IMalloc16_Constructor(void)
|
||||||
{
|
{
|
||||||
static IMalloc16Vtbl vt16;
|
static IMalloc16Vtbl vt16;
|
||||||
|
|
|
@ -138,6 +138,10 @@
|
||||||
@ stdcall HGLOBAL_UserMarshal(ptr ptr ptr)
|
@ stdcall HGLOBAL_UserMarshal(ptr ptr ptr)
|
||||||
@ stdcall HGLOBAL_UserSize(ptr long ptr)
|
@ stdcall HGLOBAL_UserSize(ptr long ptr)
|
||||||
@ stdcall HGLOBAL_UserUnmarshal(ptr ptr 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_UserFree(ptr ptr)
|
||||||
@ stdcall HMENU_UserMarshal(ptr ptr ptr)
|
@ stdcall HMENU_UserMarshal(ptr ptr ptr)
|
||||||
@ stdcall HMENU_UserSize(ptr long ptr)
|
@ stdcall HMENU_UserSize(ptr long ptr)
|
||||||
|
|
|
@ -568,7 +568,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
|
||||||
/* save away the message state again */
|
/* save away the message state again */
|
||||||
msg->Handle = message_state;
|
msg->Handle = message_state;
|
||||||
|
|
||||||
TRACE("-- %ld\n", status);
|
TRACE("-- %d\n", status);
|
||||||
|
|
||||||
return HRESULT_FROM_WIN32(status);
|
return HRESULT_FROM_WIN32(status);
|
||||||
}
|
}
|
||||||
|
@ -751,7 +751,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, channel_hook_data);
|
HeapFree(GetProcessHeap(), 0, channel_hook_data);
|
||||||
|
|
||||||
TRACE("-- %ld\n", status);
|
TRACE("-- %d\n", status);
|
||||||
|
|
||||||
return HRESULT_FROM_WIN32(status);
|
return HRESULT_FROM_WIN32(status);
|
||||||
}
|
}
|
||||||
|
@ -771,7 +771,7 @@ static DWORD WINAPI rpc_sendreceive_thread(LPVOID param)
|
||||||
* RPC functions do */
|
* RPC functions do */
|
||||||
data->status = I_RpcSendReceive((RPC_MESSAGE *)data->msg);
|
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);
|
SetEvent(data->handle);
|
||||||
|
|
||||||
|
@ -893,7 +893,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac
|
||||||
orpcthat.flags = ORPCF_NULL;
|
orpcthat.flags = ORPCF_NULL;
|
||||||
orpcthat.extensions = 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)
|
if (status != RPC_S_OK)
|
||||||
hr = HRESULT_FROM_WIN32(status);
|
hr = HRESULT_FROM_WIN32(status);
|
||||||
|
|
||||||
|
@ -967,7 +967,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_FreeBuffer(LPRPCCHANNELBUFFER iface
|
||||||
|
|
||||||
msg->Handle = message_state;
|
msg->Handle = message_state;
|
||||||
|
|
||||||
TRACE("-- %ld\n", status);
|
TRACE("-- %d\n", status);
|
||||||
|
|
||||||
return HRESULT_FROM_WIN32(status);
|
return HRESULT_FROM_WIN32(status);
|
||||||
}
|
}
|
||||||
|
@ -1003,7 +1003,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_FreeBuffer(LPRPCCHANNELBUFFER iface
|
||||||
IRpcChannelBuffer_Release(message_state->params.chan);
|
IRpcChannelBuffer_Release(message_state->params.chan);
|
||||||
HeapFree(GetProcessHeap(), 0, message_state);
|
HeapFree(GetProcessHeap(), 0, message_state);
|
||||||
|
|
||||||
TRACE("-- %ld\n", status);
|
TRACE("-- %d\n", status);
|
||||||
|
|
||||||
return HRESULT_FROM_WIN32(status);
|
return HRESULT_FROM_WIN32(status);
|
||||||
}
|
}
|
||||||
|
@ -1104,7 +1104,7 @@ HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid,
|
||||||
|
|
||||||
if (status != RPC_S_OK)
|
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);
|
return HRESULT_FROM_WIN32(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1536,7 +1536,7 @@ HRESULT RPC_RegisterInterface(REFIID riid)
|
||||||
list_add_tail(®istered_interfaces, &rif->entry);
|
list_add_tail(®istered_interfaces, &rif->entry);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ERR("RpcServerRegisterIfEx failed with error %ld\n", status);
|
ERR("RpcServerRegisterIfEx failed with error %d\n", status);
|
||||||
HeapFree(GetProcessHeap(), 0, rif);
|
HeapFree(GetProcessHeap(), 0, rif);
|
||||||
hr = HRESULT_FROM_WIN32(status);
|
hr = HRESULT_FROM_WIN32(status);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6281,6 +6281,9 @@ HRESULT WINAPI WriteClassStg(IStorage* pStg, REFCLSID rclsid)
|
||||||
if(!pStg)
|
if(!pStg)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
if(!rclsid)
|
||||||
|
return STG_E_INVALIDPOINTER;
|
||||||
|
|
||||||
hRes = IStorage_SetClass(pStg, rclsid);
|
hRes = IStorage_SetClass(pStg, rclsid);
|
||||||
|
|
||||||
return hRes;
|
return hRes;
|
||||||
|
|
|
@ -646,6 +646,105 @@ void __RPC_USER HBITMAP_UserFree(ULONG *pFlags, HBITMAP *phBmp)
|
||||||
FIXME(":stub\n");
|
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");
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* HDC_UserSize [OLE32.@]
|
* HDC_UserSize [OLE32.@]
|
||||||
*
|
*
|
||||||
|
|
|
@ -519,22 +519,26 @@ static HRESULT WINAPI OLEPictureImpl_get_Handle(IPicture *iface,
|
||||||
{
|
{
|
||||||
OLEPictureImpl *This = (OLEPictureImpl *)iface;
|
OLEPictureImpl *This = (OLEPictureImpl *)iface;
|
||||||
TRACE("(%p)->(%p)\n", This, phandle);
|
TRACE("(%p)->(%p)\n", This, phandle);
|
||||||
|
|
||||||
|
if(!phandle)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
switch(This->desc.picType) {
|
switch(This->desc.picType) {
|
||||||
case PICTYPE_NONE:
|
case PICTYPE_NONE:
|
||||||
case PICTYPE_UNINITIALIZED:
|
case PICTYPE_UNINITIALIZED:
|
||||||
*phandle = 0;
|
*phandle = 0;
|
||||||
break;
|
break;
|
||||||
case PICTYPE_BITMAP:
|
case PICTYPE_BITMAP:
|
||||||
*phandle = (OLE_HANDLE)This->desc.u.bmp.hbitmap;
|
*phandle = HandleToUlong(This->desc.u.bmp.hbitmap);
|
||||||
break;
|
break;
|
||||||
case PICTYPE_METAFILE:
|
case PICTYPE_METAFILE:
|
||||||
*phandle = (OLE_HANDLE)This->desc.u.wmf.hmeta;
|
*phandle = HandleToUlong(This->desc.u.wmf.hmeta);
|
||||||
break;
|
break;
|
||||||
case PICTYPE_ICON:
|
case PICTYPE_ICON:
|
||||||
*phandle = (OLE_HANDLE)This->desc.u.icon.hicon;
|
*phandle = HandleToUlong(This->desc.u.icon.hicon);
|
||||||
break;
|
break;
|
||||||
case PICTYPE_ENHMETAFILE:
|
case PICTYPE_ENHMETAFILE:
|
||||||
*phandle = (OLE_HANDLE)This->desc.u.emf.hemf;
|
*phandle = HandleToUlong(This->desc.u.emf.hemf);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FIXME("Unimplemented type %d\n", This->desc.picType);
|
FIXME("Unimplemented type %d\n", This->desc.picType);
|
||||||
|
@ -564,7 +568,7 @@ static HRESULT WINAPI OLEPictureImpl_get_hPal(IPicture *iface,
|
||||||
hres = S_FALSE;
|
hres = S_FALSE;
|
||||||
break;
|
break;
|
||||||
case PICTYPE_BITMAP:
|
case PICTYPE_BITMAP:
|
||||||
*phandle = (OLE_HANDLE)This->desc.u.bmp.hpal;
|
*phandle = HandleToUlong(This->desc.u.bmp.hpal);
|
||||||
hres = S_OK;
|
hres = S_OK;
|
||||||
break;
|
break;
|
||||||
case PICTYPE_METAFILE:
|
case PICTYPE_METAFILE:
|
||||||
|
@ -591,6 +595,10 @@ static HRESULT WINAPI OLEPictureImpl_get_Type(IPicture *iface,
|
||||||
{
|
{
|
||||||
OLEPictureImpl *This = (OLEPictureImpl *)iface;
|
OLEPictureImpl *This = (OLEPictureImpl *)iface;
|
||||||
TRACE("(%p)->(%p): type is %d\n", This, ptype, This->desc.picType);
|
TRACE("(%p)->(%p): type is %d\n", This, ptype, This->desc.picType);
|
||||||
|
|
||||||
|
if(!ptype)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
*ptype = This->desc.picType;
|
*ptype = This->desc.picType;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -774,7 +782,7 @@ static HRESULT WINAPI OLEPictureImpl_SelectPicture(IPicture *iface,
|
||||||
*phdcOut = This->hDCCur;
|
*phdcOut = This->hDCCur;
|
||||||
This->hDCCur = hdcIn;
|
This->hDCCur = hdcIn;
|
||||||
if (phbmpOut)
|
if (phbmpOut)
|
||||||
*phbmpOut = (OLE_HANDLE)This->desc.u.bmp.hbitmap;
|
*phbmpOut = HandleToUlong(This->desc.u.bmp.hbitmap);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
} else {
|
} else {
|
||||||
FIXME("Don't know how to select picture type %d\n",This->desc.picType);
|
FIXME("Don't know how to select picture type %d\n",This->desc.picType);
|
||||||
|
@ -842,8 +850,14 @@ static HRESULT WINAPI OLEPictureImpl_get_Attributes(IPicture *iface,
|
||||||
{
|
{
|
||||||
OLEPictureImpl *This = (OLEPictureImpl *)iface;
|
OLEPictureImpl *This = (OLEPictureImpl *)iface;
|
||||||
TRACE("(%p)->(%p).\n", This, pdwAttr);
|
TRACE("(%p)->(%p).\n", This, pdwAttr);
|
||||||
|
|
||||||
|
if(!pdwAttr)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
*pdwAttr = 0;
|
*pdwAttr = 0;
|
||||||
switch (This->desc.picType) {
|
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_BITMAP: if (This->hbmMask) *pdwAttr = PICTURE_TRANSPARENT; break; /* not 'truly' scalable, see MSDN. */
|
||||||
case PICTYPE_ICON: *pdwAttr = PICTURE_TRANSPARENT;break;
|
case PICTYPE_ICON: *pdwAttr = PICTURE_TRANSPARENT;break;
|
||||||
case PICTYPE_ENHMETAFILE: /* fall through */
|
case PICTYPE_ENHMETAFILE: /* fall through */
|
||||||
|
|
|
@ -2214,6 +2214,8 @@ static ITypeInfoImpl * MSFT_DoTypeInfo(
|
||||||
debugstr_w(ptiRet->Name),
|
debugstr_w(ptiRet->Name),
|
||||||
debugstr_guid(&ptiRet->TypeAttr.guid),
|
debugstr_guid(&ptiRet->TypeAttr.guid),
|
||||||
typekind_desc[ptiRet->TypeAttr.typekind]);
|
typekind_desc[ptiRet->TypeAttr.typekind]);
|
||||||
|
if (TRACE_ON(typelib))
|
||||||
|
dump_TypeInfo(ptiRet);
|
||||||
|
|
||||||
return ptiRet;
|
return ptiRet;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2017,8 +2017,35 @@ HRESULT CALLBACK IPropertyBag_Read_Proxy(
|
||||||
VARIANT *pVar,
|
VARIANT *pVar,
|
||||||
IErrorLog *pErrorLog)
|
IErrorLog *pErrorLog)
|
||||||
{
|
{
|
||||||
FIXME("not implemented\n");
|
IUnknown *pUnk = NULL;
|
||||||
return E_FAIL;
|
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(
|
HRESULT __RPC_STUB IPropertyBag_Read_Stub(
|
||||||
|
@ -2029,8 +2056,45 @@ HRESULT __RPC_STUB IPropertyBag_Read_Stub(
|
||||||
DWORD varType,
|
DWORD varType,
|
||||||
IUnknown *pUnkObj)
|
IUnknown *pUnkObj)
|
||||||
{
|
{
|
||||||
FIXME("not implemented\n");
|
static const WCHAR emptyWstr[1] = {0};
|
||||||
return E_FAIL;
|
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 */
|
/* call_as/local stubs for ocidl.idl */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue