.\" -*- nroff -*- .\" Generated file - DO NOT EDIT! .TH VarCmp 3w "Oct 2012" "Wine API" "Wine API" .SH NAME \fBVarCmp\fR (OLEAUT32.176) .SH SYNOPSIS HRESULT VarCmp ( LPVARIANT \fIleft\fR, LPVARIANT \fIright\fR, LCID \fIlcid\fR, DWORD \fIflags\fR ) .SH DESCRIPTION .PP Compare two variants. .SH PARAMS \fIleft\fR \fB[In]\fR First variant. .PP \fIright\fR \fB[In]\fR Second variant. .PP \fIlcid\fR \fB[In]\fR \fBLCID\fR (locale identifier) for the comparison. .PP \fIflags\fR \fB[In]\fR Flags to be used in the comparison: \fBNORM_IGNORECASE\fR, \fBNORM_IGNORENONSPACE\fR, \fBNORM_IGNORESYMBOLS\fR, \fBNORM_IGNOREWIDTH\fR, \fBNORM_IGNOREKANATYPE\fR, \fBNORM_IGNOREKASHIDA\fR. .PP .SH RETURNS .PP VARCMP_LT: \fIleft\fR variant is less than \fIright\fR variant. VARCMP_EQ: input variants are equal. VARCMP_GT: \fIleft\fR variant is greater than \fIright\fR variant. VARCMP_NULL: either one of the input variants is \fBNULL\fR. .PP \fBFailure:\fR An \fBHRESULT\fR error code indicating the error. .SH NOTES .PP Native VarCmp up to and including WinXP doesn't like \fBI1\fR, \fBUI2\fR, \fBVT_UI4\fR, \fBUI8\fR and \fBUINT\fR as input variants. \fBINT\fR is accepted only as \fIleft\fR variant. .PP If both input variants are \fBERROR\fR then \fBVARCMP_EQ\fR will be returned, else an \fBERROR\fR variant will trigger an error. .PP Both input variants can have \fBVT_RESERVED\fR flag set which is ignored unless one and only one of the variants is a \fBBSTR\fR and the other one is not an \fBEMPTY\fR variant. All four \fBVT_RESERVED\fR combinations have a different meaning: .PP \fB-\fR \fBBSTR\fR and other: \fBBSTR\fR is always greater than the other variant. .PP \fB-\fR \fBBSTR\fR|VT_RESERVED and other: a string comparison is performed. .PP \fB-\fR \fBBSTR\fR and other|VT_RESERVED: If the \fBBSTR\fR is a number a numeric comparison will take place else the \fBBSTR\fR is always greater. .PP \fB-\fR \fBBSTR\fR|VT_RESERVED and other|VT_RESERVED: It seems that the other variant is ignored and the return value depends only on the sign of the \fBBSTR\fR if it is a number else the \fBBSTR\fR is always greater. A positive \fBBSTR\fR is greater, a negative one is smaller than the other variant. .SH SEE .PP VarBstrCmp for the \fIlcid\fR and \fIflags\fR usage. .SH IMPLEMENTATION .PP Declared in \fB"oleauto.h"\fR. .PP Implemented in \fB"dlls/oleaut32/variant.c"\fR. .PP Debug channel \fB"variant"\fR.