Object Browser

  • Thread starter Thread starter AA2e72E
  • Start date Start date
A

AA2e72E

I need some tips on enumerating the names and syntax of properties, methods,
events, and public variables, enums, user-defined types in a COM,
programatically in C# ... a little like Object Browser in VS2006 but without
the IDE.

Thanks for your help.
 
AA2e72E said:
I need some tips on enumerating the names and syntax of properties,
methods,
events, and public variables, enums, user-defined types in a COM,
programatically in C# ... a little like Object Browser in VS2006 but
without
the IDE.

Thanks for your help.


Why would you ever need to do this using C#, there is the "oleview.exe"
tool that does exactly this.
..NET (and C#) is not the right tools to help you to build such kind of COM
related tools, this is why we still have native code like C++ in our
toolbox.

Willy.
 
I need some tips on enumerating the names and syntax of properties, methods,
events, and public variables, enums, user-defined types in a COM,
programatically in C# ... a little like Object Browser in VS2006 but without
the IDE.

Thanks for your help.

Hi
There is already a software for doing this but is a COM software.
Its called dependency walker.
You can download it from http://www.dependencywalker.com.
 
Thanks for the hints but the suggestions ignore my request "... but
without the IDE. "

I can retrieve the information I am after as text, which I dump into Word &
create an index for about 25 or so VB6.0 DLLs. The text is like this:

(for a property)

Property|FileName
Ref|Value@string = obj.Filename
Set obj.FileName = Value@String

(for a method)

Method|Validate
Value@Boolean = Validate(FileName as String)

etc

My code does not pick up the public (global) variables or public enums:
hence the original post.
 
AA2e72E said:
Thanks for the hints but the suggestions ignore my request "... but
without the IDE. "

I can retrieve the information I am after as text, which I dump into Word
&
create an index for about 25 or so VB6.0 DLLs. The text is like this:

(for a property)

Property|FileName
Ref|Value@string = obj.Filename
Set obj.FileName = Value@String

(for a method)

Method|Validate
Value@Boolean = Validate(FileName as String)

etc

My code does not pick up the public (global) variables or public enums:
hence the original post.



Please, be a bit more explicit when posting such questions, you never said
you had some working code.
That said, I suppose you are using LoadTypeLib to load a typelib and use the
System.Runtime.InteropServices.ComTypes namespace classes to inspect the
typelib info, right?
When you look at the typelib using oleview, you will see that the global
data declaration (like SomeVal as Integer) are simply exported as property
setter/getter members of the interface, so when you get the typeinfo from
the interface you should be able to get at the properties (your global
variables).
The same is valid for the enum types. If this is not the case, first inspect
the your typelib using oleview, and post your failing code to get some more
help from the crowd.

Willy.


Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top