Im trying to set an existing registry key.
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
HKEY hk;
char* data = "VALUE";
RegOpenKeyEx(
HKEY_CURRENT_USER,
NULL,
(DWORD)0,
KEY_SET_VALUE,
&hk);
RegSetKeyValue(
hk,
(LPCTSTR)"Software\\Microsoft\\Command Processor",
(LPCTSTR)"Autorun",
REG_SZ,
(LPCVOID)data,
(DWORD)strlen(data));
}
I get an 'Entry Point Not Found' error (The procedure entry point RegSetKeyValueW could not be located in the dynamic link library ADVAPI32.dll.)
I also read somewhere that i may need at least windows vista to use these functions?
If so how can i edit the registry in C++ with windows XP (media center edition)?