VarBstrCmp function

Compares two variants of type BSTR.

Syntax


HRESULT VarBstrCmp(
  _In_ BSTR  bstrLeft,
  _In_ BSTR  bstrRight,
  _In_ LCID  lcid,
  _In_ ULONG dwFlags
);

Parameters

bstrLeft [in]

The first variant.

bstrRight [in]

The second variant.

lcid [in]

The locale identifier of the program to determine whether UNICODE or ANSI strings are being used.

dwFlags [in]

The following are compare results flags.

ValueMeaning
NORM_IGNORECASE
0x00000001

Ignore case.

NORM_IGNORENONSPACE
0x00000002

Ignore nonspace characters.

NORM_IGNORESYMBOLS
0x00000004

Ignore symbols.

NORM_IGNOREWIDTH
0x00000008

Ignore string width.

NORM_IGNOREKANATYPE
0x00000040

Ignore Kana type.

NORM_IGNOREKASHIDA
0x00040000

Ignore Arabic kashida characters.

 

Return value

This function can return one of these values.

Return code/valueDescription
VARCMP_LT
0

bstrLeft is less than bstrRight.

VARCMP_EQ
1

The parameters are equal.

VARCMP_GT
2

bstrLeft is greater than bstrRight.

 

Remarks

This function will not compare arrays or records.

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

 

 

Show: