?
Solved

OLE Automation Object hierarchy

Posted on 1997-10-31
4
Medium Priority
?
184 Views
Last Modified: 2013-11-20
I am having difficulties in implementing a hierarchy or objects.  My class implements three tiers of objects.  The root item is called Collections.  Under that I have several collections.  Funds and Regions being two of them.  I've implemented an enumerator and this works fine.  My problem is that when using my class in VB (as a referenced object), the auto method list box which shows up when editing code only displays my root objects methods and properties.  Even when I select the Fund method of the root object.

This is in contrast to other objects such as Excel which will navigate the chain right through from Application.Workbook.Sheets etc.  I've obviously missed some property that other objects use.
0
Comment
Question by:dhodge
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1309110
I think VB is using the type libraries for that information. In addition make sure the objects you have declared in VB are of the right type and not OBJECT. A generic object in VB will not have any type information associated with them.
0
 
LVL 2

Author Comment

by:dhodge
ID: 1309111
Thanks but, I've created the type library and pointed VB to it, and the objects are defined correctly.  Can you think of anything else?
0
 
LVL 1

Accepted Solution

by:
dkremer earned 400 total points
ID: 1309112
Hi.
I'm not sure I understand your structure - Funds is a member of Collections or is it a member of an item in Collections ? but it doesn't matter. In your source code the Funds function should return LPDISPATCH (which VB translates as an Object), but in the ODL or IDL file the Funds method definition should return IFunds* or whatever you call the Funds interface, otherwise VB expects an oject and won't show it's list of member methos and properties.
Hope this helps.
 
   - Dror Kremer
0
 
LVL 2

Author Comment

by:dhodge
ID: 1309113
Thanks for that, I've tried it and it works fine.  You've saved me a great deal of time.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question