M
merc
C++ Guru's..
I need some help please. I've been reading the C++ in 21 days by
James Liberty. Currently I'm on Chapter 7 (looping). This knowledge
doesn't have anything really to do with my question; it's more to show
you that I'm a rookie learning C++.
I have an opportunity to write a simple application for my work and
I'd like to write my very first non-book tutorial application.
I need to be able to check to see if a particular key's value exists
and if not then write the key to the registery.
The Key I need to check for an existing value is:
KEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters
The DWORD Value I need to check for is:
DisableDHCPMediaSense with a value of 1
So, common sense tells me to go to the MSDN materials at Microsoft. I
found the registry api information here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/registry_functions.asp
However, I don't understand how to plug this into my programs logic?
For example.. I know how to form the IF and ELSE together, but I don't
understand how I take the Registry API and make it work the C++ within
my IF and ELSE.
In your reply, please don't suggest using another langaguage such as
VBScript or JavaScript. My goal is to learn C++. Also, please do
not solve my problem but give me hints on how to apply it. The MSDN
information I've found hasn't given me a good enough hint yet or how
to put this all together.
Thanks for everyone's time!
Jon
I need some help please. I've been reading the C++ in 21 days by
James Liberty. Currently I'm on Chapter 7 (looping). This knowledge
doesn't have anything really to do with my question; it's more to show
you that I'm a rookie learning C++.
I have an opportunity to write a simple application for my work and
I'd like to write my very first non-book tutorial application.
I need to be able to check to see if a particular key's value exists
and if not then write the key to the registery.
The Key I need to check for an existing value is:
KEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters
The DWORD Value I need to check for is:
DisableDHCPMediaSense with a value of 1
So, common sense tells me to go to the MSDN materials at Microsoft. I
found the registry api information here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/registry_functions.asp
However, I don't understand how to plug this into my programs logic?
For example.. I know how to form the IF and ELSE together, but I don't
understand how I take the Registry API and make it work the C++ within
my IF and ELSE.
In your reply, please don't suggest using another langaguage such as
VBScript or JavaScript. My goal is to learn C++. Also, please do
not solve my problem but give me hints on how to apply it. The MSDN
information I've found hasn't given me a good enough hint yet or how
to put this all together.
Thanks for everyone's time!
Jon