mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2025-02-17 11:08:41 +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;
|
std::vector<winrt::guid> places;
|
||||||
|
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
HRESULT hr = RegGetValueW(
|
LSTATUS lRes = RegGetValueW(
|
||||||
HKEY_CURRENT_USER,
|
HKEY_CURRENT_USER,
|
||||||
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Start",
|
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Start",
|
||||||
L"VisiblePlaces",
|
L"VisiblePlaces",
|
||||||
@ -35,11 +35,11 @@ static std::vector<winrt::guid> GlobalStartData_GetPlacesFromRegistry()
|
|||||||
nullptr,
|
nullptr,
|
||||||
&dwSize
|
&dwSize
|
||||||
);
|
);
|
||||||
if (FAILED(hr) || dwSize == 0)
|
if (lRes != ERROR_SUCCESS || dwSize == 0)
|
||||||
return places;
|
return places;
|
||||||
|
|
||||||
places.resize(dwSize / sizeof(winrt::guid));
|
places.resize(dwSize / sizeof(winrt::guid));
|
||||||
hr = RegGetValueW(
|
lRes = RegGetValueW(
|
||||||
HKEY_CURRENT_USER,
|
HKEY_CURRENT_USER,
|
||||||
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Start",
|
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Start",
|
||||||
L"VisiblePlaces",
|
L"VisiblePlaces",
|
||||||
@ -48,7 +48,7 @@ static std::vector<winrt::guid> GlobalStartData_GetPlacesFromRegistry()
|
|||||||
places.data(),
|
places.data(),
|
||||||
&dwSize
|
&dwSize
|
||||||
);
|
);
|
||||||
if (FAILED(hr))
|
if (lRes != ERROR_SUCCESS)
|
||||||
places.clear();
|
places.clear();
|
||||||
|
|
||||||
return places;
|
return places;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user