473,396 Members | 1,917 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,396 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 2147
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.