How to identify the bitness of a dll

Discussion in 'Windows 64bit' started by santhosh.kulandaiyan, Jun 27, 2008.

  1. 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
    santhosh.kulandaiyan, Jun 27, 2008
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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
    Tony Sperling, Jun 27, 2008
    #2
    1. Advertising

  3. 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" <>
    | >References:
    <>
    | >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$>
    | >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" <> wrote in message
    | >news:...
    | >> 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
    | >
    | >
    | >
    Darrell Gorter[MSFT], Jun 27, 2008
    #3
  4. santhosh.kulandaiyan

    Doug Forster Guest

    > 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
    Doug Forster, Jul 2, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fred Valentino

    TOOLBAR.DLL & KERNAL32.DLL

    Fred Valentino, Nov 12, 2003, in forum: Computer Support
    Replies:
    2
    Views:
    548
    Boomer
    Nov 12, 2003
  2. Sparky
    Replies:
    3
    Views:
    24,612
    Sparky
    Jan 24, 2004
  3. Some1

    mprapi.dll --> samlib.dll --> ntdll.dll issue.

    Some1, Apr 2, 2004, in forum: Computer Support
    Replies:
    4
    Views:
    2,152
    Some1
    Apr 5, 2004
  4. Eli Aran

    identify dll file

    Eli Aran, Dec 2, 2004, in forum: Computer Support
    Replies:
    4
    Views:
    3,714
  5. Snoopy
    Replies:
    16
    Views:
    2,924
    Mainlander
    Aug 25, 2003
Loading...

Share This Page