mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2024-11-27 17:00:59 +01:00
Start10: Attempt to fix exploding RAM usage when opening Start10 on 22621.2134+
This commit is contained in:
parent
f027a36837
commit
67b7a27044
@ -26,7 +26,7 @@ static std::vector<winrt::guid> GlobalStartData_GetPlacesFromRegistry()
|
||||
std::vector<winrt::guid> places;
|
||||
|
||||
DWORD dwSize;
|
||||
HRESULT hr = RegGetValueW(
|
||||
LSTATUS lRes = RegGetValueW(
|
||||
HKEY_CURRENT_USER,
|
||||
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Start",
|
||||
L"VisiblePlaces",
|
||||
@ -35,11 +35,11 @@ static std::vector<winrt::guid> GlobalStartData_GetPlacesFromRegistry()
|
||||
nullptr,
|
||||
&dwSize
|
||||
);
|
||||
if (FAILED(hr) || dwSize == 0)
|
||||
if (lRes != ERROR_SUCCESS || dwSize == 0)
|
||||
return places;
|
||||
|
||||
places.resize(dwSize / sizeof(winrt::guid));
|
||||
hr = RegGetValueW(
|
||||
lRes = RegGetValueW(
|
||||
HKEY_CURRENT_USER,
|
||||
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Start",
|
||||
L"VisiblePlaces",
|
||||
@ -48,7 +48,7 @@ static std::vector<winrt::guid> GlobalStartData_GetPlacesFromRegistry()
|
||||
places.data(),
|
||||
&dwSize
|
||||
);
|
||||
if (FAILED(hr))
|
||||
if (lRes != ERROR_SUCCESS)
|
||||
places.clear();
|
||||
|
||||
return places;
|
||||
|
Loading…
Reference in New Issue
Block a user