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. Why my 64 architecture exe is not able to read registry?

Why my 64 architecture exe is not able to read registry?

Scheduled Pinned Locked Moved C / C++ / MFC
windows-adminarchitecturequestion
5 Posts 3 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.
  • R Offline
    R Offline
    rahul kulshreshtha
    wrote on last edited by
    #1

    I am having a project which is for 32 bit platform. I am adding 64 bit support also. 32 bit compilation is able to open & read registry while 64 bit compilation is not able to open registry. I was opening HKEY_CLASSES_ROOT. I guess it might be related to permissions but I could not figure it out. Even worse 64 bit compilation is not able to load swf while 32 compilation does it successfully. Any guess why?

    M R 2 Replies Last reply
    0
    • R rahul kulshreshtha

      I am having a project which is for 32 bit platform. I am adding 64 bit support also. 32 bit compilation is able to open & read registry while 64 bit compilation is not able to open registry. I was opening HKEY_CLASSES_ROOT. I guess it might be related to permissions but I could not figure it out. Even worse 64 bit compilation is not able to load swf while 32 compilation does it successfully. Any guess why?

      M Offline
      M Offline
      MicroVirus
      wrote on last edited by
      #2

      Is the program still running under 32 bits? It is possible then that the registry access worked, but was done on the HKEY_LOCAL_MACHINE\Software\WOW6432Node\Classes key (see MSDN[^]. For further information, check the return values from the registry function.

      R 1 Reply Last reply
      0
      • M MicroVirus

        Is the program still running under 32 bits? It is possible then that the registry access worked, but was done on the HKEY_LOCAL_MACHINE\Software\WOW6432Node\Classes key (see MSDN[^]. For further information, check the return values from the registry function.

        R Offline
        R Offline
        rahul kulshreshtha
        wrote on last edited by
        #3

        32 bit compilation works in both 32 bit & 64 bit. But I need a separate 64 bit edition so I am trying to do that. 64 bit runs but not able to open registry and swf. 64 bit compilation does not run on 32 bit

        M 1 Reply Last reply
        0
        • R rahul kulshreshtha

          32 bit compilation works in both 32 bit & 64 bit. But I need a separate 64 bit edition so I am trying to do that. 64 bit runs but not able to open registry and swf. 64 bit compilation does not run on 32 bit

          M Offline
          M Offline
          MicroVirus
          wrote on last edited by
          #4

          Could you debug through the 64 bit compilation and specifically post the return values from the registry functions, like RegCreateKeyEx (or RegOpenKeyEx) and also what the RegQueryValueEx function returns, and any other you are using in the particular piece of code that does not work. It'd also help if you post your code. Without more information, we're flying blind here

          1 Reply Last reply
          0
          • R rahul kulshreshtha

            I am having a project which is for 32 bit platform. I am adding 64 bit support also. 32 bit compilation is able to open & read registry while 64 bit compilation is not able to open registry. I was opening HKEY_CLASSES_ROOT. I guess it might be related to permissions but I could not figure it out. Even worse 64 bit compilation is not able to load swf while 32 compilation does it successfully. Any guess why?

            R Offline
            R Offline
            Rolf Kristensen
            wrote on last edited by
            #5

            Most likely the 32 bit EXE was given a local registry to play with, this is part of UAC legacy application handling. The 64 bit EXE is not seen as a legacy application, and gets a proper slap on the fingers. Usually it is during installation that one chooses what files should be opened with the application. Not something the application changes after installation.

            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