[SDK] Define IAssociationElement, IAssociationArray etc. (#7678)

Defining missing interfaces for
file association...
JIRA issue: CORE-19278
- Define IID_IAssociationElementOld,
  and IID_IAssociationElement
  interface IDs in <shlguid_undoc.h>.
- Define ASSOCQUERY, and
  IAssociationElementOld in
  <shlwapi_undoc.h>.
- Define IAssociationElement,
  IEnumAssociationElements,
  IAssociationArrayOld, and
  IAssociationArray interfaces in
  <shlobj_undoc.h>.
- Simplify <shlwapi_undoc.h>
  and <shlobj_undoc.h>.
This commit is contained in:
Katayama Hirofumi MZ 2025-01-30 22:16:46 +09:00 committed by GitHub
parent de3a6706e7
commit 7e52f64044
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 212 additions and 47 deletions

View file

@ -161,6 +161,8 @@ DEFINE_GUID(IID_IDelegateHostItemContainer,0x02468693, 0xE7E5, 0x4C6B, 0x99, 0x9
DEFINE_GUID(IID_IDrawPropertyControl, 0xE6DFF6FD, 0xBCD5, 0x4162, 0x9C, 0x65, 0xA3, 0xB1, 0x8C, 0x61, 0x6F, 0xDB);
DEFINE_GUID(IID_IEnumAssociationElements, 0xA6B0FB57, 0x7523, 0x4439, 0x94, 0x25, 0xEB, 0xE9, 0x98, 0x23, 0xB8, 0x28);
DEFINE_GUID(IID_IEnumerateAssociationElements,0x7513A16E,0xCF00,0x4817,0xA8, 0x90, 0xA2, 0x3C, 0x60, 0x8F, 0xE7, 0xB7);
DEFINE_GUID(IID_IAssociationElementOld, 0xE58B1ABF, 0x9596, 0x4DBA, 0x89, 0x97, 0x89, 0xDC, 0xDE, 0xF4, 0x69, 0x92);
DEFINE_GUID(IID_IAssociationElement, 0xD8F6AD5B, 0xB44F, 0x4BCC, 0x88, 0xFD, 0xEB, 0x34, 0x73, 0xDB, 0x75, 0x02);
DEFINE_GUID(IID_IFilterCondition, 0xFCA2857D, 0x1760, 0x4AD3, 0x8C, 0x63, 0xC9, 0xB6, 0x02, 0xFC, 0xBA, 0xEA);
DEFINE_GUID(IID_IFolderNotify, 0x0FF22D71, 0x5172, 0x11D1, 0xA9, 0xC6, 0x08, 0x00, 0x36, 0xAF, 0x3F, 0x03);
DEFINE_GUID(IID_IFolderProperties, 0x7361EE29, 0x5BAD, 0x459D, 0xA9, 0xF5, 0xF6, 0x55, 0x06, 0x89, 0x82, 0xF0);

View file

@ -1,30 +1,20 @@
/*
* ReactOS undocumented shell interface
*
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
* Copyright 2013 Dominik Hornung
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* PROJECT: ReactOS header
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Undocumented shell interface
* COPYRIGHT: Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
* Copyright 2013 Dominik Hornung
* Copyright 2025 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#ifndef __SHLOBJ_UNDOC__H
#define __SHLOBJ_UNDOC__H
#pragma once
#define SHLWAPI_ISHELLFOLDER_HELPERS
#include <shlwapi_undoc.h> // For ASSOCQUERY
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
#endif
typedef struct tagSLOTITEMDATA
{
@ -817,12 +807,145 @@ DECLARE_INTERFACE_(ITrayPriv, IUnknown)
#define ITrayPriv_AppendMenu(T,a) (T)->lpVtbl->AppendMenu(T,a)
#endif
/*****************************************************************************
* IAssociationElement interface
*
* @see IAssociationElementOld
* @see https://www.geoffchappell.com/studies/windows/shell/shlwapi/interfaces/iassociationelement.htm
*/
#define INTERFACE IAssociationElement
DECLARE_INTERFACE_(IAssociationElement, IUnknown) // {D8F6AD5B-B44F-4BCC-88FD-EB3473DB7502}
{
/*** IUnknown ***/
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IAssociationElement ***/
STDMETHOD(QueryString)(THIS_ ASSOCQUERY query, PCWSTR key, PWSTR *ppszValue) PURE;
STDMETHOD(QueryDword)(THIS_ ASSOCQUERY query, PCWSTR key, DWORD *pdwValue) PURE;
STDMETHOD(QueryGuid)(THIS_ ASSOCQUERY query, PCWSTR key, GUID *pguid) PURE;
STDMETHOD(QueryExists)(THIS_ ASSOCQUERY query, PCWSTR key) PURE;
STDMETHOD(QueryDirect)(THIS_ ASSOCQUERY query, PCWSTR key, FLAGGED_BYTE_BLOB **ppBlob) PURE;
STDMETHOD(QueryObject)(THIS_ ASSOCQUERY query, PCWSTR key, REFIID riid, PVOID *ppvObj) PURE;
};
#undef INTERFACE
#ifdef COBJMACROS
#define IAssociationElement_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
#define IAssociationElement_AddRef(T) (T)->lpVtbl->AddRef(T)
#define IAssociationElement_Release(T) (T)->lpVtbl->Release(T)
#define IAssociationElement_QueryString(T,a,b,c) (T)->lpVtbl->QueryString(T,a,b,c)
#define IAssociationElement_QueryDword(T,a,b,c) (T)->lpVtbl->QueryDword(T,a,b,c)
#define IAssociationElement_QueryGuid(T,a,b,c) (T)->lpVtbl->QueryGuid(T,a,b,c)
#define IAssociationElement_QueryExists(T,a,b) (T)->lpVtbl->QueryExists(T,a,b)
#define IAssociationElement_QueryDirect(T,a,b,c) (T)->lpVtbl->QueryDirect(T,a,b,c)
#define IAssociationElement_QueryObject(T,a,b,c,d) (T)->lpVtbl->QueryObject(T,a,b,c,d)
#endif
/*****************************************************************************
* IEnumAssociationElements interface
*
* @see https://www.geoffchappell.com/studies/windows/shell/shell32/interfaces/ienumassociationelements.htm
*/
#define INTERFACE IEnumAssociationElements
DECLARE_INTERFACE_(IEnumAssociationElements, IUnknown) // {A6B0FB57-7523-4439-9425-EBE99823B828}
{
/*** IUnknown ***/
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IEnumAssociationElements ***/
STDMETHOD(Next)(THIS_ ULONG celt, IAssociationElement *pElement, ULONG *pceltFetched) PURE;
STDMETHOD(Skip)(THIS_ ULONG celt) PURE;
STDMETHOD(Reset)(THIS) PURE;
STDMETHOD(Clone)(THIS_ IEnumAssociationElements **ppNew) PURE;
};
#undef INTERFACE
#ifdef COBJMACROS
#define IEnumAssociationElements_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
#define IEnumAssociationElements_AddRef(T) (T)->lpVtbl->AddRef(T)
#define IEnumAssociationElements_Release(T) (T)->lpVtbl->Release(T)
#define IEnumAssociationElements_Next(T,a,b,c) (T)->lpVtbl->Next(T,a,b,c)
#define IEnumAssociationElements_Skip(T,a) (T)->lpVtbl->Skip(T,a)
#define IEnumAssociationElements_Reset(T) (T)->lpVtbl->Reset(T)
#define IEnumAssociationElements_Clone(T,a) (T)->lpVtbl->Clone(T,a)
#endif
/*****************************************************************************
* IAssociationArrayOld interface
*
* @see IAssociationArray
* @see https://www.geoffchappell.com/studies/windows/shell/shell32/interfaces/iassociationarray.htm
*/
#define INTERFACE IAssociationArrayOld
DECLARE_INTERFACE_(IAssociationArrayOld, IUnknown) // {3B877E3C-67DE-4F9A-B29B-17D0A1521C6A}
{
/*** IUnknown ***/
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IAssociationArrayOld ***/
STDMETHOD(EnumElements)(THIS_ ULONG flags, IEnumAssociationElements **ppElement) PURE;
STDMETHOD(QueryString)(THIS_ ULONG flags, ASSOCQUERY query, PCWSTR key, PWSTR *ppszValue) PURE;
STDMETHOD(QueryDword)(THIS_ ULONG flags, ASSOCQUERY query, PCWSTR key, DWORD *pdwValue) PURE;
STDMETHOD(QueryExists)(THIS_ ULONG flags, ASSOCQUERY query, PCWSTR key) PURE;
STDMETHOD(QueryDirect)(THIS_ ULONG flags, ASSOCQUERY query, PCWSTR key, FLAGGED_BYTE_BLOB **ppBlob) PURE;
STDMETHOD(QueryObject)(THIS_ ULONG flags, ASSOCQUERY query, PCWSTR key, REFIID riid, PVOID *ppvObj) PURE;
};
#undef INTERFACE
#ifdef COBJMACROS
#define IAssociationArrayOld_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
#define IAssociationArrayOld_AddRef(T) (T)->lpVtbl->AddRef(T)
#define IAssociationArrayOld_Release(T) (T)->lpVtbl->Release(T)
#define IAssociationArrayOld_EnumElements(T,a,b) (T)->lpVtbl->EnumElements(T,a,b)
#define IAssociationArrayOld_QueryString(T,a,b,c,d) (T)->lpVtbl->QueryString(T,a,b,c,d)
#define IAssociationArrayOld_QueryDword(T,a,b,c,d) (T)->lpVtbl->QueryDword(T,a,b,c,d)
#define IAssociationArrayOld_QueryExists(T,a,b,c) (T)->lpVtbl->QueryExists(T,a,b,c)
#define IAssociationArrayOld_QueryDirect(T,a,b,c,d) (T)->lpVtbl->QueryDirect(T,a,b,c,d)
#define IAssociationArrayOld_QueryObject(T,a,b,c,d,e) (T)->lpVtbl->QueryObject(T,a,b,c,d,e)
#endif
/*****************************************************************************
* IAssociationArray interface
*
* @see IAssociationArrayOld
* @see https://www.geoffchappell.com/studies/windows/shell/shell32/interfaces/iassociationarray.htm
*/
#define INTERFACE IAssociationArray
DECLARE_INTERFACE_(IAssociationArray, IUnknown) // {19ADBAFD-1C5F-4FC7-94EE-846702DFB58B}
{
/*** IUnknown ***/
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IAssociationArray ***/
STDMETHOD(QueryString)(THIS_ ASSOCQUERY query, PCWSTR key, PWSTR *ppszValue) PURE;
STDMETHOD(QueryDword)(THIS_ ASSOCQUERY query, PCWSTR key, DWORD *pdwValue) PURE;
STDMETHOD(QueryGuid)(THIS_ ASSOCQUERY query, PCWSTR key, GUID *pguid) PURE;
STDMETHOD(QueryExists)(THIS_ ASSOCQUERY query, PCWSTR key) PURE;
STDMETHOD(QueryDirect)(THIS_ ASSOCQUERY query, PCWSTR key, FLAGGED_BYTE_BLOB **ppBlob) PURE;
STDMETHOD(QueryObject)(THIS_ ASSOCQUERY query, PCWSTR key, REFIID riid, PVOID *ppvObj) PURE;
};
#undef INTERFACE
#ifdef COBJMACROS
#define IAssociationArray_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
#define IAssociationArray_AddRef(T) (T)->lpVtbl->AddRef(T)
#define IAssociationArray_Release(T) (T)->lpVtbl->Release(T)
#define IAssociationArray_QueryString(T,a,b,c) (T)->lpVtbl->QueryString(T,a,b,c)
#define IAssociationArray_QueryDword(T,a,b,c) (T)->lpVtbl->QueryDword(T,a,b,c)
#define IAssociationArray_QueryGuid(T,a,b,c) (T)->lpVtbl->QueryGuid(T,a,b,c)
#define IAssociationArray_QueryExists(T,a,b) (T)->lpVtbl->QueryExists(T,a,b)
#define IAssociationArray_QueryDirect(T,a,b,c) (T)->lpVtbl->QueryDirect(T,a,b,c)
#define IAssociationArray_QueryObject(T,a,b,c,d) (T)->lpVtbl->QueryObject(T,a,b,c,d)
#endif
HANDLE WINAPI SHCreateDesktop(IShellDesktopTray*);
BOOL WINAPI SHDesktopMessageLoop(HANDLE);
HRESULT WINAPI SHCreateFileDataObject(PCIDLIST_ABSOLUTE pidlFolder, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, IDataObject* pDataInner, IDataObject** ppDataObj);
#ifdef __cplusplus
} /* extern "C" */
#endif /* defined(__cplusplus) */
#endif // __SHLOBJ_UNDOC__H
#endif

View file

@ -1,29 +1,38 @@
/*
* ReactOS shlwapi
*
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* PROJECT: ReactOS header
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Undocumented SHLWAPI definitions
* COPYRIGHT: Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
* Copyright 2025 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#ifndef __SHLWAPI_UNDOC_H
#define __SHLWAPI_UNDOC_H
#pragma once
#include <winreg.h> // For REGSAM
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
#endif
/*****************************************************************************
* ASSOCQUERY --- The type flags of association query
*
* @see IAssociationElementOld, IAssociationElement, IAssociationArrayOld, IAssociationArray
* @see https://www.geoffchappell.com/studies/windows/shell/shell32/api/assocelem/query.htm
*/
typedef DWORD ASSOCQUERY;
#define ASSOCQUERY_LOWORD_MASK 0x0000FFFF // The low-order word of flags
#define ASSOCQUERY_STRING 0x00010000 // Responds to QueryString method
#define ASSOCQUERY_EXISTS 0x00020000 // Responds to QueryExists method
#define ASSOCQUERY_DIRECT 0x00040000 // Responds to QueryDirect method
#define ASSOCQUERY_DWORD 0x00080000 // Responds to QueryDword method
#define ASSOCQUERY_INDIRECT 0x00100000 // Obtains resource string from QueryString
#define ASSOCQUERY_OBJECT 0x00200000 // Responds to QueryObject method
#define ASSOCQUERY_GUID 0x00400000 // Responds to QueryGuid method
#define ASSOCQUERY_EXTRA_NON_VERB 0x01000000 // Expects pszExtra for path or value
#define ASSOCQUERY_EXTRA_VERB 0x02000000 // Expects pszExtra for verb
#define ASSOCQUERY_SIGNIFICANCE 0x04000000 // Significance unknown
#define ASSOCQUERY_FALLBACK 0x80000000 // Fallback to secondary query source
#define SHELL_NO_POLICY ((DWORD)-1)
@ -402,8 +411,39 @@ IShellFolder_CompareIDs(
_In_ PCUIDLIST_RELATIVE pidl2);
#endif /* SHLWAPI_ISHELLFOLDER_HELPERS */
/*****************************************************************************
* IAssociationElementOld interface
*
* @see IAssociationElement
* @see https://www.geoffchappell.com/studies/windows/shell/shlwapi/interfaces/iassociationelement.htm
*/
#define INTERFACE IAssociationElementOld
DECLARE_INTERFACE_(IAssociationElementOld, IUnknown) // {E58B1ABF-9596-4DBA-8997-89DCDEF46992}
{
/*** IUnknown ***/
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IAssociationElementOld ***/
STDMETHOD(QueryString)(THIS_ ASSOCQUERY query, PCWSTR key, PWSTR *ppszValue) PURE;
STDMETHOD(QueryDword)(THIS_ ASSOCQUERY query, PCWSTR key, DWORD *pdwValue) PURE;
STDMETHOD(QueryExists)(THIS_ ASSOCQUERY query, PCWSTR key) PURE;
STDMETHOD(QueryDirect)(THIS_ ASSOCQUERY query, PCWSTR key, FLAGGED_BYTE_BLOB **ppBlob) PURE;
STDMETHOD(QueryObject)(THIS_ ASSOCQUERY query, PCWSTR key, REFIID riid, PVOID *ppvObj) PURE;
};
#undef INTERFACE
#ifdef COBJMACROS
#define IAssociationElementOld_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
#define IAssociationElementOld_AddRef(T) (T)->lpVtbl->AddRef(T)
#define IAssociationElementOld_Release(T) (T)->lpVtbl->Release(T)
#define IAssociationElementOld_QueryString(T,a,b,c) (T)->lpVtbl->QueryString(T,a,b,c)
#define IAssociationElementOld_QueryDword(T,a,b,c) (T)->lpVtbl->QueryDword(T,a,b,c)
#define IAssociationElementOld_QueryExists(T,a,b) (T)->lpVtbl->QueryExists(T,a,b)
#define IAssociationElementOld_QueryDirect(T,a,b,c) (T)->lpVtbl->QueryDirect(T,a,b,c)
#define IAssociationElementOld_QueryObject(T,a,b,c,d) (T)->lpVtbl->QueryObject(T,a,b,c,d)
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif /* defined(__cplusplus) */
#endif /* __SHLWAPI_UNDOC_H */
#endif