MCPcopy Create free account
hub / github.com/BlueMatthew/WechatExporter / GetStringProperty

Method GetStringProperty

vcproject/AppConfiguration.cpp:226–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226BOOL AppConfiguration::GetStringProperty(LPCTSTR name, CString& value)
227{
228 CRegKey rk;
229 if (rk.Open(HKEY_CURRENT_USER, APP_ROOT_PATH, KEY_READ) == ERROR_SUCCESS)
230 {
231 ULONG chars = 0;
232 HRESULT hr = rk.QueryStringValue(name, NULL, &chars);
233 if (SUCCEEDED(hr))
234 {
235 hr = rk.QueryStringValue(name, value.GetBufferSetLength(chars), &chars);
236 value.ReleaseBuffer();
237 return SUCCEEDED(hr);
238 }
239
240 rk.Close();
241 }
242
243 return false;
244}
245
246BOOL AppConfiguration::SetStringProperty(LPCTSTR name, LPCTSTR value)
247{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected