Windows Dev Center

VarDiv function

Returns the result from dividing two variants.

Syntax


HRESULT VarDiv(
  _In_  LPVARIANT pvarLeft,
  _In_  LPVARIANT pvarRight,
  _Out_ LPVARIANT pvarResult
);

Parameters

pvarLeft [in]

The first variant.

pvarRight [in]

The second variant.

pvarResult [out]

The result variant.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The function operates as follows.

ConditionResult
Both expressions are strings, dates, characters, or boolean valuesDouble
One expression is a string and the other a characterDivision and a double is returned
One expression is numeric and the other a stringDivision and a double is returned
Both expressions are numericDivision and a double is returned
Either expression is nullNull
pvarRight is empty and pvarLeft is not emptyDISP_E_DIVBYZERO
pvarLeft is empty and pvarRight is not empty0 as type double
Both expressions are emptyDISP_E_OVERFLOW

 

Windows Phone 8.1: This API is supported.

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft