6 * Copyright 1997 Marcus Meissner
7 * Copyright 1998, 1999, 2002 Juergen Schmied
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.
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.
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
27 #define CHARS_IN_GUID 39
36 #define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00)
37 #define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF)
39 BOOL
SHELL32_GetCustomFolderAttribute (LPCITEMIDLIST pidl
, LPCWSTR pwszHeading
, LPCWSTR pwszAttribute
, LPWSTR pwszValue
, DWORD cchValue
);
40 BOOL
SHELL32_GetCustomFolderAttributes (LPCITEMIDLIST pidl
, LPCWSTR pwszHeading
, LPWSTR pwszValue
, DWORD cchValue
);
42 LPCWSTR
GetNextElementW (LPCWSTR pszNext
, LPWSTR pszOut
, DWORD dwOut
);
43 HRESULT
SHELL32_ParseNextElement (IShellFolder2
* psf
, HWND hwndOwner
, LPBC pbc
, LPITEMIDLIST
* pidlInOut
,
44 LPOLESTR szNext
, DWORD
* pEaten
, DWORD
* pdwAttributes
);
45 HRESULT
SHELL32_GetItemAttributes (IShellFolder
* psf
, LPCITEMIDLIST pidl
, LPDWORD pdwAttributes
);
46 HRESULT
SHELL32_GetDisplayNameOfChild (IShellFolder2
* psf
, LPCITEMIDLIST pidl
, DWORD dwFlags
, LPWSTR szOut
,
49 HRESULT
SHELL32_BindToChild (LPCITEMIDLIST pidlRoot
,
50 LPCWSTR pathRoot
, LPCITEMIDLIST pidlComplete
, REFIID riid
, LPVOID
* ppvOut
);
52 HRESULT
SHELL32_CompareIDs (IShellFolder
* iface
, LPARAM lParam
, LPCITEMIDLIST pidl1
, LPCITEMIDLIST pidl2
);
53 LPITEMIDLIST
SHELL32_CreatePidlFromBindCtx(IBindCtx
*pbc
, LPCWSTR path
);
55 static __inline
int SHELL32_GUIDToStringA (REFGUID guid
, LPSTR str
)
57 return sprintf(str
, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
58 guid
.Data1
, guid
.Data2
, guid
.Data3
,
59 guid
.Data4
[0], guid
.Data4
[1], guid
.Data4
[2], guid
.Data4
[3],
60 guid
.Data4
[4], guid
.Data4
[5], guid
.Data4
[6], guid
.Data4
[7]);
63 static __inline
int SHELL32_GUIDToStringW (REFGUID guid
, LPWSTR str
)
65 static const WCHAR fmtW
[] =
66 { '{','%','0','8','l','x','-','%','0','4','x','-','%','0','4','x','-',
67 '%','0','2','x','%','0','2','x','-',
68 '%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x',
69 '%','0','2','x','%','0','2','x','}',0 };
70 return swprintf(str
, fmtW
,
71 guid
.Data1
, guid
.Data2
, guid
.Data3
,
72 guid
.Data4
[0], guid
.Data4
[1], guid
.Data4
[2], guid
.Data4
[3],
73 guid
.Data4
[4], guid
.Data4
[5], guid
.Data4
[6], guid
.Data4
[7]);
76 void SHELL_FS_ProcessDisplayFilename(LPWSTR szPath
, DWORD dwFlags
);
77 BOOL
SHELL_FS_HideExtension(LPWSTR pwszPath
);
79 #endif /* _SHFLDR_H_ */