How to call a hidden default method of an OLE automation collection in Visual C++ (152071)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 2.2
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 5.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 Q152071 SUMMARY A technical article found on the Microsoft Developer
Network CD-ROM titled "Implementing OLE Automation Collections," describes the
functionality necessary to create an OLE automation collection. This includes
creating a method called Item that returns the dispatch interface of the
indicated item in the collection.
All OLE automation collection
objects must implement the Item method to iterate through the objects of the
collection. The implementation of the method might have been created hidden in
the .ODL file for some applications. You cannot find these hidden methods by
calling IDispatch::GetIdsOfNames(). However, in many situations, this hidden
method is the default method of the collection, in which case you can invoke it
with an dispatch ID of DISPID_VALUE.
Visual Basic 3.0 depends on this
Item method being the default method of the collection object.
Modification Type: | Major | Last Reviewed: | 6/2/2005 |
---|
Keywords: | kbinfo kbAutomation kbcode kbhowto KB152071 kbAudDeveloper |
---|
|