mirror of
https://github.com/reactos/reactos.git
synced 2025-07-25 02:43:43 +00:00
JIRA issue: CORE-19824 JIRA issue: CORE-19867 JIRA issue: CORE-14172 - Use <strsafe.h>. - Don't use CSIDL_COMMON_FAVORITES.
This commit is contained in:
parent
457642cc4a
commit
d69a80fad7
1 changed files with 4 additions and 2 deletions
|
@ -3,9 +3,11 @@
|
||||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||||
* PURPOSE: Utility routines
|
* PURPOSE: Utility routines
|
||||||
* COPYRIGHT: Copyright 2024 Whindmar Saksit <whindsaks@proton.me>
|
* COPYRIGHT: Copyright 2024 Whindmar Saksit <whindsaks@proton.me>
|
||||||
|
* Copyright 2025 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
|
#include <strsafe.h>
|
||||||
|
|
||||||
#include <wine/debug.h>
|
#include <wine/debug.h>
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||||
|
@ -209,7 +211,7 @@ AddUrlToFavorites(
|
||||||
// Get title
|
// Get title
|
||||||
WCHAR szTitle[MAX_PATH];
|
WCHAR szTitle[MAX_PATH];
|
||||||
if (pszTitleW)
|
if (pszTitleW)
|
||||||
lstrcpynW(szTitle, pszTitleW, _countof(szTitle));
|
StringCchCopyW(szTitle, _countof(szTitle), pszTitleW);
|
||||||
else
|
else
|
||||||
ILGetDisplayNameEx(NULL, pidl, szTitle, ILGDN_NORMAL);
|
ILGetDisplayNameEx(NULL, pidl, szTitle, ILGDN_NORMAL);
|
||||||
|
|
||||||
|
@ -219,7 +221,7 @@ AddUrlToFavorites(
|
||||||
// Build shortcut pathname
|
// Build shortcut pathname
|
||||||
WCHAR szPath[MAX_PATH];
|
WCHAR szPath[MAX_PATH];
|
||||||
if (!SHGetSpecialFolderPathW(hwnd, szPath, CSIDL_FAVORITES, TRUE))
|
if (!SHGetSpecialFolderPathW(hwnd, szPath, CSIDL_FAVORITES, TRUE))
|
||||||
SHGetSpecialFolderPathW(hwnd, szPath, CSIDL_COMMON_FAVORITES, TRUE);
|
return E_FAIL;
|
||||||
PathAppendW(szPath, szTitle);
|
PathAppendW(szPath, szTitle);
|
||||||
PathAddExtensionW(szPath, L".lnk");
|
PathAddExtensionW(szPath, L".lnk");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue