MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / registryValueExists

Function registryValueExists

src/env.cpp:934–948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

932}
933
934bool registryValueExists(const QString& keyName, const QString& valueName)
935{
936 auto key = openRegistryKey(HKEY_CURRENT_USER, keyName.toStdWString().c_str());
937
938 if (!key) {
939 return false;
940 }
941
942 DWORD type = 0;
943
944 auto r = ::RegQueryValueExW(key.get(), valueName.toStdWString().c_str(), nullptr,
945 &type, nullptr, nullptr);
946
947 return (r == ERROR_SUCCESS);
948}
949
950// returns the filename of the given process or the current one
951//

Callers 1

updateRegistryKeyMethod · 0.85

Calls 2

openRegistryKeyFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected