mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[SDK][SHELL32][SHLWAPI][SHLWAPI_APITEST] Split IShellFolder helpers hack (#7685)
Splitting the hack will improve our code quality. JIRA issue: N/A - Add sdk/include/reactos/ishellfolder_helpers.h header file. - Split conflicting code.
This commit is contained in:
parent
d5ce3d28ab
commit
909468c4dc
6 changed files with 54 additions and 46 deletions
|
@ -42,8 +42,8 @@
|
|||
#include <shlguid_undoc.h>
|
||||
#include <shlobj_undoc.h>
|
||||
|
||||
#define SHLWAPI_ISHELLFOLDER_HELPERS
|
||||
#include <shlwapi_undoc.h>
|
||||
#include <ishellfolder_helpers.h>
|
||||
|
||||
#include <shellapi.h>
|
||||
#undef ShellExecute
|
||||
|
|
|
@ -21,15 +21,8 @@
|
|||
#include <shlguid_undoc.h>
|
||||
#include <atlstr.h>
|
||||
|
||||
/*
|
||||
* HACK!
|
||||
*/
|
||||
#undef IShellFolder_GetDisplayNameOf
|
||||
#undef IShellFolder_ParseDisplayName
|
||||
#undef IShellFolder_CompareIDs
|
||||
|
||||
#define SHLWAPI_ISHELLFOLDER_HELPERS /* HACK! */
|
||||
#include <shlwapi_undoc.h>
|
||||
#include <ishellfolder_helpers.h>
|
||||
|
||||
#include <strsafe.h>
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include <shlwapi.h>
|
||||
#include <versionhelpers.h>
|
||||
|
||||
#define SHLWAPI_ISHELLFOLDER_HELPERS
|
||||
#include <shlwapi_undoc.h>
|
||||
#include <ishellfolder_helpers.h>
|
||||
|
||||
static INT s_nStep = 0;
|
||||
|
||||
|
|
51
sdk/include/reactos/ishellfolder_helpers.h
Normal file
51
sdk/include/reactos/ishellfolder_helpers.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* PROJECT: ReactOS header
|
||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
* PURPOSE: SHLWAPI IShellFolder helpers
|
||||
* COPYRIGHT: Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
* Copyright 2025 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* HACK! These function names are conflicting with <shobjidl.h> functions. */
|
||||
#undef IShellFolder_GetDisplayNameOf
|
||||
#undef IShellFolder_ParseDisplayName
|
||||
#undef IShellFolder_CompareIDs
|
||||
|
||||
HRESULT WINAPI
|
||||
IShellFolder_GetDisplayNameOf(
|
||||
_In_ IShellFolder *psf,
|
||||
_In_ LPCITEMIDLIST pidl,
|
||||
_In_ SHGDNF uFlags,
|
||||
_Out_ LPSTRRET lpName,
|
||||
_In_ DWORD dwRetryFlags);
|
||||
|
||||
/* Flags for IShellFolder_GetDisplayNameOf */
|
||||
#define SFGDNO_RETRYWITHFORPARSING 0x00000001
|
||||
#define SFGDNO_RETRYALWAYS 0x80000000
|
||||
|
||||
HRESULT WINAPI
|
||||
IShellFolder_ParseDisplayName(
|
||||
_In_ IShellFolder *psf,
|
||||
_In_ HWND hwndOwner,
|
||||
_In_ LPBC pbcReserved,
|
||||
_In_ LPOLESTR lpszDisplayName,
|
||||
_Out_ ULONG *pchEaten,
|
||||
_Out_ PIDLIST_RELATIVE *ppidl,
|
||||
_Out_ ULONG *pdwAttributes);
|
||||
|
||||
EXTERN_C HRESULT WINAPI
|
||||
IShellFolder_CompareIDs(
|
||||
_In_ IShellFolder *psf,
|
||||
_In_ LPARAM lParam,
|
||||
_In_ PCUIDLIST_RELATIVE pidl1,
|
||||
_In_ PCUIDLIST_RELATIVE pidl2);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define SHLWAPI_ISHELLFOLDER_HELPERS
|
||||
#include <shlwapi_undoc.h> // For ASSOCQUERY
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -376,41 +376,6 @@ DWORD WINAPI SHGetObjectCompatFlags(IUnknown *pUnk, const CLSID *clsid);
|
|||
#define SHACF_WIN95SHLEXEC 0x00000200 /* Geoff Chappell */
|
||||
DWORD WINAPI SHGetAppCompatFlags(DWORD dwMask);
|
||||
|
||||
/*
|
||||
* HACK! These functions are conflicting with <shobjidl.h> inline functions...
|
||||
* We provide a macro option SHLWAPI_ISHELLFOLDER_HELPERS for using these functions.
|
||||
*/
|
||||
#ifdef SHLWAPI_ISHELLFOLDER_HELPERS
|
||||
HRESULT WINAPI
|
||||
IShellFolder_GetDisplayNameOf(
|
||||
_In_ IShellFolder *psf,
|
||||
_In_ LPCITEMIDLIST pidl,
|
||||
_In_ SHGDNF uFlags,
|
||||
_Out_ LPSTRRET lpName,
|
||||
_In_ DWORD dwRetryFlags);
|
||||
|
||||
/* Flags for IShellFolder_GetDisplayNameOf */
|
||||
#define SFGDNO_RETRYWITHFORPARSING 0x00000001
|
||||
#define SFGDNO_RETRYALWAYS 0x80000000
|
||||
|
||||
HRESULT WINAPI
|
||||
IShellFolder_ParseDisplayName(
|
||||
_In_ IShellFolder *psf,
|
||||
_In_ HWND hwndOwner,
|
||||
_In_ LPBC pbcReserved,
|
||||
_In_ LPOLESTR lpszDisplayName,
|
||||
_Out_ ULONG *pchEaten,
|
||||
_Out_ PIDLIST_RELATIVE *ppidl,
|
||||
_Out_ ULONG *pdwAttributes);
|
||||
|
||||
EXTERN_C HRESULT WINAPI
|
||||
IShellFolder_CompareIDs(
|
||||
_In_ IShellFolder *psf,
|
||||
_In_ LPARAM lParam,
|
||||
_In_ PCUIDLIST_RELATIVE pidl1,
|
||||
_In_ PCUIDLIST_RELATIVE pidl2);
|
||||
#endif /* SHLWAPI_ISHELLFOLDER_HELPERS */
|
||||
|
||||
/*****************************************************************************
|
||||
* IAssociationElementOld interface
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue