The information in this article applies to:
SYMPTOMSIf you use the "greater than" (>) or "less than" (<) comparison operators for CComVariant, you receive the following linker error:
CAUSEYou use VarCmp() to compare two VARIANTS. This function is supposed to take four arguments. The declaration for VarCmp() in Oleauto.h is incorrect, and it takes only three arguments. ATL also calls VarCmp() incorrectly with three arguments in CComVariant::operator < and CComVariant::operator >. RESOLUTIONIn OLEAUTO.H, change the declaration for VarCmp() from:
to the following:
In Atlbase.h, change the calls to VarCmp() by passing in a fourth argument
of zero. Change the code from:
to the following:
You must do a "Rebuild All" to bring in the new changes.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base: MORE INFORMATIONVarCmp() is implemented only in a newer version of Oleaut32.dll (2.30.4261 or later). If you use the CComVariant > or < operators, you must distribute Oleaut32.dll via Vbrun60.exe. For more information, refer to Redist.wri in the VC98\Redist directory on the Visual C++ CD. Additional query words:
Keywords : kbservicepack kbnokeyword kbCOMt kbVC600bug kbATL300bug kbVS600sp2 kbVS600SP1 kbVS600sp3fix kbGrpMFCATL |
Last Reviewed: November 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |