Commit 37d9b486 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

Support a few trivial cases in PropVariantClear.

parent d0019a60
......@@ -541,6 +541,9 @@ HRESULT WINAPI DoDragDrop (
/*
* Setup the drag n drop tracking window.
*/
if (!IsValidInterface((LPUNKNOWN)pDropSource))
return E_INVALIDARG;
trackerInfo.dataObject = pDataObject;
trackerInfo.dropSource = pDropSource;
trackerInfo.dwOKEffect = dwOKEffect;
......
......@@ -25,6 +25,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "objidl.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
......@@ -225,13 +226,42 @@ HRESULT WINAPI OleRegEnumFormatEtc (
/***********************************************************************
* PropVariantClear [OLE32.166]
*/
HRESULT WINAPI PropVariantClear(void *pvar) /* [in/out] FIXME: PROPVARIANT * */
HRESULT WINAPI PropVariantClear(PROPVARIANT * pvar) /* [in/out] FIXME: PROPVARIANT * */
{
FIXME("(%p): stub:\n", pvar);
*(LPWORD)pvar = 0;
/* sets at least the vt field to VT_EMPTY */
return E_NOTIMPL;
TRACE("(%p)\n", pvar);
if (!pvar)
return S_OK;
switch(pvar->vt)
{
case VT_BSTR:
CoTaskMemFree(pvar->u.bstrVal);
break;
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_CF:
case VT_LPSTR:
case VT_LPWSTR:
case VT_BLOB:
case VT_BLOB_OBJECT:
FIXME("Don't know what to do for variant type %d\n", pvar->vt);
default:
if (pvar->vt && VT_VECTOR)
{
FIXME("Need to recursively destroy elements in vector\n");
/* SafeArrayDestroy(pvar->u.caub); */
}
}
ZeroMemory(pvar, sizeof(PROPVARIANT));
return S_OK;
}
/***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment