Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Detecting 16/32 bit DLLs

Detecting 16/32 bit DLLs

Scheduled Pinned Locked Moved C / C++ / MFC
csharpphpquestion
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Victor Boctor
    wrote on last edited by
    #1

    Hi CPians, Is there an easy way to detect if a DLL is 16 or 32 bit? Also what about EXEs? Regards, Victor phpWebNotes is a page annotation system modelled after php.net. http://webnotes.sourceforge.net/demo.php[^]

    M D 2 Replies Last reply
    0
    • V Victor Boctor

      Hi CPians, Is there an easy way to detect if a DLL is 16 or 32 bit? Also what about EXEs? Regards, Victor phpWebNotes is a page annotation system modelled after php.net. http://webnotes.sourceforge.net/demo.php[^]

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Probably by looking at the header. 16-bit binaries have a NE header, 32-bit have a PE header. --Mike-- Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23 :( 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm

      V 1 Reply Last reply
      0
      • M Michael Dunn

        Probably by looking at the header. 16-bit binaries have a NE header, 32-bit have a PE header. --Mike-- Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23 :( 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm

        V Offline
        V Offline
        Victor Boctor
        wrote on last edited by
        #3

        Thanks for the hint :) I had a look at a 16-bit/32-bit EXEs/DLLs and noticed the NE / PE. However, all files start with MZ which most probably reflects a DOS EXE header that acts as the stub. Do you know how to retrieve the information of the NE/PE. I assume the offset in the file might be different due to different stub sizes. :~ Regards, Victor. phpWebNotes is a page annotation system modelled after php.net. http://webnotes.sourceforge.net/demo.php[^]

        R 1 Reply Last reply
        0
        • V Victor Boctor

          Thanks for the hint :) I had a look at a 16-bit/32-bit EXEs/DLLs and noticed the NE / PE. However, all files start with MZ which most probably reflects a DOS EXE header that acts as the stub. Do you know how to retrieve the information of the NE/PE. I assume the offset in the file might be different due to different stub sizes. :~ Regards, Victor. phpWebNotes is a page annotation system modelled after php.net. http://webnotes.sourceforge.net/demo.php[^]

          R Offline
          R Offline
          Roman Fadeyev
          wrote on last edited by
          #4

          Matt Pietrek, "Windows 95 System Programming Secrets", Chapter 8. May be, it will help you.

          1 Reply Last reply
          0
          • V Victor Boctor

            Hi CPians, Is there an easy way to detect if a DLL is 16 or 32 bit? Also what about EXEs? Regards, Victor phpWebNotes is a page annotation system modelled after php.net. http://webnotes.sourceforge.net/demo.php[^]

            D Offline
            D Offline
            Dudi Avramov
            wrote on last edited by
            #5

            Use SHGetFileInfo. If uFlags contains the SHGFI_EXETYPE flag, the return value specifies the type of the executable file. Read in MSDN about SHGetFileInfo.

            V 1 Reply Last reply
            0
            • D Dudi Avramov

              Use SHGetFileInfo. If uFlags contains the SHGFI_EXETYPE flag, the return value specifies the type of the executable file. Read in MSDN about SHGetFileInfo.

              V Offline
              V Offline
              Victor Boctor
              wrote on last edited by
              #6

              Thanks a lot Dudi, I finally got a chance to test it and it worked like a charm.. :-D Regards, Victor phpWebNotes is a page annotation system modelled after php.net. http://webnotes.sourceforge.net/demo.php[^]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups