On 26/05/2016 at 11:25, xxxxxxxx wrote:
Originally posted by xxxxxxxx
I don' think there's anything for this in the SDK.The typical C++ code for this is: RegOpenKeyEx(), RegGetValue(), RegSetKeyValue(), and don't forget to RegCloseKey()But please don't do this in plugins for sale!!!!

I need to format my HD at least 4 times a year because of people dumping tons of garbage in my registry.

Create a folder in your plugin's folder structure to hold any persistent data. So it get's deleted automatically if the user deletes your plugin.Please...Don't do it.-ScottA
Don't worry, it's not used for my plugins! I strongly stick to Maxons guidelines.
It's need to detect an external aplication and optionally set its parameters. 
If you're interested, here's the first prototype I came up with:
inline std::string QueryRegistryValue(HKEY hKey, const LPCWSTR subKey, const char* keyName)
{
HKEY hKeyResult;
WCHAR buffer[512];
DWORD buffer_size = SIZEOF(buffer);
if (RegOpenKeyExW(hKey, reinterpret_cast<LPCWSTR>(subKey), 0, KEY_READ, &hKeyResult;) == ERROR_SUCCESS)
{
if (RegQueryValueExA(hKeyResult, keyName, nullptr, nullptr, reinterpret_cast<LPBYTE>(buffer), &buffer;_size) == ERROR_SUCCESS)
{
RegCloseKey(hKeyResult);
return std::string(reinterpret_cast<char*>(buffer));
}
RegCloseKey(hKeyResult);
}
return std::string();
}