Hmmm... Comparison Troubles...
I have been working in the registry for awhile now, not really reading anything though. OF course, when i do i run into trouble. Below is the code i am using, with comments where i get the problems (i think). The registry code is not the problem. It is comparing the return values with predetermined values that i hit the walls.
Even when the data appears to be the same, it still returns false.
if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Native\\SaveAll"), 0, KEY_QUERY_VALUE, &hKey)) return false;
unsigned char buffer; // It puts the data here...
unsigned char yes = "Yes"; // What i am going to compare with...
unsigned long datatype;
unsigned long bufferlength = sizeof(buffer);
RegQueryValueEx(hKey, "Active", NULL, &datatype, buffer, &bufferlength);
if (buffer == yes) return true; // How do i compare these?? This is where i get the problems.