Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

Object Browser

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AA2e72E - 26 Mar 2008 18:36 GMT
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.
Willy Denoyette [MVP] - 26 Mar 2008 19:02 GMT
>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.
vvnraman - 26 Mar 2008 19:09 GMT
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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.