Microsoft KB Archive/243298

= BUG: A "C2668: 'InlineIsEqualGUID'" error occurs when you try to build a default ATL project that contains a COM object in Visual C++ =

Article ID: 243298

Article Last Modified on 9/2/2005

-

APPLIES TO

 Microsoft ActiveX Template Library 3.0, when used with:  Microsoft Visual C++ 6.0 Enterprise Edition

 Microsoft Visual C++ 6.0 Professional Edition

 Microsoft Visual C++ 6.0 Standard Edition 

-

<div class="notice_section">

This article was previously published under Q243298

<div class="symptoms_section">

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.

<div class="cause_section">

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.

<div class="workaround_section">

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

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

<div class="moreinformation_section">

Steps to reproduce the behavior
The following steps are based on Visual C++ 6.0.
 * 1) Create an ATL DLL project and insert a simple object into the project with ISupportErrorInfo support.
 * 2) Make sure that the includes path for the Platform SDK include directory comes before the ATL include directory on the Directories tab of the Options dialog box, which is accessed from the Tools menu.
 * 3) Build the project, and the error message appears.

Additional query words: PlatSDK MMC Samples ATL Object Wizard

Keywords: kberrmsg kbtshoot kbbug kbfix kbdebug kbfunctions KB243298

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.