So basically, I go through a few keys in a game, so decided I'd make my own hex cd key changer as a way of learning. Just having an issue I cant get my head around >.<
I set the hex key to A1 B2 C3
But I can't output a1 b2 c3 to the screen, it displays as this:
Anyone able to help me out or point me in the right direction?
Code:
#include "stdafx.h"
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
SetConsoleTitle("OA Key Change");
HKEY hKey;
char data[255] = {0};
char key[255] = {0};
DWORD dwTypeSZ = REG_SZ;
DWORD dwTypeBIN = REG_BINARY;
DWORD dwBufSizeSZ = sizeof(data);
DWORD dwBufSizeBIN = sizeof(key);
RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wow6432Node\\Bohemia Interactive Studio\\ArmA 2 OA",0, KEY_QUERY_VALUE, &hKey);
RegQueryValueEx(hKey, "data", 0, &dwTypeSZ, (BYTE*)data, &dwBufSizeSZ);
cout << "data is : " << data << endl;
RegQueryValueEx(hKey, "KEY", 0, &dwTypeBIN, (BYTE*)key, &dwBufSizeBIN);
cout << "\nkey is : " << key << endl;
RegCloseKey;
system("pause");
}
(I know, I haven't checked for errors, just trying to get past this first)