Skip to content

Latest commit

 

History

History
90 lines (74 loc) · 3.4 KB

nf-combaseapi-propvariantclear.md

File metadata and controls

90 lines (74 loc) · 3.4 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:combaseapi.PropVariantClear
PropVariantClear function (combaseapi.h)
Frees all elements that can be freed in a given PROPVARIANT structure.
PropVariantClear
PropVariantClear function [Structured Storage]
_stg_propvariantclear
combaseapi/PropVariantClear
stg.propvariantclear
stg\propvariantclear.htm
Stg
062b6065-a56f-4ecd-b232-3ba338a6d806
12/05/2018
PropVariantClear, PropVariantClear function [Structured Storage], _stg_propvariantclear, combaseapi/PropVariantClear, stg.propvariantclear
combaseapi.h
Windows
Windows 2000 Professional [desktop apps \| UWP apps]
Windows 2000 Server [desktop apps \| UWP apps]
Ole32.lib
Ole32.dll
Windows
19H1
PropVariantClear
combaseapi/PropVariantClear
c++
APIRef
kbSyntax
DllExport
Ole32.dll
API-MS-Win-Core-Com-l1-1-0.dll
ComBase.dll
API-MS-Win-Core-Com-l1-1-1.dll
API-MS-Win-DownLevel-Ole32-l1-1-0.dll
API-MS-Win-DownLevel-Ole32-l1-1-1.dll
PropVariantClear

PropVariantClear function

-description

The PropVariantClear function frees all elements that can be freed in a given PROPVARIANT structure. For complex elements with known element pointers, the underlying elements are freed prior to freeing the containing element.

-parameters

-param pvar [in]

A pointer to an initialized PROPVARIANT structure for which any deallocatable elements are to be freed. On return, all zeroes are written to the PROPVARIANT structure.

-returns

This function returns HRESULT.

-remarks

At any level of indirection, NULL pointers are ignored. For example, the pvar parameter points to a PROPVARIANT structure of type VT_CF. The pclipdata member of the PROPVARIANT structure points to a CLIPDATA structure. The pClipData pointer in the CLIPDATA structure is NULL. In this example, the pClipData pointer is ignored. However, the CLIPDATA structure pointed to by the pclipdata member of the PROPVARIANT structure is freed.

On return, this function writes zeroes to the specified PROPVARIANT structure, so the VT-type is VT_EMPTY.

Passing NULL as the pvar parameter produces a return code of S_OK.

Note  Do not use this function to initialize PROPVARIANT structures. Instead, initialize these structures using the PropVariantInit macro (defined in Propidl.h).
 

-see-also

FreePropVariantArray