CComVariant::ChangeType

CComVariant::ChangeType

 

Converts the CComVariant object to a new type.


      HRESULT ChangeType(
   VARTYPE vtNew,
   const VARIANT* pSrc = NULL 
);

vtNew

[in] The new type for the CComVariant object.

pSrc

[in] A pointer to the VARIANT whose value will be converted to the new type. The default value is NULL, meaning the CComVariant object will be converted in place.

A standard HRESULT value.

If you pass a value for pSrc, ChangeType will use this VARIANT as the source for the conversion. Otherwise, the CComVariant object will be the source.

Requirements

Header: atlcomcli.h

Show:
© 2016 Microsoft