Commit 0c93b1f0 authored by Jon Griffiths's avatar Jon Griffiths Committed by Alexandre Julliard

Implement ClearCustData.

parent 17ac230b
......@@ -166,7 +166,7 @@
168 stdcall VarAbs(ptr ptr)
169 stdcall VarFix(ptr ptr)
170 stdcall OaBuildVersion()
171 stub ClearCustData
171 stdcall ClearCustData(ptr)
172 stdcall VarInt(ptr ptr)
173 stdcall VarNeg(ptr ptr)
174 stdcall VarNot(ptr ptr)
......
......@@ -3879,3 +3879,33 @@ HRESULT WINAPI CreateTypeLib2(
*ppctlib = ICreateTypeLib2_Constructor(syskind, szFile);
return (*ppctlib)? S_OK: E_OUTOFMEMORY;
}
/******************************************************************************
* ClearCustData (OLEAUT32.171)
*
* Clear a custom data types' data.
*
* PARAMS
* lpCust [I] The custom data type instance
*
* RETURNS
* Nothing.
*/
void WINAPI ClearCustData(LPCUSTDATA lpCust)
{
if (lpCust && lpCust->cCustData)
{
if (lpCust->prgCustData)
{
DWORD i;
for (i = 0; i < lpCust->cCustData; i++)
VariantClear(&lpCust->prgCustData[i].varValue);
/* FIXME - Should be using a per-thread IMalloc */
HeapFree(GetProcessHeap(), 0, lpCust->prgCustData);
lpCust->prgCustData = NULL;
}
lpCust->cCustData = 0;
}
}
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