mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 10:01:43 +00:00
[REACTOS] Refactor CRegKey usage (#3779)
- [MSPAINT] ReadDWORD(): Improve 'dwValue' handling Addendum to3185db7
(r72158). - [DRWTSN32] Settings_GetOutputPath(): Fix 'key' handling Addendum to1d10606
. - [RAPPS] Remove 2 superfluous 'CRegKey::Close()' calls Follow-up to42e111f
.
This commit is contained in:
parent
a0bf7a05cc
commit
18d15bcc8b
3 changed files with 5 additions and 15 deletions
|
@ -170,17 +170,13 @@ std::wstring Settings_GetOutputPath(void)
|
|||
{
|
||||
WCHAR Buffer[MAX_PATH] = L"";
|
||||
ULONG BufferSize = _countof(Buffer);
|
||||
BOOL UseDefaultPath = FALSE;
|
||||
BOOL UseDefaultPath = TRUE;
|
||||
|
||||
CRegKey key;
|
||||
if (key.Open(HKEY_CURRENT_USER, L"SOFTWARE\\ReactOS\\Crash Reporter", KEY_READ) != ERROR_SUCCESS)
|
||||
if (key.Open(HKEY_CURRENT_USER, L"SOFTWARE\\ReactOS\\Crash Reporter", KEY_READ) == ERROR_SUCCESS &&
|
||||
key.QueryStringValue(L"Dump Directory", Buffer, &BufferSize) == ERROR_SUCCESS)
|
||||
{
|
||||
UseDefaultPath = TRUE;
|
||||
}
|
||||
|
||||
if (key.QueryStringValue(L"Dump Directory", Buffer, &BufferSize) != ERROR_SUCCESS)
|
||||
{
|
||||
UseDefaultPath = TRUE;
|
||||
UseDefaultPath = FALSE;
|
||||
}
|
||||
|
||||
if (UseDefaultPath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue