Implement ClearCustData.
This commit is contained in:
parent
17ac230bbf
commit
0c93b1f0a7
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue