Condividi tramite


CComVariant::ChangeType

Converts the CComVariant object to a new type.

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

Parameters

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

Return Value

A standard HRESULT value.

Remarks

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

See Also

Reference

CComVariant Class