473,499 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Given HKEY, determine full name/path of the key?

If I am just given an open HKEY, is there a function I can use to retrieve
the name of the key?

Thanks

--
Adam Clauss

Dec 16 '05 #1
3 1330
Adam Clauss wrote:
If I am just given an open HKEY, is there a function I can use to retrieve
the name of the key?

Thanks


Process Explorer from sysinternals.com can do that, but I don't know
how. I'm looking for similar functionality for an application that I am
developing.

-n
Dec 17 '05 #2
Adam Clauss wrote:
If I am just given an open HKEY, is there a function I can use to
retrieve the name of the key?


No, there isn't. Regmon from sysinternals does this by intercepting all
RegOpen/RegCreate calls and building it's own map of handle -> path.

-cd
Dec 17 '05 #3
"Carl Daniel [VC++ MVP]" <cp*****************************@mvps.org.nospam >
wrote
Adam Clauss wrote:
If I am just given an open HKEY, is there a function I can use to
retrieve the name of the key?


No, there isn't. Regmon from sysinternals does this by intercepting all
RegOpen/RegCreate calls and building it's own map of handle -> path.

IIRC you should be able to determine the path by querying the object
name. For instance, with Zw/NtQueryObject. Although there's quite
some information available, it's not a documented feature, however.
(IIRC there's an article on codeproject about the NT API)

If one is interested in debugging only, the !handle extension might be good
enough.

-hg
Dec 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
7686
by: Keith Brown | last post by:
I have an application that allows embedded storage of ANY chosen file in an OLE field. The file could have been dragged-and-dropped into the field or it might have been selected and imported...
2
5812
by: Cameron Frasnelly | last post by:
Does anyone know how to get the full Distinguished Name from the Useraname using vb.net??? All the examples show how to manipulate user objects but they have the LDAP path hardcoded??? I need to...
7
3711
by: Stephen E. Weber | last post by:
I need to determine if a file exists using code. I tried using the system.io.file.exists function, that will appears to locate the file if I use the complete filespec, when I move the project to...
2
5236
by: Sridhar | last post by:
Hi, I have a web form where it has a <input type=file id=file1> control. I have an Upload button to upload the file. WHen I click on browse and select one file, it is showing the full file path...
11
8244
by: rh00667 | last post by:
hi all, i'm confused now. how i can get the full path of an application? if myapp is in a directory which belongs to PATH, argv gives me the first token of cmd line, and not the real path of...
4
3014
by: somank.sharma | last post by:
I am running an exe created in C. I need the full path (absolute path) of this exe. In the first argument of main, I am getting the exe name. How can I get the full path for this exe.
3
2532
by: LordHog | last post by:
Hello, How would I go about finding the default handler, let's say a text file (*.txt), then launch the default handler with the file as an argument? I had found how to launch an external...
65
5017
by: Hongyu | last post by:
Dear all: I am trying to write to a file with full directory name and file name specified (./outdir/mytestout.txt where . is the current directory) in C programming language and under Unix, but...
7
1822
by: uncle | last post by:
config file that contains lines like... assemblyname|classname|methodname I want to invoke that static method. I found the following examples which make sense... Type theClass =...
0
7130
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.