Reading/Writing from/to windows registry using C++

R

RhavoX

Hi. This may be a very stupid question but I'll leave you to judge
it ;) I know there were lots of questions about this but none of the
answers suits me.
I'm wondering how to get the BINARY type data from the registry and
how to display it as hex in a way I'm showing below.

Let's say I use this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
\Prefetcher
The value of LastDiskLayoutTime is: 6A C7 49 ED 50 5F C7 01
Now i wonder how to receive this type of data and how to display it in
this form... Same goes for writing it to the registry... I have no
problems with using REG_SZ and DWORDS so even little help will be
highly appreciated ;)

Thx ;)
 
J

Jim Langston

Hi. This may be a very stupid question but I'll leave you to judge
it ;) I know there were lots of questions about this but none of the
answers suits me.
I'm wondering how to get the BINARY type data from the registry and
how to display it as hex in a way I'm showing below.

Let's say I use this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
\Prefetcher
The value of LastDiskLayoutTime is: 6A C7 49 ED 50 5F C7 01
Now i wonder how to receive this type of data and how to display it in
this form... Same goes for writing it to the registry... I have no
problems with using REG_SZ and DWORDS so even little help will be
highly appreciated ;)

Thx ;)

OS specific, try mocrosft.public.win32.programmer or
microsoft.public.vc.language or comp.os.ms-windows.programmer.win32 or
related.
 
R

RhavoX

OS specific, try mocrosft.public.win32.programmer or
microsoft.public.vc.language or comp.os.ms-windows.programmer.win32 or
related.

Yeah that would solve the problem but I really prefer C++/WinApi and I
would like to do it that way ;)
 
J

Jim Langston

Yeah that would solve the problem but I really prefer C++/WinApi and I
would like to do it that way ;)

You will have to use a C++ WinAPI, but to find out which WinAPI to use
you'll have to ask in a microsoft newsgroup.
 
R

RhavoX

You will have to use a C++ WinAPI, but to find out which WinAPI to use
you'll have to ask in a microsoft newsgroup.

Thx for help ;) I just tried to use standard libraries found in Dev C+
+ environment... They are ok and as I said they allow reading the
registry dword and reg_sz values. I took a look into winreg.h and it
has REG_BINARY included... But using that type doesn't do anything..
Anyway thx again for pointing me the right direction ;). I'll try
asking there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top