Microsoft KB Archive/223165

= You receive a DISP_E_UNKNOWNNAME error when calling IDispatch::GetIDsOfNames for an ATL server and named arguments =

Article ID: 223165

Article Last Modified on 4/29/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 Q223165

<div class="symptoms_section">

SYMPTOMS
When calling IDispatch::GetIDsOfNames for an ATL server and named arguments are passed in, you receive the following error:

0x80020006 (DISP_E_UNKNOWNNAME)

If the client is Visual Basic and you call a method in an ATL server passing named arguments then you receive this error message:

Run-time error '448':

Named argument not found

<div class="cause_section">

CAUSE
In the function CComTypeInfoHolder::GetIDsOfNames (called by IDispatch::GetIDsOfNames), ATL looks up the DISPID through a cached array. If the call to GetIDsOfNames includes named arguments then these entries are not in the array. In that case, CComTypeInfoHolder::GetIDsOfNames delegates to ITypeInfo::GetIDsOfNames. It calls ITypeInfo::GetIDsOfNames once for each named argument in the method. To get the IDs of named arguments then ITypeInfo::GetIDsOfNames needs to be called with the method name in addition to the named arguments.

<div class="resolution_section">

RESOLUTION
This bug was corrected in Visual Studio 6.0 Service Pack 3.

<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.This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, click the following article number to view the article in the Microsoft Knowledge Base:

194022 Visual Studio 6.0 service packs, what, where, why

194295 How to tell that Visual Studio 6.0 service packs are installed

Keywords: kbtshoot kbbug kbfix kbatl300fix kbautomation kbfaq kbvs600sp3fix KB223165

-

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

© Microsoft Corporation. All rights reserved.