Announcement

Collapse
No announcement yet.

32 bit vs 64 bit operating system info

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    32 bit vs 64 bit operating system info

    I know somewhere here earlier today, I saw a post about detecting if running under 32 bit or 64 bit (operating system or "Parent Program" if my code is a Dll), unfortunately I was searching a different subject at the time and did not give it a close look.

    Now I am looking a bit closer, and searching the forums, and even more specifically source code, I can NOTTTTT seem to find it.

    does anyone know of the post, or API or even who may have posted it so I can take a closer look?

    I am looking at a bunch of my old code and cleaning it up a bit and this would be really nice to add to an INC that I plan to re-release.
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

    #2
    The general idea is to check the following environment variables:

    •PROCESSOR_ARCHITECTURE - reports the native processor architecture EXCEPT for WOW64, where it reports x86.
    •PROCESSOR_ARCHITEW6432 - not used EXCEPT for WOW64, where it reports the original native processor architecture.

    I got this from the web site below

    Comment


      #3
      Is this what you are looking for?
      IsWow64Process

      Determines whether the specified process is running under WOW64 or an Intel64 of x64 processor.

      <b>George W. Bleck</b>
      <img src='http://www.blecktech.com/myemail.gif'>

      Comment


        #4
        Odd, it seems my Kernel32.dll does not have the IsWow64Process in it.
        Good thing I went about getting that information by checking for the function rather than just declaring it.
        Engineer's Motto: If it aint broke take it apart and fix it

        "If at 1st you don't succeed... call it version 1.0"

        "Half of Programming is coding"....."The other 90% is DEBUGGING"

        "Document my code????" .... "WHYYY??? do you think they call it CODE? "

        Comment


          #5
          >Odd...

          I think not.

          See both "remarks" and Minimum Supported Client|Server on linked page.
          Michael Mattias
          Tal Systems (retired)
          Port Washington WI USA
          [email protected]
          http://www.talsystems.com

          Comment


            #6
            Basically what is says is that if it DOES NOT exist then "fer sure" you are on a 32bit OS.

            But, if the function DOES exist you must call the function to see if the specified process is running under 64bit Windows on Windows.
            <b>George W. Bleck</b>
            <img src='http://www.blecktech.com/myemail.gif'>

            Comment


              #7
              I haven't spent much time investigating the wonderul world of 64 bits. Can anyone tell me if there is a practical use for knowing this information (with regards to programming applications)?
              Bernard Ertl
              InterPlan Systems

              Comment


                #8
                Yes, several problems of address interoperability with the underlaying 64-bit OS as soon as you need to communicate with another code written in 64-bit.

                While Wow64 does a good job to hides this, there is an invisible wall between 32 and 64-bit application, i learned this the hard way myself, because i was unable to use my 32-bit DLL(s) with native 64-bit applications.

                So far i had no other choice, than asking my programmer customers to switch back to 32-bit in order to use my GDImage.dll...
                Patrice Terrier
                www.zapsolution.com
                www.objreader.com
                Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                Comment


                  #9
                  Just this week I had a customer "INSIST" that I recompile one of my Dll's to 64bit so that they could use it in their 64bit language.

                  Needless to say, they were none to happy to hear me say "I'm sorry, but I can not compile 64bit. But I will look into how my 32 bit Dll might be used with your 64bit language"

                  So I thought I would keep this in mind when gathering information for troubleshooting.
                  Engineer's Motto: If it aint broke take it apart and fix it

                  "If at 1st you don't succeed... call it version 1.0"

                  "Half of Programming is coding"....."The other 90% is DEBUGGING"

                  "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                  Comment

                  Working...
                  X
                  😀
                  🥰
                  🤢
                  😎
                  😡
                  👍
                  👎