in installvoices/InstallVoices.cpp [225:239]
int RemoveVoice(WCHAR* tokenKeyName)
{
std::wstring subKey;
#if _WIN64
subKey = L"SOFTWARE\\Microsoft\\Speech\\Voices\\Tokens\\";
#else
subKey = L"SOFTWARE\\WOW6432Node\\Microsoft\\Speech\\Voices\\Tokens\\";
#endif
subKey += tokenKeyName;
const HRESULT result = SHDeleteKeyW(HKEY_LOCAL_MACHINE, subKey.c_str());
if (result == ERROR_SUCCESS) {
return SUCCEEDED(S_OK);
}
return FAILED(result);
}