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. Registry.

Registry.

Scheduled Pinned Locked Moved C / C++ / MFC
windows-adminhelptutoriallearning
8 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
    Vikram
    wrote on last edited by
    #1

    how to find if a particular registry entry is present or not. In one of my project , when the application starts it need to check if a particular registry is present,if present it would follow a different course. Pls help. Thanks.. vikram

    R R H 3 Replies Last reply
    0
    • V Vikram

      how to find if a particular registry entry is present or not. In one of my project , when the application starts it need to check if a particular registry is present,if present it would follow a different course. Pls help. Thanks.. vikram

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      Have a look at the CRegKey class in MSDN.


      Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

      V 1 Reply Last reply
      0
      • V Vikram

        how to find if a particular registry entry is present or not. In one of my project , when the application starts it need to check if a particular registry is present,if present it would follow a different course. Pls help. Thanks.. vikram

        R Offline
        R Offline
        Roger Stoltz
        wrote on last edited by
        #3

        Try to open the key with ::RegOpenKeyEx with the security access mask set to REG_QUERY_VALUE to avoid errors due to insufficient rights in case the user is not an administrator or priveliged user. If the call returns ERROR_SUCCESS the key is present and if you're interested in the value of the key you call ::RegQueryValueEx. Close the opened key with a call to ::RegCloseKey. -- Roger


        "It's supposed to be hard, otherwise anybody could do it!" - selfquote

        V 1 Reply Last reply
        0
        • R Roger Stoltz

          Try to open the key with ::RegOpenKeyEx with the security access mask set to REG_QUERY_VALUE to avoid errors due to insufficient rights in case the user is not an administrator or priveliged user. If the call returns ERROR_SUCCESS the key is present and if you're interested in the value of the key you call ::RegQueryValueEx. Close the opened key with a call to ::RegCloseKey. -- Roger


          "It's supposed to be hard, otherwise anybody could do it!" - selfquote

          V Offline
          V Offline
          Vikram
          wrote on last edited by
          #4

          Thanks Mate... :)

          1 Reply Last reply
          0
          • V Vikram

            how to find if a particular registry entry is present or not. In one of my project , when the application starts it need to check if a particular registry is present,if present it would follow a different course. Pls help. Thanks.. vikram

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            And see Registry Wrapper Class (cregistry) [^] if its helpfuls


            WhiteSky


            V 1 Reply Last reply
            0
            • H Hamid Taebi

              And see Registry Wrapper Class (cregistry) [^] if its helpfuls


              WhiteSky


              V Offline
              V Offline
              Vikram
              wrote on last edited by
              #6

              Cregistry class is helpful.. thanks .. :) ... but for the time being i have sticked to using CregKey. ~VIKRAM

              H 1 Reply Last reply
              0
              • R Rajesh R Subramanian

                Have a look at the CRegKey class in MSDN.


                Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

                V Offline
                V Offline
                Vikram
                wrote on last edited by
                #7

                thanks mate... CRegClass proved to be help ... i am using it in my code.. thanks.. ~VIKRAM

                1 Reply Last reply
                0
                • V Vikram

                  Cregistry class is helpful.. thanks .. :) ... but for the time being i have sticked to using CregKey. ~VIKRAM

                  H Offline
                  H Offline
                  Hamid Taebi
                  wrote on last edited by
                  #8

                  I hope you successful ;)


                  WhiteSky


                  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