Start New Discussion within our Software Development Community

I want to create a C++ Program to edit the Windows Registry. For example to change the home page of internet explorer. But I don't know how to read or edit the help.

I am doing this program just for my own self and is not a part of homework.

I got the following source from the internet... but I don't know how to manipulate it for my convience

#include <windows.h>
#include <iostream>

int main () {

	HKEY hKey;				// Declare a key to store the result
	DWORD buffersize = 1024;	// Declare the size of the data buffer
	char* lpData = new char[buffersize];// Declare the buffer

	/* Open the Registry Key at the location 
	HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
	with read only access

	"Software\\Microsoft\\Internet Explorer\\Main",NULL,KEY_READ,&hKey);
	// Query the registry value
	RegQueryValueEx(hKey,"Start Page",NULL,NULL,(LPBYTE) lpData,&buffersize);
	// Print out the registry value
	std::cout << "Registry Key Open: memory location=" << hKey << "\n";
	std::cout << "Your Internet Start Page is " << lpData << "\n\n";

	// Close the Registry Key
	RegCloseKey (hKey);
	// Pause the system so there is time to read what is going on

	delete lpData;

but the thing is it edits reads only strings... I want to read a value which has binary values.... How do I do that?

This article has been dead for over six months. Start a new discussion instead.