-4

Hello I know this sounds silly but I really failed this time.

I m making application in C++ that will show users configuration. Most informations I get from registry key ex. Proccessor name is located at

[HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0]
 Key is:  `ProcessorNameString`

How can get data from that key in C++ and get give it to variable?

Dan Hulme
  • 14,779
  • 3
  • 46
  • 95

1 Answers1

0

Google C++ read HKEY_LOCAL_MACHINE
Find something like this
Try something like this:

HKEY hk;

long n = RegOpenKeyEx(HKEY_LOCAL_MACHINE,TEXT("HARDWARE\\Description\\"),
                  0,KEY_QUERY_VALUE, &hk );

When that doesn't fully work, look up RegOpenKeyEx.

Community
  • 1
  • 1
doctorlove
  • 18,872
  • 2
  • 46
  • 62