DVARIANT.ChangeTypeExmethod
Converts the variant from one type to another.
Syntax
FUNCTION ChangeTypeEx (BYVAL vtNew AS VARTYPE, BYVAL lcid AS LCID = 0, BYVAL wFlags AS USHORT = 0) AS HRESULT
Parameters
| Name | Description | |
|---|---|---|
vtNew | The new variant type. | |
lcid | The locale identifier. The LCID is useful when the type of the source or destination VARIANTARG is VT_BSTR, VT_DISPATCH, or VT_DATE. | |
wFlags | VARIANT_NOVALUEPROP : Prevents the function from attempting to coerce an object to a fundamental type by getting the Value property. Applications should set this flag only if necessary, because it makes their behavior inconsistent with other applications. VARIANT_ALPHABOOL : Converts a VT_BOOL value to a string containing either "True" or "False". VARIANT_NOUSEROVERRIDE : For conversions to or from VT_BSTR, passes LOCALE_NOUSEROVERRIDE to the core coercion routines. VARIANT_LOCALBOOL : For conversions from VT_BOOL to VT_BSTR and back, uses the language specified by the locale in use on the local computer. |
Return value
Returns S_OK (0) or an HRESULT error code.
Description
Converts the variant from one type to another.
Reference
- Include file
DVARIANT.INC - Defined in AfxNova/DVARIANT.inc:2325
- Documented in COM/DVARIANT Class.md
- Topic: DVARIANT Class