473,941 Members | 17,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2171
why not just point ILDASM at the DLL. If it's not .NET, you will find out
quickly.

--- Nick

"Anushi" <an*******@disc ussions.com> wrote in message
news:OV******** ******@TK2MSFTN GP09.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*******@disc ussions.com> wrote in message
news:OV******** ******@TK2MSFTN GP09.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*******@disc ussions.microso ft.com> wrote in message
news:8E******** *************** ***********@mic rosoft.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*******@disc ussions.com> wrote in message
news:OV******** ******@TK2MSFTN GP09.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.b et 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*******@disc ussions.microso ft.com> wrote in message
news:8E******** *************** ***********@mic rosoft.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*******@disc ussions.com> wrote in message
news:OV******** ******@TK2MSFTN GP09.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
4889
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 I found this method, it gave a list of possible values for the EnvironmentVariable parameter. One of these, which is the one that I tried to use, was HTTP_UA_OS. However, this value did not seem to work, and when I displayed a list of possible...
3
2597
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 determine what type it is. Thanks for the help, Shahid
5
2253
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 ;-) Depending on a category which is stored in a headertable (Requests) a field and logic is determined how to get a proper Close_Date. This Close_date can be the closedate of the request. It is also possible that the close_date is a certain...
3
5317
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. the used OS te determine are: win 95, win 98, win ME, win XP, win NT Thanks for help,
18
2908
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 that applies to all these events, but I need to have specific code execute when the form closes. The properties for this method are sender (the originator) and e (event arguments). I know how to get typeof (sender) to determine what form or...
9
19549
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: How do I determine how many characters I can get on a line Question 3: How do I determine how many lines I can get on a page. Assume no margins Question 4: Does their exist some kind of refernce table that will equate a font with chars/line and...
2
4840
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 a way to determine the text's language?
6
3431
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 the current context in which the class is called. If it is called through ASP.NET, I want it to use the HttpRuntime, but if it is called through Windows Forms app, I want it to use a private static Hashtable. What is the best way for an object...
7
16968
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 write an helper method that will tell if the socket is connected or not , but it's not working good continue to tell me that the socket is connectedeven if the other party already call shutdown(both) + close , or , even if the other party close the...
6
14399
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, excluding holidays and weekends.' I didn't want to build a table of holidays that would have to be continuously updated, so I searched high and low for a function that would tell me whether a given date was a holiday, to no avail. I did find an...
0
9968
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11531
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11119
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11297
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10660
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6087
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4909
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.