Guest santhosh.kulandaiyan Posted June 27, 2008 Posted June 27, 2008 Hi, How to identify the bitness of a dll/exe programatically? Is there any Windows/.NET API that supports this programatically? That is , i just want to create a program which will take a dll/exe as input and identify whether it is a 32 bit or a 64 bit dll/exe.. Appreciate your comments. Thanks Santhosh
Guest Tony Sperling Posted June 27, 2008 Posted June 27, 2008 Re: How to identify the bitness of a dll Well, there was of course the good old DOS program. . .EXEHDR (wasn't it?) google for it, I'm sure it is still usefull and *.DLL's are really just renamed *.EXE files. Or I would try and read the Header in a Hex-Editor - if you can deciffre the header information it shouldn't be very difficult to run it through a special purpose parser? Tony. . . "santhosh.kulandaiyan" <santhosh.kulandaiyan@gmail.com> wrote in message news:1965eab9-508c-405c-a996-e89ec07fd931@w1g2000prd.googlegroups.com... > Hi, > How to identify the bitness of a dll/exe programatically? Is there any > Windows/.NET API that supports this programatically? > > That is , i just want to create a program which will take a dll/exe as > input and identify whether it is a 32 bit or a 64 bit dll/exe.. > > Appreciate your comments. > > Thanks > Santhosh
Guest Darrell Gorter[MSFT] Posted June 27, 2008 Posted June 27, 2008 Re: How to identify the bitness of a dll Hello, Take a look at filever.exe from the support.cab from the 64-bit Windows XP or 64-bit Windows Server 2003. see if this meets your needs 913111 How to use the Filever.exe tool to obtain specific information about a file in Windows http://support.microsoft.com/default.aspx?scid=kb;EN-US;913111 among other things it reports: Header The second section of the output contains the file header information. However, because the 32-bit version of the Filever.exe tool does not recognize x64-based files, the header information may appear differently when you run the 32-bit version of the Filever.exe tool against a 64-bit file. The following header information may appear in the second section of the output: • W32i64 This header represents a file from an Itanium-based system. This file type appears the same way in the output of the 32-bit and 64-bit versions of the Filever.exe tool. • Wx64 This header represents an x64-based file type. The 64-bit version of the Filever.exe tool generates this header for an x64-based file. • W32 This header represents an x64-based file type. The 32-bit version of the Filever.exe tool generates this header for an x64-based file. Note This header differs from the 32-bit file header because the header does not include the letter "i." • W32i This header represents an x86-based (32-bit) file. This file type appears the same way in the output of the 32-bit and 64-bit versions of the Filever.exe tool. • W16 This header represents a 16-bit file. This file type appears the same way in the output of the 32-bit and 64-bit versions of the Filever.exe tool. • DOS This header represents an MS-DOS file. Thanks, Darrell Gorter[MSFT] This posting is provided "AS IS" with no warranties, and confers no rights -------------------- | >From: "Tony Sperling" <tony.sperling@dbREMOVEmail.dk> | >References: <1965eab9-508c-405c-a996-e89ec07fd931@w1g2000prd.googlegroups.com> | >Subject: Re: How to identify the bitness of a dll | >Date: Fri, 27 Jun 2008 11:26:04 +0200 | >Lines: 25 | >X-Priority: 3 | >X-MSMail-Priority: Normal | >X-Newsreader: Microsoft Outlook Express 6.00.2800.1914 | >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 | >X-Antivirus: avast! (VPS 080626-1, 26-06-2008), Outbound message | >X-Antivirus-Status: Clean | >Message-ID: <eaLd$eD2IHA.5140@TK2MSFTNGP02.phx.gbl> | >Newsgroups: microsoft.public.windows.64bit.general | >NNTP-Posting-Host: 1385155113.dhcp.dbnet.dk 82.143.202.41 | >Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP02.phx.gbl | >Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.windows.64bit.general:18558 | >X-Tomcat-NG: microsoft.public.windows.64bit.general | > | >Well, there was of course the good old DOS program. . .EXEHDR (wasn't it?) | >google for it, I'm sure it is still usefull and *.DLL's are really just | >renamed *.EXE files. Or I would try and read the Header in a Hex-Editor - if | >you can deciffre the header information it shouldn't be very difficult to | >run it through a special purpose parser? | > | > | >Tony. . . | > | > | >"santhosh.kulandaiyan" <santhosh.kulandaiyan@gmail.com> wrote in message | >news:1965eab9-508c-405c-a996-e89ec07fd931@w1g2000prd.googlegroups.com... | >> Hi, | >> How to identify the bitness of a dll/exe programatically? Is there any | >> Windows/.NET API that supports this programatically? | >> | >> That is , i just want to create a program which will take a dll/exe as | >> input and identify whether it is a 32 bit or a 64 bit dll/exe.. | >> | >> Appreciate your comments. | >> | >> Thanks | >> Santhosh | > | > | >
Guest Doug Forster Posted July 2, 2008 Posted July 2, 2008 Re: How to identify the bitness of a dll > Hello, > Take a look at filever.exe from the support.cab from the 64-bit Windows XP > or 64-bit Windows Server 2003. > see if this meets your needs Interesting but kindof useless as I see it misleadingly reports multiplatform managed exe's as W32i. Its about time MS included some native tool or file property in its 64 bit OS's as this subject is highly confusing for admins (and managed apps are supposed to be the way of the future) Cheers Doug Forster
Recommended Posts