>I need some tips on enumerating the names and syntax of properties,
>methods,
[quoted text clipped - 4 lines]
>
> 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.
On Mar 26, 10:36 pm, AA2e72E <AA2e...@discussions.microsoft.com>
wrote:
> 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.
Willy Denoyette [MVP] - 26 Mar 2008 19:35 GMT
> On Mar 26, 10:36 pm, AA2e72E <AA2e...@discussions.microsoft.com>
> wrote:
[quoted text clipped - 11 lines]
> Its called dependency walker.
> You can download it from http://www.dependencywalker.com.
Dependency walker has nothing to do with COM, and is not what the OP is
looking for.
Willy.
AA2e72E - 26 Mar 2008 19:47 GMT
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.
Willy Denoyette [MVP] - 26 Mar 2008 22:43 GMT
> Thanks for the hints but the suggestions ignore my request "... but
> without the IDE. "
[quoted text clipped - 18 lines]
> 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.