#include <iostream>
#include <string>
#include <Windows.h>
usingnamespace std;
int main()
{
cout << "Trying to open the reg key...";
HKEY hKey;
LPDWORD result;
RegCreateKeyEx(HKEY_CURRENT_USER, "Software\\SEnergy\\PKL", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_SET_VALUE, NULL, &hKey, result);
if(result == REG_CREATED_NEW_KEY)
{
cout << "New Key \"Software\\SEnergy\\PKL\" has been created successfully!";
}
cout << endl;
system("pause");
return 0;
}
1 2 3
1>c:\users\senergy\documents\visual studio 2012\projects\pkl\pkl\source.cpp(13): error C2446: '==' : no conversion from 'long' to 'unsigned long *'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\senergy\documents\visual studio 2012\projects\pkl\pkl\source.cpp(13): error C2040: '==' : 'unsigned long *' differs in levels of indirection from 'long'