ReactOS  0.4.14-dev-384-g5b37caa
shfldr.h
Go to the documentation of this file.
1 
2 /*
3  * Virtual Folder
4  * common definitions
5  *
6  * Copyright 1997 Marcus Meissner
7  * Copyright 1998, 1999, 2002 Juergen Schmied
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22  */
23 
24 #ifndef _SHFLDR_H_
25 #define _SHFLDR_H_
26 
27 #define CHARS_IN_GUID 39
28 
29 typedef struct {
30  int colnameid;
31  int pcsFlags;
32  int fmt;
33  int cxChar;
34 } shvheader;
35 
36 #define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00)
37 #define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF)
38 
39 LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut);
40 HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc, LPITEMIDLIST * pidlInOut,
41  LPOLESTR szNext, DWORD * pEaten, DWORD * pdwAttributes);
42 
44 
46 
48 
50 
52 
53 #ifdef __cplusplus
54 HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO* ppfti,
55  LPCITEMIDLIST pidlChild, const GUID* clsid, REFIID riid, LPVOID *ppvOut);
56 
58  int csidl, REFIID riid, LPVOID *ppvOut);
59 #endif
60 
61 HRESULT SHELL32_BindToSF (LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO* ppfti,
62  LPCITEMIDLIST pidl, const GUID* clsid, REFIID riid, LPVOID *ppvOut);
63 
64 extern "C"
66 
68 
70 
71 HRESULT SH_GetApidlFromDataObject(IDataObject *pDataObject, PIDLIST_ABSOLUTE* ppidlfolder, PUITEMID_CHILD **apidlItems, UINT *pcidl);
72 
73 static __inline int SHELL32_GUIDToStringA (REFGUID guid, LPSTR str)
74 {
75  return sprintf(str, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
76  guid.Data1, guid.Data2, guid.Data3,
77  guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3],
78  guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]);
79 }
80 
82 {
83  static const WCHAR fmtW[] =
84  { '{','%','0','8','l','x','-','%','0','4','x','-','%','0','4','x','-',
85  '%','0','2','x','%','0','2','x','-',
86  '%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x',
87  '%','0','2','x','%','0','2','x','}',0 };
88  return swprintf(str, fmtW,
89  guid.Data1, guid.Data2, guid.Data3,
90  guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3],
91  guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]);
92 }
93 
96 
97 void AddClassKeyToArray(const WCHAR * szClass, HKEY* array, UINT* cKeys);
98 
99 #ifdef __cplusplus
100 
101 HRESULT inline SHSetStrRet(LPSTRRET pStrRet, DWORD resId)
102 {
103  return SHSetStrRet(pStrRet, shell32_hInstance, resId);
104 }
105 
106 #endif
107 
108 #endif /* _SHFLDR_H_ */
static __inline int SHELL32_GUIDToStringA(REFGUID guid, LPSTR str)
Definition: shfldr.h:73
#define REFIID
Definition: guiddef.h:118
Definition: scsiwmi.h:51
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
interface IBindCtx * LPBC
Definition: objfwd.h:18
REFIID riid
Definition: precomp.h:44
ITEMID_CHILD UNALIGNED * PUITEMID_CHILD
Definition: shtypes.idl:68
void AddClassKeyToArray(const WCHAR *szClass, HKEY *array, UINT *cKeys)
Definition: shlfolder.cpp:267
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
const char * fmt
Definition: wsprintf.c:30
REFIID LPVOID * ppv
Definition: atlbase.h:39
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
char * LPSTR
Definition: xmlstorage.h:182
static LPOLESTR
Definition: stg_prop.c:27
HRESULT SHELL32_BindToSF(LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO *ppfti, LPCITEMIDLIST pidl, const GUID *clsid, REFIID riid, LPVOID *ppvOut)
Definition: shlfolder.cpp:159
#define sprintf(buf, format,...)
Definition: sprintf.c:55
const GUID * guid
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
unsigned int BOOL
Definition: ntddk_ex.h:94
HRESULT SHELL32_CompareChildren(IShellFolder2 *psf, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: shlfolder.cpp:215
const WCHAR * str
HRESULT SH_GetApidlFromDataObject(IDataObject *pDataObject, PIDLIST_ABSOLUTE *ppidlfolder, PUITEMID_CHILD **apidlItems, UINT *pcidl)
Definition: shlfolder.cpp:327
LONG_PTR LPARAM
Definition: windef.h:208
HRESULT SHELL32_GetDisplayNameOfChild(IShellFolder2 *psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
Definition: shlfolder.cpp:197
HRESULT SHELL32_ParseNextElement(IShellFolder2 *psf, HWND hwndOwner, LPBC pbc, LPITEMIDLIST *pidlInOut, LPOLESTR szNext, DWORD *pEaten, DWORD *pdwAttributes)
Definition: shlfolder.cpp:70
HRESULT SHELL32_CompareDetails(IShellFolder2 *isf, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: shlfolder.cpp:238
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
void SHELL_FS_ProcessDisplayFilename(LPWSTR szPath, DWORD dwFlags)
Definition: CFSFolder.cpp:1149
#define swprintf(buf, format,...)
Definition: sprintf.c:56
unsigned long DWORD
Definition: ntddk_ex.h:95
static __inline int SHELL32_GUIDToStringW(REFGUID guid, LPWSTR str)
Definition: shfldr.h:81
LPCWSTR GetNextElementW(LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut)
Definition: shlfolder.cpp:43
HRESULT SHELL32_GetFSItemAttributes(IShellFolder *psf, LPCITEMIDLIST pidl, LPDWORD pdwAttributes)
Definition: CFSFolder.cpp:512
REFCLSID clsid
Definition: msctf.c:82
LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path)
Definition: CFSFolder.cpp:460
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
HRESULT CDefViewBckgrndMenu_CreateInstance(IShellFolder *psf, REFIID riid, void **ppv)
BOOL HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey)
Definition: classes.c:233
LPCWSTR szPath
Definition: env.c:35
void AddFSClassKeysToArray(PCUITEMID_CHILD pidl, HKEY *array, UINT *cKeys)
Definition: shlfolder.cpp:281
Definition: services.c:325
unsigned int UINT
Definition: ndis.h:50
static HRESULT SHELL32_CoCreateInitSF(LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO *ppfti, LPCITEMIDLIST pidlChild, const GUID *clsid, REFIID riid, LPVOID *ppvOut)
Definition: CFindFolder.cpp:21
uint32_t * LPDWORD
Definition: typedefs.h:57
WCHAR * LPWSTR
Definition: xmlstorage.h:184
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
LPARAM lParam
Definition: combotst.c:139
BOOL SHELL_FS_HideExtension(LPWSTR pwszPath)
Definition: CFSFolder.cpp:1118