1999-03-28 15:15:40 +02:00
|
|
|
/*
|
|
|
|
* Temporary place for ole2 stubs.
|
|
|
|
*
|
|
|
|
* Copyright (C) 1999 Corel Corporation
|
2000-03-08 19:49:36 +01:00
|
|
|
* Move these functions to dlls/ole32/ole2impl.c when you implement them.
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
|
|
|
|
2003-01-07 21:36:20 +01:00
|
|
|
#define NONAMELESSUNION
|
|
|
|
#define NONAMELESSSTRUCT
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2000-02-10 20:03:02 +01:00
|
|
|
#include "windef.h"
|
2000-09-26 02:00:55 +02:00
|
|
|
#include "winbase.h"
|
1999-09-23 13:48:02 +02:00
|
|
|
#include "winuser.h"
|
2000-09-26 02:00:55 +02:00
|
|
|
#include "ole2.h"
|
2003-01-13 21:37:39 +01:00
|
|
|
#include "objidl.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1999-03-28 15:15:40 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
1999-03-28 15:15:40 +02:00
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleCreateLinkToFile [OLE32.@]
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid,
|
|
|
|
DWORD renderopt, LPFORMATETC lpFormatEtc,
|
|
|
|
LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj)
|
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%p,%p,%li,%p,%p,%p,%p), stub!\n",lpszFileName, riid, renderopt, lpFormatEtc, pClientSite, pStg, ppvObj);
|
2002-04-12 01:44:48 +02:00
|
|
|
return E_NOTIMPL;
|
1999-03-28 15:15:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleDuplicateData [OLE32.@]
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat,
|
|
|
|
UINT uiFlags)
|
|
|
|
{
|
2002-11-22 05:43:02 +01:00
|
|
|
FIXME("(%p,%x,%x), stub!\n", hSrc, cfFormat, uiFlags);
|
2002-04-12 01:44:48 +02:00
|
|
|
return E_NOTIMPL;
|
1999-03-28 15:15:40 +02:00
|
|
|
}
|
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-03-28 15:15:40 +02:00
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleTranslateAccelerator [OLE32.@]
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleTranslateAccelerator (LPOLEINPLACEFRAME lpFrame,
|
1999-09-23 13:48:02 +02:00
|
|
|
LPOLEINPLACEFRAMEINFO lpFrameInfo, LPMSG lpmsg)
|
1999-03-28 15:15:40 +02:00
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%p,%p,%p),stub!\n", lpFrame, lpFrameInfo, lpmsg);
|
1999-03-28 15:15:40 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* SetConvertStg [OLE32.@]
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI SetConvertStg(LPSTORAGE pStg, BOOL fConvert)
|
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%p,%x), stub!\n", pStg, fConvert);
|
2002-04-12 01:44:48 +02:00
|
|
|
return E_NOTIMPL;
|
1999-03-28 15:15:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleCreate [OLE32.@]
|
2000-07-10 12:56:19 +02:00
|
|
|
*
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
2000-07-10 12:56:19 +02:00
|
|
|
HRESULT WINAPI OleCreate(
|
|
|
|
REFCLSID rclsid,
|
|
|
|
REFIID riid,
|
|
|
|
DWORD renderopt,
|
|
|
|
LPFORMATETC pFormatEtc,
|
|
|
|
LPOLECLIENTSITE pClientSite,
|
|
|
|
LPSTORAGE pStg,
|
|
|
|
LPVOID* ppvObj)
|
1999-03-28 15:15:40 +02:00
|
|
|
{
|
2000-07-10 12:56:19 +02:00
|
|
|
HRESULT hres, hres1;
|
|
|
|
IUnknown * pUnk = NULL;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-07-10 12:56:19 +02:00
|
|
|
FIXME("\n\t%s\n\t%s stub!\n", debugstr_guid(rclsid), debugstr_guid(riid));
|
|
|
|
|
2002-11-04 23:38:26 +01:00
|
|
|
if (SUCCEEDED((hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER , riid, (LPVOID*)&pUnk))))
|
2000-07-10 12:56:19 +02:00
|
|
|
{
|
|
|
|
if (pClientSite)
|
|
|
|
{
|
|
|
|
IOleObject * pOE;
|
|
|
|
IPersistStorage * pPS;
|
|
|
|
if (SUCCEEDED((hres = IUnknown_QueryInterface( pUnk, &IID_IOleObject, (LPVOID*)&pOE))))
|
|
|
|
{
|
|
|
|
TRACE("trying to set clientsite %p\n", pClientSite);
|
|
|
|
hres1 = IOleObject_SetClientSite(pOE, pClientSite);
|
|
|
|
TRACE("-- result 0x%08lx\n", hres1);
|
|
|
|
IOleObject_Release(pOE);
|
|
|
|
}
|
|
|
|
if (SUCCEEDED((hres = IUnknown_QueryInterface( pUnk, &IID_IPersistStorage, (LPVOID*)&pPS))))
|
|
|
|
{
|
|
|
|
TRACE("trying to set stg %p\n", pStg);
|
|
|
|
hres1 = IPersistStorage_InitNew(pPS, pStg);
|
|
|
|
TRACE("-- result 0x%08lx\n", hres1);
|
|
|
|
IPersistStorage_Release(pPS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*ppvObj = pUnk;
|
|
|
|
|
|
|
|
TRACE("-- %p \n", pUnk);
|
|
|
|
return hres;
|
1999-03-28 15:15:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleCreateLink [OLE32.@]
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleCreateLink(LPMONIKER pmkLinkSrc, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
|
|
|
|
LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj)
|
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(not shown), stub!\n");
|
2002-04-12 01:44:48 +02:00
|
|
|
return E_NOTIMPL;
|
1999-03-28 15:15:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleCreateFromFile [OLE32.@]
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleCreateFromFile(REFCLSID rclsid, LPCOLESTR lpszFileName, REFIID riid,
|
|
|
|
DWORD renderopt, LPFORMATETC lpFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj)
|
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(not shown), stub!\n");
|
2002-04-12 01:44:48 +02:00
|
|
|
return E_NOTIMPL;
|
1999-03-28 15:15:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleGetIconOfClass [OLE32.@]
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
|
|
|
HGLOBAL WINAPI OleGetIconOfClass(REFCLSID rclsid, LPOLESTR lpszLabel, BOOL fUseTypeAsLabel)
|
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%p,%p,%x), stub!\n", rclsid, lpszLabel, fUseTypeAsLabel);
|
2002-12-02 19:10:57 +01:00
|
|
|
return NULL;
|
1999-03-28 15:15:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleCreateStaticFromData [OLE32.@]
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleCreateStaticFromData(LPDATAOBJECT pSrcDataObj, REFIID iid,
|
|
|
|
DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
|
|
|
|
LPSTORAGE pStg, LPVOID* ppvObj)
|
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(not shown), stub!\n");
|
2002-04-12 01:44:48 +02:00
|
|
|
return E_NOTIMPL;
|
1999-03-28 15:15:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleCreateLinkFromData [OLE32.@]
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
HRESULT WINAPI OleCreateLinkFromData(LPDATAOBJECT pSrcDataObj, REFIID riid,
|
|
|
|
DWORD renderopt, LPFORMATETC pFormatEtc,
|
|
|
|
LPOLECLIENTSITE pClientSite, LPSTORAGE pStg,
|
|
|
|
LPVOID* ppvObj)
|
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(not shown), stub!\n");
|
2002-04-12 01:44:48 +02:00
|
|
|
return E_NOTIMPL;
|
1999-03-28 15:15:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleIsRunning [OLE32.@]
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
|
|
|
BOOL WINAPI OleIsRunning(LPOLEOBJECT pObject)
|
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%p), stub!\n", pObject);
|
1999-03-28 15:15:40 +02:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleRegEnumVerbs [OLE32.@]
|
1999-03-28 15:15:40 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum)
|
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%p,%p), stub!\n", clsid, ppenum);
|
2000-02-26 19:32:38 +01:00
|
|
|
return OLEOBJ_E_NOVERBS;
|
1999-03-28 15:15:40 +02:00
|
|
|
}
|
|
|
|
|
1999-05-02 11:27:08 +02:00
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleRegEnumFormatEtc [OLE32.@]
|
1999-05-02 11:27:08 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleRegEnumFormatEtc (
|
2002-06-01 01:06:46 +02:00
|
|
|
REFCLSID clsid,
|
1999-05-02 11:27:08 +02:00
|
|
|
DWORD dwDirection,
|
|
|
|
LPENUMFORMATETC* ppenumFormatetc)
|
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%p, %ld, %p), stub!\n", clsid, dwDirection, ppenumFormatetc);
|
1999-05-02 11:27:08 +02:00
|
|
|
|
2002-04-12 01:44:48 +02:00
|
|
|
return E_NOTIMPL;
|
1999-05-02 11:27:08 +02:00
|
|
|
}
|
|
|
|
|
2003-05-13 02:32:43 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* OLE_FreeClipDataArray [internal]
|
|
|
|
*
|
|
|
|
* NOTES:
|
|
|
|
* frees the data associated with an array of CLIPDATAs
|
|
|
|
*/
|
|
|
|
static void OLE_FreeClipDataArray(ULONG count, CLIPDATA * pClipDataArray)
|
|
|
|
{
|
|
|
|
ULONG i;
|
|
|
|
for (i = 0; i < count; i++)
|
|
|
|
{
|
|
|
|
if (pClipDataArray[i].pClipData)
|
|
|
|
{
|
|
|
|
CoTaskMemFree(pClipDataArray[i].pClipData);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI FreePropVariantArray(ULONG,PROPVARIANT*);
|
|
|
|
|
1999-11-15 00:56:11 +01:00
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* PropVariantClear [OLE32.@]
|
1999-11-15 00:56:11 +01:00
|
|
|
*/
|
2003-05-13 02:32:43 +02:00
|
|
|
HRESULT WINAPI PropVariantClear(PROPVARIANT * pvar) /* [in/out] */
|
1999-11-15 00:56:11 +01:00
|
|
|
{
|
2003-01-13 21:37:39 +01:00
|
|
|
TRACE("(%p)\n", pvar);
|
|
|
|
|
|
|
|
if (!pvar)
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
switch(pvar->vt)
|
|
|
|
{
|
|
|
|
case VT_STREAM:
|
|
|
|
case VT_STREAMED_OBJECT:
|
|
|
|
case VT_STORAGE:
|
|
|
|
case VT_STORED_OBJECT:
|
|
|
|
IUnknown_Release((LPUNKNOWN)pvar->u.pStream);
|
|
|
|
break;
|
|
|
|
case VT_CLSID:
|
|
|
|
case VT_LPSTR:
|
|
|
|
case VT_LPWSTR:
|
2003-05-13 02:32:43 +02:00
|
|
|
CoTaskMemFree(pvar->u.puuid); /* pick an arbitary typed pointer - we don't care about the type as we are just freeing it */
|
|
|
|
break;
|
2003-01-13 21:37:39 +01:00
|
|
|
case VT_BLOB:
|
|
|
|
case VT_BLOB_OBJECT:
|
2003-05-13 02:32:43 +02:00
|
|
|
CoTaskMemFree(pvar->u.blob.pBlobData);
|
|
|
|
break;
|
|
|
|
case VT_BSTR:
|
|
|
|
FIXME("Need to load OLEAUT32 for SysFreeString\n");
|
|
|
|
/* SysFreeString(pvar->u.bstrVal); */
|
|
|
|
break;
|
|
|
|
case VT_CF:
|
|
|
|
if (pvar->u.pclipdata)
|
|
|
|
{
|
|
|
|
OLE_FreeClipDataArray(1, pvar->u.pclipdata);
|
|
|
|
CoTaskMemFree(pvar->u.pclipdata);
|
|
|
|
}
|
|
|
|
break;
|
2003-01-13 21:37:39 +01:00
|
|
|
default:
|
2003-05-13 02:32:43 +02:00
|
|
|
if (pvar->vt & VT_ARRAY)
|
2003-01-13 21:37:39 +01:00
|
|
|
{
|
2003-05-13 02:32:43 +02:00
|
|
|
FIXME("Need to call SafeArrayDestroy\n");
|
2003-01-13 21:37:39 +01:00
|
|
|
/* SafeArrayDestroy(pvar->u.caub); */
|
|
|
|
}
|
2003-05-13 02:32:43 +02:00
|
|
|
switch (pvar->vt & VT_VECTOR)
|
|
|
|
{
|
|
|
|
case VT_VARIANT:
|
|
|
|
FreePropVariantArray(pvar->u.capropvar.cElems, pvar->u.capropvar.pElems);
|
|
|
|
break;
|
|
|
|
case VT_CF:
|
|
|
|
OLE_FreeClipDataArray(pvar->u.caclipdata.cElems, pvar->u.caclipdata.pElems);
|
|
|
|
break;
|
|
|
|
case VT_BSTR:
|
|
|
|
case VT_LPSTR:
|
|
|
|
case VT_LPWSTR:
|
|
|
|
FIXME("Freeing of vector sub-type not supported yet\n");
|
|
|
|
}
|
|
|
|
if (pvar->vt & VT_VECTOR)
|
|
|
|
{
|
|
|
|
CoTaskMemFree(pvar->u.capropvar.pElems); /* pick an arbitary VT_VECTOR structure - they all have the same memory layout */
|
|
|
|
}
|
2003-01-13 21:37:39 +01:00
|
|
|
}
|
|
|
|
|
2003-05-13 02:32:43 +02:00
|
|
|
ZeroMemory(pvar, sizeof(*pvar));
|
2003-01-13 21:37:39 +01:00
|
|
|
|
|
|
|
return S_OK;
|
1999-11-15 00:56:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* PropVariantCopy [OLE32.@]
|
1999-11-15 00:56:11 +01:00
|
|
|
*/
|
2003-05-13 02:32:43 +02:00
|
|
|
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, /* [out] FIXME: PROPVARIANT * */
|
|
|
|
const PROPVARIANT *pvarSrc) /* [in] FIXME: const PROPVARIANT * */
|
1999-11-15 00:56:11 +01:00
|
|
|
{
|
2003-05-13 02:32:43 +02:00
|
|
|
ULONG len;
|
|
|
|
TRACE("(%p, %p): stub:\n", pvarDest, pvarSrc);
|
1999-11-15 00:56:11 +01:00
|
|
|
|
2003-05-13 02:32:43 +02:00
|
|
|
/* this will deal with most cases */
|
|
|
|
CopyMemory(pvarDest, pvarSrc, sizeof(*pvarDest));
|
|
|
|
|
|
|
|
switch(pvarSrc->vt)
|
|
|
|
{
|
|
|
|
case VT_STREAM:
|
|
|
|
case VT_STREAMED_OBJECT:
|
|
|
|
case VT_STORAGE:
|
|
|
|
case VT_STORED_OBJECT:
|
|
|
|
IUnknown_AddRef((LPUNKNOWN)pvarDest->u.pStream);
|
|
|
|
break;
|
|
|
|
case VT_CLSID:
|
|
|
|
pvarDest->u.puuid = CoTaskMemAlloc(sizeof(CLSID));
|
|
|
|
CopyMemory(pvarDest->u.puuid, pvarSrc->u.puuid, sizeof(CLSID));
|
|
|
|
break;
|
|
|
|
case VT_LPSTR:
|
|
|
|
len = strlen(pvarSrc->u.pszVal);
|
|
|
|
pvarDest->u.pszVal = CoTaskMemAlloc(len);
|
|
|
|
CopyMemory(pvarDest->u.pszVal, pvarSrc->u.pszVal, len);
|
|
|
|
break;
|
|
|
|
case VT_LPWSTR:
|
|
|
|
len = lstrlenW(pvarSrc->u.pwszVal);
|
|
|
|
pvarDest->u.pwszVal = CoTaskMemAlloc(len);
|
|
|
|
CopyMemory(pvarDest->u.pwszVal, pvarSrc->u.pwszVal, len);
|
|
|
|
break;
|
|
|
|
case VT_BLOB:
|
|
|
|
case VT_BLOB_OBJECT:
|
|
|
|
if (pvarSrc->u.blob.pBlobData)
|
|
|
|
{
|
|
|
|
len = pvarSrc->u.blob.cbSize;
|
|
|
|
pvarDest->u.blob.pBlobData = CoTaskMemAlloc(len);
|
|
|
|
CopyMemory(pvarDest->u.blob.pBlobData, pvarSrc->u.blob.pBlobData, len);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case VT_BSTR:
|
|
|
|
FIXME("Need to copy BSTR\n");
|
|
|
|
break;
|
|
|
|
case VT_CF:
|
|
|
|
if (pvarSrc->u.pclipdata)
|
|
|
|
{
|
|
|
|
len = pvarSrc->u.pclipdata->cbSize - sizeof(pvarSrc->u.pclipdata->ulClipFmt);
|
|
|
|
CoTaskMemAlloc(len);
|
|
|
|
CopyMemory(pvarDest->u.pclipdata->pClipData, pvarSrc->u.pclipdata->pClipData, len);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
if (pvarSrc->vt & VT_ARRAY)
|
|
|
|
{
|
|
|
|
FIXME("Need to call SafeArrayCopy\n");
|
|
|
|
/* SafeArrayCopy(...); */
|
|
|
|
}
|
|
|
|
if (pvarSrc->vt & VT_VECTOR)
|
|
|
|
{
|
|
|
|
int elemSize;
|
|
|
|
switch(pvarSrc->vt & VT_VECTOR)
|
|
|
|
{
|
|
|
|
case VT_I1:
|
|
|
|
elemSize = sizeof(pvarSrc->u.cVal);
|
|
|
|
break;
|
|
|
|
case VT_UI1:
|
|
|
|
elemSize = sizeof(pvarSrc->u.bVal);
|
|
|
|
break;
|
|
|
|
case VT_I2:
|
|
|
|
elemSize = sizeof(pvarSrc->u.iVal);
|
|
|
|
break;
|
|
|
|
case VT_UI2:
|
|
|
|
elemSize = sizeof(pvarSrc->u.uiVal);
|
|
|
|
break;
|
|
|
|
case VT_BOOL:
|
|
|
|
elemSize = sizeof(pvarSrc->u.boolVal);
|
|
|
|
break;
|
|
|
|
case VT_I4:
|
|
|
|
elemSize = sizeof(pvarSrc->u.lVal);
|
|
|
|
break;
|
|
|
|
case VT_UI4:
|
|
|
|
elemSize = sizeof(pvarSrc->u.ulVal);
|
|
|
|
break;
|
|
|
|
case VT_R4:
|
|
|
|
elemSize = sizeof(pvarSrc->u.fltVal);
|
|
|
|
break;
|
|
|
|
case VT_R8:
|
|
|
|
elemSize = sizeof(pvarSrc->u.dblVal);
|
|
|
|
break;
|
|
|
|
case VT_ERROR:
|
|
|
|
elemSize = sizeof(pvarSrc->u.scode);
|
|
|
|
break;
|
|
|
|
case VT_I8:
|
|
|
|
elemSize = sizeof(pvarSrc->u.hVal);
|
|
|
|
break;
|
|
|
|
case VT_UI8:
|
|
|
|
elemSize = sizeof(pvarSrc->u.uhVal);
|
|
|
|
break;
|
|
|
|
case VT_CY:
|
|
|
|
elemSize = sizeof(pvarSrc->u.cyVal);
|
|
|
|
break;
|
|
|
|
case VT_DATE:
|
|
|
|
elemSize = sizeof(pvarSrc->u.date);
|
|
|
|
break;
|
|
|
|
case VT_FILETIME:
|
|
|
|
elemSize = sizeof(pvarSrc->u.filetime);
|
|
|
|
break;
|
|
|
|
case VT_CLSID:
|
|
|
|
elemSize = sizeof(*pvarSrc->u.puuid);
|
|
|
|
break;
|
|
|
|
case VT_CF:
|
|
|
|
elemSize = sizeof(*pvarSrc->u.pclipdata);
|
|
|
|
break;
|
|
|
|
case VT_BSTR:
|
|
|
|
case VT_LPSTR:
|
|
|
|
case VT_LPWSTR:
|
|
|
|
case VT_VARIANT:
|
|
|
|
default:
|
|
|
|
FIXME("Invalid element type: %ul\n", pvarSrc->vt & VT_VECTOR);
|
|
|
|
return E_INVALIDARG;
|
|
|
|
}
|
|
|
|
len = pvarSrc->u.capropvar.cElems;
|
|
|
|
pvarDest->u.capropvar.pElems = CoTaskMemAlloc(len * elemSize);
|
|
|
|
if (pvarSrc->vt == (VT_VECTOR | VT_VARIANT))
|
|
|
|
{
|
|
|
|
ULONG i;
|
|
|
|
for (i = 0; i < len; i++)
|
|
|
|
PropVariantCopy(&pvarDest->u.capropvar.pElems[i], &pvarSrc->u.capropvar.pElems[i]);
|
|
|
|
}
|
|
|
|
else if (pvarSrc->vt == (VT_VECTOR | VT_CF))
|
|
|
|
{
|
|
|
|
FIXME("Copy clipformats\n");
|
|
|
|
}
|
|
|
|
else if (pvarSrc->vt == (VT_VECTOR | VT_BSTR))
|
|
|
|
{
|
|
|
|
FIXME("Copy BSTRs\n");
|
|
|
|
}
|
|
|
|
else if (pvarSrc->vt == (VT_VECTOR | VT_LPSTR))
|
|
|
|
{
|
|
|
|
FIXME("Copy LPSTRs\n");
|
|
|
|
}
|
|
|
|
else if (pvarSrc->vt == (VT_VECTOR | VT_LPSTR))
|
|
|
|
{
|
|
|
|
FIXME("Copy LPWSTRs\n");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
CopyMemory(pvarDest->u.capropvar.pElems, pvarSrc->u.capropvar.pElems, len * elemSize);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
1999-11-15 00:56:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* FreePropVariantArray [OLE32.@]
|
1999-11-15 00:56:11 +01:00
|
|
|
*/
|
2000-12-02 00:58:28 +01:00
|
|
|
HRESULT WINAPI FreePropVariantArray(ULONG cVariants, /* [in] */
|
2003-05-13 02:32:43 +02:00
|
|
|
PROPVARIANT *rgvars) /* [in/out] */
|
1999-11-15 00:56:11 +01:00
|
|
|
{
|
2003-05-13 02:32:43 +02:00
|
|
|
ULONG i;
|
|
|
|
|
|
|
|
TRACE("(%lu, %p)\n", cVariants, rgvars);
|
1999-11-15 00:56:11 +01:00
|
|
|
|
2003-05-13 02:32:43 +02:00
|
|
|
for(i = 0; i < cVariants; i++)
|
|
|
|
PropVariantClear(&rgvars[i]);
|
|
|
|
|
|
|
|
return S_OK;
|
1999-11-15 00:56:11 +01:00
|
|
|
}
|
2000-09-22 22:55:14 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* CoIsOle1Class [OLE32.@]
|
2000-09-22 22:55:14 +02:00
|
|
|
*/
|
|
|
|
BOOL WINAPI CoIsOle1Class(REFCLSID clsid)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", debugstr_guid(clsid));
|
|
|
|
return FALSE;
|
|
|
|
}
|
2003-01-07 20:42:43 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DllGetClassObject [OLE2.4]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI DllGetClassObject16(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
|
|
|
|
{
|
|
|
|
FIXME("(%s, %s, %p): stub\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* OleSetClipboard [OLE2.49]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleSetClipboard16(IDataObject* pDataObj)
|
|
|
|
{
|
|
|
|
FIXME("(%p): stub\n", pDataObj);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* OleGetClipboard [OLE2.50]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleGetClipboard16(IDataObject** ppDataObj)
|
|
|
|
{
|
|
|
|
FIXME("(%p): stub\n", ppDataObj);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|