0

I need a list of the methods and properties exposed by a COM object. I am able to late bind the object and use some basic methods that I found in an example code snippet but I need to find out the full list of methods and properties on the object.

More info:

I am trying to pull data from a fairly old system and am unable to early bind any of the dlls.

I do have some snippets of example code from the company that creates these dlls (it was packaged with the software), however it does not have code for all of the advanced functionality I am seeing from their example application (which I do not have source code to).

I have already tried using reflection without much success.

2 Answers 2

4

Assuming that you don't need to programatically access the information, the easiest way is to the OLE-COM object viewer. The tool is part of the Windows SDK.

Once running, look in the Type Library node and locate the type library of the component that you are using. The Type Library viewer will show you all of the dispatch interfaces defined by the component.

Sign up to request clarification or add additional context in comments.

2 Comments

I already have a machine with Vb6/Visual studio 2005-2010 on it. Also some of the dll's are 16 bit so they wont work on windows 7.
I linked to the Windows 7 SDK because it is the easiest to locate, the OLE COM Viewer application will work on earlier versions of Windows (and is included in earlier versions of the Platform SDK)
1

If you can't add the DLL to VB6 in the References dialogue, then there is no Type Library resource embedded in the DLL. If you can load the DLL, you should be able to use F2 to bring up Object Browser, and see all of the properties and methods of the component.

It seems unlikely that you hadn't tried this. So there are three possibilities:

  1. There is an external type library for the component.
  2. You got an error when adding the DLL as a reference, which essentially said the VB IDE couldn't find a type library in the component.
  3. You got an error when adding the DLL as a reference, saying something like "Could not load DLL".

Just in case of 1. - check if there is a TLB or OLB file for this component. If you got the error in 2. - then you are out of luck. You will require access to documentation and/source code. If you got the error in 3. - then there is probably a dependent library which has not been registered. Try to find the dependent TLB or DLL, and register it.

3 Comments

I feel like I am unfortunately out of luck on this one. I have been able to make an educated guess on a few of the method names when I have late bound the object. this however is not enough to complete the task at hand.
You could try picking out all the strings from the executable. However you still would have to work out the method arguments. Is this component sold as a 3rd party component?
It stopped being 'sold' 15 years ago. We are going through an upgrade process to a new system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.