Support a few trivial cases in PropVariantClear.
This commit is contained in:
parent
d0019a6040
commit
37d9b486f9
|
@ -541,6 +541,9 @@ HRESULT WINAPI DoDragDrop (
|
||||||
/*
|
/*
|
||||||
* Setup the drag n drop tracking window.
|
* Setup the drag n drop tracking window.
|
||||||
*/
|
*/
|
||||||
|
if (!IsValidInterface((LPUNKNOWN)pDropSource))
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
trackerInfo.dataObject = pDataObject;
|
trackerInfo.dataObject = pDataObject;
|
||||||
trackerInfo.dropSource = pDropSource;
|
trackerInfo.dropSource = pDropSource;
|
||||||
trackerInfo.dwOKEffect = dwOKEffect;
|
trackerInfo.dwOKEffect = dwOKEffect;
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
|
#include "objidl.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||||
|
@ -225,13 +226,42 @@ HRESULT WINAPI OleRegEnumFormatEtc (
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* PropVariantClear [OLE32.166]
|
* 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);
|
TRACE("(%p)\n", pvar);
|
||||||
|
|
||||||
*(LPWORD)pvar = 0;
|
if (!pvar)
|
||||||
/* sets at least the vt field to VT_EMPTY */
|
return S_OK;
|
||||||
return E_NOTIMPL;
|
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue