[SHELL32][SDK] Implement SHOpenPropSheetA (#5830)

- Add SHOpenPropSheetA and
  SHOpenPropSheetW prototypes to <shlobj.h>.
- Implement SHOpenPropSheetA function.
This commit is contained in:
Katayama Hirofumi MZ 2023-10-27 19:34:02 +09:00 committed by GitHub
parent 8f6b016963
commit dcc9a2d8f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 70 additions and 28 deletions

View file

@ -218,35 +218,20 @@ SHGetSetFolderCustomSettingsA(LPSHFOLDERCUSTOMSETTINGSA pfcs,
return E_FAIL;
}
/*
* Unimplemented
/*************************************************************************
* SHOpenPropSheetW [SHELL32.80]
*
* @see https://learn.microsoft.com/en-us/windows/win32/api/shlobj/nf-shlobj-shopenpropsheetw
*/
EXTERN_C BOOL
WINAPI
SHOpenPropSheetA(LPCSTR lpCaption,
HKEY hKeys[],
UINT uCount,
const CLSID *pClsID,
IDataObject *pDataObject,
IShellBrowser *pShellBrowser,
LPCSTR lpStartPage)
{
FIXME("SHOpenPropSheetA() stub\n");
return FALSE;
}
/*
* Unimplemented
*/
EXTERN_C BOOL
WINAPI
SHOpenPropSheetW(LPCWSTR lpCaption,
HKEY hKeys[],
UINT uCount,
const CLSID *pClsID,
IDataObject *pDataObject,
IShellBrowser *pShellBrowser,
LPCWSTR lpStartPage)
BOOL WINAPI
SHOpenPropSheetW(
_In_opt_z_ LPCWSTR pszCaption,
_In_opt_ HKEY *ahKeys,
_In_ UINT cKeys,
_In_ const CLSID *pclsidDefault,
_In_ IDataObject *pDataObject,
_In_opt_ IShellBrowser *pShellBrowser,
_In_opt_z_ LPCWSTR pszStartPage)
{
FIXME("SHOpenPropSheetW() stub\n");
return FALSE;

View file

@ -466,3 +466,41 @@ LargeIntegerToString(
return Int64ToString(pLargeInt->QuadPart, pszOut, cchOut, bUseFormat,
pNumberFormat, dwNumberFlags);
}
/*************************************************************************
* SHOpenPropSheetA [SHELL32.707]
*
* @see https://learn.microsoft.com/en-us/windows/win32/api/shlobj/nf-shlobj-shopenpropsheeta
*/
EXTERN_C
BOOL WINAPI
SHOpenPropSheetA(
_In_opt_z_ LPCSTR pszCaption,
_In_opt_ HKEY *ahKeys,
_In_ UINT cKeys,
_In_ const CLSID *pclsidDefault,
_In_ IDataObject *pDataObject,
_In_opt_ IShellBrowser *pShellBrowser,
_In_opt_z_ LPCSTR pszStartPage)
{
WCHAR szStartPageW[MAX_PATH], szCaptionW[MAX_PATH];
LPCWSTR pszCaptionW = NULL, pszStartPageW = NULL;
TRACE("(%s, %p, %u, %p, %p, %p, %s)", pszCaption, ahKeys, cKeys, pclsidDefault, pDataObject,
pShellBrowser, pszStartPage);
if (pszCaption)
{
SHAnsiToUnicode(pszCaption, szCaptionW, _countof(szCaptionW));
pszCaptionW = szCaptionW;
}
if (pszStartPage)
{
SHAnsiToUnicode(pszStartPage, szStartPageW, _countof(szStartPageW));
pszStartPageW = szStartPageW;
}
return SHOpenPropSheetW(pszCaptionW, ahKeys, cKeys, pclsidDefault,
pDataObject, pShellBrowser, pszStartPageW);
}

View file

@ -340,6 +340,25 @@ int WINAPI PathCleanupSpec(_In_opt_ LPCWSTR, _Inout_ LPWSTR);
HINSTANCE WINAPI SHGetShellStyleHInstance(VOID);
#endif
BOOL WINAPI
SHOpenPropSheetA(
_In_opt_z_ LPCSTR pszCaption,
_In_opt_ HKEY *ahKeys,
_In_ UINT cKeys,
_In_ const CLSID *pclsidDefault,
_In_ IDataObject *pDataObject,
_In_opt_ IShellBrowser *pShellBrowser,
_In_opt_z_ LPCSTR pszStartPage);
BOOL WINAPI
SHOpenPropSheetW(
_In_opt_z_ LPCWSTR pszCaption,
_In_opt_ HKEY *ahKeys,
_In_ UINT cKeys,
_In_ const CLSID *pclsidDefault,
_In_ IDataObject *pDataObject,
_In_opt_ IShellBrowser *pShellBrowser,
_In_opt_z_ LPCWSTR pszStartPage);
/*****************************************************************************
* IContextMenu interface
*/