EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

PropVariantCompareEx function

Extends PropVariantCompare by allowing the caller to compare two PROPVARIANT structures based on specified comparison units and flags.

Syntax


INT PropVariantCompareEx(
  _In_  REFPROPVARIANT propvar1,
  _In_  REFPROPVARIANT propvar2,
  _In_  PROPVAR_COMPARE_UNIT unit,
  _In_  PROPVAR_COMPARE_FLAGS flags
);

Parameters

propvar1 [in]

Type: REFPROPVARIANT

Reference to the first PROPVARIANT structure.

propvar2 [in]

Type: REFPROPVARIANT

Reference to the second PROPVARIANT structure.

unit [in]

Type: PROPVAR_COMPARE_UNIT

Specifies, where appropriate, one of the comparison units defined in PROPVAR_COMPARE_UNIT.

flags [in]

Type: PROPVAR_COMPARE_FLAGS

Specifies one of the following:

PVCF_DEFAULT (0x00000000)

When comparing strings, use StrCmpLogical.

PVCF_TREATEMPTYASGREATERTHAN (0x00000001)

Regard empty or null values as greater than non-empty values. This value can be OR-ed with any other value.

PVCF_USESTRCMP (0x00000002)

When comparing strings, use StrCmp.

PVCF_USESTRCMPC (0x00000004)

When comparing strings, use StrCmpC.

PVCF_USESTRCMPI (0x00000008)

When comparing strings, use StrCmpI.

PVCF_USESTRCMPIC (0x00000010)

When comparing strings, use StrCmpIC.

Return value

Type: INT

  • Returns 1 if propvar1 is greater than propvar2
  • Returns 0 if propvar1 equals propvar2
  • Returns -1 if propvar1 is less than propvar2

Remarks

This function does not compare all types; only selected types are currently comparable.

By default, VT_NULL / VT_EMPTY / 0-element vectors are considered to be less than any other vartype.

If the vartypes are different, this function attempts to convert propvar2 to the vartype of propvar1 before comparing them.

Note  Behavior of this function, and therefore the results it returns, can change from release to release. It should not be used for canonical sorting applications.

Windows Phone 8.1: This API is supported.

Requirements

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2003 with SP1 [desktop apps | Windows Store apps]

Redistributable

Windows Desktop Search (WDS) 3.0

Header

Propvarutil.h

Library

Propsys.lib

DLL

Propsys.dll (version 6.0 or later)

 

 

Ajouts de la communauté

AJOUTER
Afficher:
© 2014 Microsoft