Windows apps
Collapse the table of content
Expand the table of content

Data Type Conversion Functions [Automation]

The files Oleaut32.dll (for 32-bit systems) and Ole2disp.dll (for 16-bit systems) provide the following low-level functions for converting variant data types. Higher-level variant manipulation functions (such as VariantChangeType) use these functions, but they can also be called directly.

From type

Function

unsigned char

VarI1FromUI1

unsigned short

VarI1FromUI2

unsigned long

VarI1FromUI4

INT64

VarI1FromUI8

short

VarI1FromI2

long

VarI1FromI4

INT64

VarI1FromI8

float

VarI1FromR4

double

VarI1FromR8

CURRENCY

VarI1FromCy

DECIMAL

VarI1FromDec

DATE

VarI1FromDate

OLECHAR *

VarI1FromStr

IDispatch *

VarI1FromDisp

BOOL

VarI1FromBool

NoteNote

If these functions are passed NULL pointers, there will be an access violation and the program will crash. It is your responsibility to protect these functions against NULL pointers.

Show:
© 2017 Microsoft