DVARIANT.PutPropVariantmethod
Initializes DVARIANT from the contents of a PROPVARIANT structure.
Syntax
FUNCTION PutPropVariant (BYVAL pPropVar AS PROPVARIANT PTR) AS HRESULT
Parameters
| Name | Description | |
|---|---|---|
pPropVar | Pointer to a source PROPVARIANT structure. |
Return value
If this function succeeds, it returns S_OK (0). Otherwise, it returns an HRESULT error code.
Description
Initializes DVARIANT from the contents of a PROPVARIANT structure.
Remarks
Normally, the data stored in the PROPVARIANT is copied to the VARIANT without a datatype change. However, in the following cases, there is no direct VARIANT support for the datatype, and they are converted as shown.
VT_BLOB, VT_STREAM
Converted to VT_UNKNOWN. The punkVal member will contain a pointer to an IStream that contains the source data.
VT_LPSTR, VT_LPWSTR, VT_CLSID
Converted to VT_BSTR,
VT_FILETIME
Converted to VT_DATE.
VT_VECTOR OR x
Converted to VT_ARRAY OR x
The following types cannot be converted with this function.
VT_STORAGE
VT_BLOB_OBJECT
VT_STREAMED_OBJECT
VT_STORED_OBJECT
VT_CF
VT_VECTOR OR VT_CF
Reference
- Include file
DVARIANT.INC - Defined in AfxNova/DVARIANT.inc:1568
- Documented in COM/DVARIANT Class.md
- Topic: DVARIANT Class