[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

ahmet.goral

10/11/2007 7:15:00 PM

Hi

How do I get information on each COM DLL my .NET application is
loading? I need to print out the version info on every DLL for
debugging purposes during the start-up.

Thanks in advance
ag

2 Answers

(Mattias Sjögren)

10/20/2007 5:30:00 PM

0

>How do I get information on each COM DLL my .NET application is
>loading? I need to print out the version info on every DLL for
>debugging purposes during the start-up.

Something like this

using System.Diagnostics;
....
foreach (ProcessModule pm in Process.GetCurrentProcess().Modules)
{
Console.WriteLine(pm.FileVersionInfo);
}

Of course not all modules loaded will be COM servers so you may have
to do some additional filtering if those are the only libraries you
care about.


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.n... | http://www.dotneti...
Please reply only to the newsgroup.

ahmet.goral

10/22/2007 9:19:00 PM

0

On Oct 20, 1:29 pm, Mattias Sj?gren <mattias.dont.want.s...@mvps.org>
wrote:
> >How do I get information on each COM DLL my .NET application is
> >loading? I need to print out the version info on every DLL for
> >debugging purposes during the start-up.
>
> Something like this
>
> using System.Diagnostics;
> ...
> foreach (ProcessModule pm in Process.GetCurrentProcess().Modules)
> {
> Console.WriteLine(pm.FileVersionInfo);
>
> }
>
> Of course not all modules loaded will be COM servers so you may have
> to do some additional filtering if those are the only libraries you
> care about.
>
> Mattias
>
> --
> Mattias Sj?gren [C# MVP] mattias @ mvps.orghttp://www.msjogren.n...|http://www.dotneti...
> Please reply only to the newsgroup.

Hi Mattias,

I was doing the same thing but only the interop DLLs were showing in
the list and not the actual COM servers. Then after your reply I
realized they were being loaded a little later and not at the location
I was checking. Now it works.

Thank you
ag