|Microsoft Windows Script Interfaces|
Takes a variant value and creates a new variant with a specified type.
HRESULT ChangeType( VARIANT* pvarDst, VARIANT* pvarSrc, LCID lcid, VARTYPE vtNew );
[in, out] A variant to contain the value represented by pvarSrc, but with the type specified by vtNew.
[in] A variant value to change into a new type.
[in] The locale context to use when converting the arguments to or from strings.
[in] Specifies the type for pvarDst to become.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
The method succeeded.
The pvarDst and pvarSrc arguments may be equal, in which case the original value is overwritten. This method passes pvarDst to the VariantClear function, and consequently pvarDst should be initialized to a valid value.