[SHELL32] Move SHOpenPropSheetA to propsheet.cpp (#7624)

Improve consistency of code management.
JIRA issue: CORE-19278
- Move SHOpenPropSheetA from
  utils.cpp into propsheet.cpp that
  contains SHOpenPropSheetW.
This commit is contained in:
Katayama Hirofumi MZ 2025-01-16 20:09:30 +09:00 committed by GitHub
parent 6ada5978d0
commit f482244f45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 35 additions and 38 deletions

View file

@ -160,6 +160,41 @@ SHELL32_OpenPropSheet(LPCWSTR pszCaption, HKEY *ahKeys, UINT cKeys,
return (Result != -1);
}
/*************************************************************************
* SHOpenPropSheetA [SHELL32.707]
*
* @see https://learn.microsoft.com/en-us/windows/win32/api/shlobj/nf-shlobj-shopenpropsheeta
*/
EXTERN_C
BOOL WINAPI
SHOpenPropSheetA(
_In_opt_ LPCSTR pszCaption,
_In_opt_ HKEY *ahKeys,
_In_ UINT cKeys,
_In_ const CLSID *pclsidDefault,
_In_ IDataObject *pDataObject,
_In_opt_ IShellBrowser *pShellBrowser,
_In_opt_ LPCSTR pszStartPage)
{
CStringW strStartPageW, strCaptionW;
LPCWSTR pszCaptionW = NULL, pszStartPageW = NULL;
if (pszCaption)
{
strStartPageW = pszCaption;
pszCaptionW = strCaptionW;
}
if (pszStartPage)
{
strStartPageW = pszStartPage;
pszStartPageW = strStartPageW;
}
return SHOpenPropSheetW(pszCaptionW, ahKeys, cKeys, pclsidDefault,
pDataObject, pShellBrowser, pszStartPageW);
}
/*************************************************************************
* SHOpenPropSheetW [SHELL32.80]
*

View file

@ -1116,44 +1116,6 @@ CopyStreamUI(
return hr;
}
/*************************************************************************
* SHOpenPropSheetA [SHELL32.707]
*
* @see https://learn.microsoft.com/en-us/windows/win32/api/shlobj/nf-shlobj-shopenpropsheeta
*/
EXTERN_C
BOOL WINAPI
SHOpenPropSheetA(
_In_opt_ LPCSTR pszCaption,
_In_opt_ HKEY *ahKeys,
_In_ UINT cKeys,
_In_ const CLSID *pclsidDefault,
_In_ IDataObject *pDataObject,
_In_opt_ IShellBrowser *pShellBrowser,
_In_opt_ LPCSTR pszStartPage)
{
CStringW strStartPageW, strCaptionW;
LPCWSTR pszCaptionW = NULL, pszStartPageW = NULL;
TRACE("(%s, %p, %u, %p, %p, %p, %s)", debugstr_a(pszCaption), ahKeys, cKeys, pclsidDefault,
pDataObject, pShellBrowser, debugstr_a(pszStartPage));
if (pszCaption)
{
strStartPageW = pszCaption;
pszCaptionW = strCaptionW;
}
if (pszStartPage)
{
strStartPageW = pszStartPage;
pszStartPageW = strStartPageW;
}
return SHOpenPropSheetW(pszCaptionW, ahKeys, cKeys, pclsidDefault,
pDataObject, pShellBrowser, pszStartPageW);
}
/*************************************************************************
* Activate_RunDLL [SHELL32.105]
*