I'm trying to get the output of RegQueryValueEx into a LPTSTR, and it's not going well... here's what I have
I've tried a few things, pointers, and casts and TEXT() and such, and nothing seems to do the trick.... I need to actually understand this so I can make it go both ways (I'm later saving values back to the reg and those're getting mucked up too)
Code:
LPTSTR _szExecutable;
unsigned char buffer[MAX_PATH];
...
RegQueryValueEx(hKey, TEXT("executable"), NULL, &datatype, buffer, &bufferlength);
...
????