473,379 Members | 1,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

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

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 ;)

Mar 6 '07 #1
4 3608

<Rh****@gmail.comwrote in message
news:11**********************@n33g2000cwc.googlegr oups.com...
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.
Mar 6 '07 #2
On 6 Mar, 20:16, "Jim Langston" <tazmas...@rocketmail.comwrote:
<Rha...@gmail.comwrote in message

news:11**********************@n33g2000cwc.googlegr oups.com...
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.
Yeah that would solve the problem but I really prefer C++/WinApi and I
would like to do it that way ;)

Mar 6 '07 #3
<Rh****@gmail.comwrote in message
news:11**********************@64g2000cwx.googlegro ups.com...
On 6 Mar, 20:16, "Jim Langston" <tazmas...@rocketmail.comwrote:
><Rha...@gmail.comwrote in message

news:11**********************@n33g2000cwc.googleg roups.com...
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.

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.
Mar 6 '07 #4
On 6 Mar, 20:30, "Jim Langston" <tazmas...@rocketmail.comwrote:
<Rha...@gmail.comwrote in message

news:11**********************@64g2000cwx.googlegro ups.com...
On 6 Mar, 20:16, "Jim Langston" <tazmas...@rocketmail.comwrote:
<Rha...@gmail.comwrote in message
>news:11**********************@n33g2000cwc.googleg roups.com...
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.
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.
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.

Mar 6 '07 #5

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

Similar topics

0
by: Pat Blair | last post by:
Sorry to anyone who read this post, but in case it's useful to anyone: Further experiments reveal that while a tuple comes back if you read a multi-line string, you set the value using a list (not...
4
by: Lee | last post by:
I have created a custom log for my apps to write to. Writing to the log seems to be no problem, it's when I go to read it I get unexpected results. I have an application that reads the log and...
5
by: Dhilip Kumar | last post by:
Hi All, I'm writing a Windows Service app using C#. I need to read some configuration settings before the service starts up. These settings will be used by the service in its operation. ...
6
by: Bry | last post by:
I'm having problems writing (and reading) boolean data to the registry. // Write a boolean value to the registry // I've not included the obvious bits of code in these samples bool myBool =...
1
by: Peter John | last post by:
I am using the following code to read from and write to the registry. The writing works fine but reading always fails. Can anyone suggest what is going wrong? Imports Microsoft.Win32 Public...
5
by: UJ | last post by:
I have a system that has five programs that all communicate with each other via Message Queues. Works well. One program is a watchdog that will make sure the others are up and going. Currently I...
0
by: tmsprowl | last post by:
Greetings! I was wondering if someone could help me with a problem I'm having. My department is just one of many within my organization. My organization has control over the network domain,...
2
by: terryastone | last post by:
I have an application that reads some registry values stored in the Local Machine\Software\... key. In XP, I can see these values using RegEdit. In my application I can read the values at...
29
by: Guillaume Dargaud | last post by:
Hello all, anybody knows if there's some ANSI-C conformant code around that can read Windows-style .ini files ? I don't care about writing to it but I need to be able to read it from various OSs,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.