Determining if a DLL is a COM, COM Plus, .Net Assembly or Win32 using vb.net code

There are so many flavors of dlls out there these days that it becomes confusing. There was a time when there was only a Win32 dll…..then came along COM dlls…COM Plus Dlls…. assemblies….strong named assemblies…. etc etcThis is a VB.net class that I wrote which tells you what is the type of a particular DLL file. You just pass the DLL filepath in the constructor and it exposes dll properties to you.

input.jpg DLLParser.vb class (<– Click to view contents)

input.jpg compluswrap.txt (<– Click to view contents)

input.jpg mtxadmin.tlb (Right click–> save as–>Mtxadmin.Tlb)

eg. usage :-

Dim oParse As New DLLParser(FullDllPath)


MsgBox(“IsComPlus :” & oParse.IsComPlus & ” ComPlusPackageName :” & oParse.ComPlusPackageName)

MsgBox(“IsStrongNamed :” & oParse.IsStrongNamed)

MsgBox(“IsCom :” & oParse.IsCom)

MsgBox(“IsAssembly :” & oParse.IsAssembly

Advertisements

2 thoughts on “Determining if a DLL is a COM, COM Plus, .Net Assembly or Win32 using vb.net code

  1. This is exactly what i need to do in my project, but i cant get the code to build. Do you know where the “ComplusWrap” object comes from?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s