Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PropVariantClear

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This 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.


WINOLEAPI PropVariantClear(
  PROPVARIANT* pvar
);

pvar

[in] 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.

The following table shows the return values for this function.

Value Description

S_OK

The VT types are recognized and all items that can be freed have been freed.

STG_E_INVALID_PARAMETER

The variant has an unknown VT type.

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.

Aa910794.note(en-us,MSDN.10).gifNote:
Do not use this function to initialize PROPVARIANT structures. Instead, initialize these structures using the PropVariantInit macro (defined in propidl.h).

Headeroaidl.h
Libraryoleaut32.lib
Windows Embedded CEWindows CE 2.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2015 Microsoft