1

I have a perl function that takes an open registry key object. Now, I want to get the name of the key this object represents. How do I get the key Name?

I am using Win32::Registry module.

Canopus
  • 7,351
  • 11
  • 46
  • 57

1 Answers1

1

Browsing through the source, it doesn't look like Win32::Registry will let you take the handle and get back to the Key. I see three ways around this:

  1. Maintain a list of returned objects from Open and the path to them yourself.
  2. Hack the module (subclass it, change the source) to do #1 for you.
  3. Or extend the Win32::Registry API to do what's shown in this stackoverflow answer: Determine path to registry key from HKEY handle in C++
Community
  • 1
  • 1
Clinton Pierce
  • 12,859
  • 15
  • 62
  • 90