What is the proper way to cast std::string to LPBYTE to make this code work?
string Name;
string Value;
RegEnumValueA(hKey, 0, const_cast<char*>(Name.c_str()), &dwSize, NULL, NULL, (LPBYTE)const_cast<char*>(Value.c_str()), &dwSize2);
When I try to user this code everythins is okey with the string name, but there’s a bad pointer error in the string value
The proper way od getting
std::stringwith data you want