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

Article translations Article translations
Article ID: 223165 - View products that this article applies to.
This article was previously published under Q223165
Expand all | Collapse all

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

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.

RESOLUTION

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

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

Properties

Article ID: 223165 - Last Review: April 29, 2005 - Revision: 3.0
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++, 32-bit Learning Edition 6.0
Keywords: 
kbtshoot kbbug kbfix kbatl300fix kbautomation kbfaq kbvs600sp3fix KB223165

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com