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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Getting key hierarchy from HKEY...

Getting key hierarchy from HKEY...

Scheduled Pinned Locked Moved C / C++ / MFC
questionwindows-adminhelp
2 Posts 2 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.
  • D Offline
    D Offline
    dontknowitall
    wrote on last edited by
    #1

    Given a HKEY, can the root and subkey hierarchy be determined? I tried using RegQueryInfoKey() using the lpClass parameter in the hope that it would work but it doesn't. LPTSTR TempData[4096]; DWORD TempSize = 4096; RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows", 0, GENERIC_READ, &TempKey); RegQueryInfoKey(TempKey, TempData, &TempSize, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); None of the other registry access functions seem like what I need. I want to be able to take a HKEY as input and generate a string such as "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows" as output. BTW, what is the lpClass parameter good for? Every HKEY I've tried causes it to return zero bytes of data (TempSize == 0). The function always returns ERROR_SUCCESS.

    H 1 Reply Last reply
    0
    • D dontknowitall

      Given a HKEY, can the root and subkey hierarchy be determined? I tried using RegQueryInfoKey() using the lpClass parameter in the hope that it would work but it doesn't. LPTSTR TempData[4096]; DWORD TempSize = 4096; RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows", 0, GENERIC_READ, &TempKey); RegQueryInfoKey(TempKey, TempData, &TempSize, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); None of the other registry access functions seem like what I need. I want to be able to take a HKEY as input and generate a string such as "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows" as output. BTW, what is the lpClass parameter good for? Every HKEY I've tried causes it to return zero bytes of data (TempSize == 0). The function always returns ERROR_SUCCESS.

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

      See Registry List Control[^] about monitor windows registry maybe it will be helpful for you.


      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