MCPcopy Create free account
hub / github.com/chrxh/alien / getStringFromWinReg

Function getStringFromWinReg

source/Base/GlobalSettings.cpp:53–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 std::string getStringFromWinReg(std::string const& name, std::string const& defaultValue)
54 {
55 try {
56 auto key = getOrCreateAlienRegKey();
57 auto regResult = key.TryGetStringValue(ConvertUtf8ToWide(name));
58 if (regResult.IsValid()) {
59 return ConvertWideToUtf8(regResult.GetValue());
60 } else {
61 return defaultValue;
62 }
63
64 } catch (std::exception const& exception) {
65 log(Priority::Important, exception.what());
66 return defaultValue;
67 }
68 }
69
70 void setStringToWinReg(std::string const& name, std::string const& value)
71 {

Callers 3

getFloatFromWinRegFunction · 0.85
getBoolFromWinRegFunction · 0.85
getValueMethod · 0.85

Calls 6

getOrCreateAlienRegKeyFunction · 0.85
ConvertUtf8ToWideFunction · 0.85
ConvertWideToUtf8Function · 0.85
logFunction · 0.85
TryGetStringValueMethod · 0.80
IsValidMethod · 0.80

Tested by

no test coverage detected