mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 00:16:40 +00:00
[desk.cpl]
- Add a missing error check svn path=/trunk/; revision=58798
This commit is contained in:
parent
78cb9a84f2
commit
ade6d5011a
1 changed files with 44 additions and 42 deletions
|
@ -123,8 +123,9 @@ AddListViewItems(HWND hwndDlg, PDATA pData)
|
|||
pData->listViewItemCount++;
|
||||
|
||||
/* Add current wallpaper if any */
|
||||
RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), 0, KEY_ALL_ACCESS, ®Key);
|
||||
|
||||
result = RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), 0, KEY_ALL_ACCESS, ®Key);
|
||||
if (result == ERROR_SUCCESS)
|
||||
{
|
||||
result = RegQueryValueEx(regKey, TEXT("Wallpaper"), 0, &varType, (LPBYTE)wallpaperFilename, &bufferSize);
|
||||
if ((result == ERROR_SUCCESS) && (_tcslen(wallpaperFilename) > 0))
|
||||
{
|
||||
|
@ -177,6 +178,7 @@ AddListViewItems(HWND hwndDlg, PDATA pData)
|
|||
}
|
||||
|
||||
RegCloseKey(regKey);
|
||||
}
|
||||
|
||||
/* Add all the images in the C:\ReactOS directory. */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue