Well, Hello Again! I'm now using pure C++, too hard But well. I just love how you can manage everything Windows have, is like owning Windows. But well, i have some issues:
extern "C" __declspec(dllexport) char *getValue(char *valueName)
{
HKEY hKey = HKEY_LOCAL_MACHINE;
LPCSTR lpSubKey = "SOFTWARE\\Dantom\\BYOND";
PHKEY phkResult;
LPDWORD Type;
LPDWORD bufferSize;
PVOID returnedData;
LONG SuccessCreate = RegGetValueA(hKey, lpSubKey, valueName, RRF_RT_ANY, Type, returnedData, bufferSize);
if(SuccessCreate == ERROR_SUCCESS) {
RegCloseKey(hKey);
return returnedData;
}
}
I'm trying to pass PVOID returnedData; to a char *. Don't ask why, though. You would laught.
Well, i don't know how to pass it. How i do?
EDIT: But yea, i don't know if passing it would fix the things. I meant, we don't have any text to pass, just a pointer. I'm confused...
http://msdn.microsoft.com/en-us/library/ms724868(v=VS.85).aspx