473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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
Jul 21 '05 #1
5 2146
why not just point ILDASM at the DLL. If it's not .NET, you will find out
quickly.

--- Nick

"Anushi" <an*******@discussions.com> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl...
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

Jul 21 '05 #2
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

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

--- Nick

"Anushi" <an*******@discussions.com> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl...
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


Jul 21 '05 #3
I think he is asking programatically ....isn't right Anushi?
"Prem Kumar" <Pr*******@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com...
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

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

--- Nick

"Anushi" <an*******@discussions.com> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl...
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


Jul 21 '05 #4
Anushi wrote:
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
--
..NET training, consultancy and mentoring
my email ev******@zicf.bet is encrypted with ROT13 (www.rot13.org)
sign up for my free .NET newsletter at
http://www.wd-mag.com/newsletters/
Jul 21 '05 #5
Ham
use "Dependency Walker" which comes with VC++ 6.0. This cool app lists all
available Dlls for your application

"Prem Kumar" <Pr*******@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com...
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

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

--- Nick

"Anushi" <an*******@discussions.com> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl...
> 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
>
>


Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Nathan Sokalski | last post by:
I want to determine the operating system using ASP (or VBScript inside of ASP). I tried to get it using the Request. ServerVariables(EnvironmentVariable) method. On the web page about ASP in which...
3
by: Shahid Juma | last post by:
Hello All, This may be a trivial question, but I was wondering how can you determine if a value contains an Integer or Float. I know there is a function called IsNumeric, however you can't...
5
by: Hennie de Nooijer | last post by:
Hi, This is a diffcult issue to explain. I hope to make my problem clear to you. SITUATION I'm building A SLA Query for a customer. This customer has an awkward way to determine the SLA results...
3
by: lucpustjens | last post by:
Hello, I want te determine the client operating system, because I need to kno the default cookie directory. If there is a way to determine the cooki directory directly, than it is also good. ...
18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
9
by: Adam | last post by:
Can someone please help!! I am trying to figure out what a font is? Assume I am working with a fixed font say Courier 10 point font Question 1: What does this mean 10 point font Question 2:...
2
by: Ryu | last post by:
Is there a way to determine if a text is ASCII or Unicode in C#. I have looked at Encoding classes but I have found that They dont allow me to pass a text to the encoding obj. In addition is there...
6
by: Arsen V. | last post by:
Hello, I have a localization class that I want to use from either Web or Windows Forms apps. Currently it stores some information in the HttpRuntime.Cache object. I want to be able to determine...
7
by: semedao | last post by:
Hi all, I view many posts about this issue , the connected property does not tell us the current status of the socket. based on couple of suggestions of msdn , and some article here , I try to...
6
by: Jana | last post by:
Greetings Access Gurus! I am working on an app to send batch transactions to our bank, and the bank requires that we place an effective date on our files that is 'one business day in the future,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.