Solved

OLE Automation Object hierarchy

Posted on 1997-10-31
4
180 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
  • 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 100 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
Different colored text in ComboBox without Subclassing 8 65
Add content to output file 4 67
Shell script to login to remote m/c and execute commands 10 78
noX challenge 17 129
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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