BUG: A "C2668: 'InlineIsEqualGUID'" error occurs when you try to build a default ATL project that contains a COM object in Visual C++ (243298)
The information in this article applies to:
- The Microsoft Active Template Library (ATL) 3.0, when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q243298 SYMPTOMS Building a default ATL project containing a COM object
supporting ISupportErrorInfo might result in the following
error: C2668: 'InlineIsEqualGUID' : ambiguous
call to overloaded function This error may also occur when calling
the function InlineIsEqualGUID() in your ATL project. CAUSE The problem occurs because the function InlineIsEqualGUID() is defined both in the ATL header file, AtlBase.h, and the
Platform SDK header file, Guiddef.h, in different name spaces. The include
paths for the build point first to the Platform SDK include directory, and then
to the ATL include directory. In the ATL header, InlineIsEqualGUID() is defined in a name space called "ATL", while in the Platform
SDK header it is defined in the global name space. Because AtlBase.h includes the statement
using namespace ATL;
the compiler is unable to distinguish which definition to use.
WORKAROUND To work around this problem, prefix the call to the InlineIsEqualGUID() function with ::ATL::. This explicitly
qualifies the ATL namespace from where the implementation of InlineIsEqualGUID is pulled in. For example:
::ATL::InlineIsEqualGUID()
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 9/2/2005 |
---|
Keywords: | kbfunctions kbtshoot kberrmsg kbBug kbDebug kbfix KB243298 kbAudDeveloper |
---|
|