Getting loaded DLL info (version, date, etc.)

Nerseus

Danner
Joined
Oct 22, 2002
Messages
2,547
Location
Arizona, USA
I'm finishing up an About box and I'd like to fill a listbox or textbox with info about the currently loaded DLLs - their version numbers, dates, etc. I'm also loading DLLs dynamically so the main MDI form (which will host the About box) will need to scan ALL of the loaded DLLs including the ones loaded dynamically and the .NET framework DLLs.

I'm about 99% sure it can be done, as I can see the info being spit out into the Debug window in the IDE (at lease the file location of the DLL).

Any ideas?

Thanks,
Ner
 
Found this after a few minutes of messing around:
Visual Basic:
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim pm As System.Diagnostics.ProcessModuleCollection = Process.GetCurrentProcess.Modules
        Dim p As System.Diagnostics.ProcessModule

        For Each p In pm
            ListBox1.Items.Add(p.FileName & " (version " & p.FileVersionInfo.ProductVersion & ")")
        Next
    End Sub
 
Back
Top