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

VarIdiv Function

Converts two variants of any type to integers then returns the result from dividing them.

HRESULT VarIdiv(  
  LPVARIANT  pvarLeft,         
  LPVARIANT  pvarRight,  
  LPVARIANT  pvarResult
);

pvarLeft

[in] Points to the first variant.

pvarRight

[in] Points to the second variant.

pvarResult

[out] Points to the result variant.

The function returns one of the following:

If

Then

Both expressions are of the string, date, character, boolean type

Division and interger is returned.

One expression is a string type and the other a character

Division.

One expression is numeric and the other is a string

Division.

Both expressions are numeric

Division.

Either expression is NULL

NULL is returned.

Both expressions are empty

DISP_E_DIVBYZERO

Show:
© 2016 Microsoft