How to determine if a DLL is a COM DLL or .NET DLL

A

Anushi

Hi All,
Is there a way to determine if a Dll is a Com Dll or a .Net Dll ?
Any pointers are greatly appreciated.
Thanks,
Anushi
 
N

Nick Malik

why not just point ILDASM at the DLL. If it's not .NET, you will find out
quickly.

--- Nick
 
G

Guest

Hi

I too got around with this same problem, but i've the solution only if it is
a VB5 or VB6 COM Dll. In the above two, the Dll Binary file will have a text
called MSVBVM (Microsoft Visual Basic Virtual Machine). So what you could do
is, in the Search->Files, goto the containing text and type "MSVBVM", so it
would list all the VB -COM Dlls

Prem
 
R

Richard Grimes [MVP]

Anushi said:
Hi All,
Is there a way to determine if a Dll is a Com Dll or a .Net Dll ?
Any pointers are greatly appreciated.
Thanks,
Anushi

Look for the CLR header, this is documented in the ECMA spec.

DOS header starts at 0x0, the DWORD at 0x3c contains a pointer to the PE
signature (usually 0x80) which is 4 bytes, the next 20 bytes is the COFF
header and then there is the PE header (at 0x98). The PE header is 224 bytes
and contains the data directory (at 96 bytes into the PE header = 0xf8). The
15th entry (at 0x168) is the CLR header descriptor (sometimes called the COM
descriptor, but this does not have anything to do with COM). If this is
empty (ie 0 in the 8 bytes from 0x168 to 0x16f) then the file is not a .NET
assembly. If you want to check if it is a COM DLL then you should look to
see if it exports GetClassObject.

Note that these offsets will be different for 64-bit DLLs.

Richard
 
H

Ham

use "Dependency Walker" which comes with VC++ 6.0. This cool app lists all
available Dlls for your application
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

How to distrib my dll 2
How to create a DLL in C ? 0
dll 1
WebSite DLL? 1
Replacing a dll in /bin 4
DLL vs. no DLL 2
Help accessing COM .dll from Python 1
Redistributing MSVCR70.dll 1

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top