2 * Shell Library definitions
15 /****************************************************************************
18 extern void SHELL_LoadRegistry(void);
19 extern void SHELL_SaveRegistry(void);
20 extern void SHELL_Init(void);
22 /* global functions used from shell32 */
23 extern HINSTANCE32
SHELL_FindExecutable(LPCSTR
,LPCSTR
,LPSTR
);
24 extern HGLOBAL16 WINAPI
InternalExtractIcon(HINSTANCE16
,LPCSTR
,UINT16
,WORD
);
26 /****************************************************************************
29 /****************************************************************************
32 #define SHELL_ERROR_SUCCESS 0L
33 #define SHELL_ERROR_BADDB 1L
34 #define SHELL_ERROR_BADKEY 2L
35 #define SHELL_ERROR_CANTOPEN 3L
36 #define SHELL_ERROR_CANTREAD 4L
37 #define SHELL_ERROR_CANTWRITE 5L
38 #define SHELL_ERROR_OUTOFMEMORY 6L
39 #define SHELL_ERROR_INVALID_PARAMETER 7L
40 #define SHELL_ERROR_ACCESS_DENIED 8L
42 /****************************************************************************
43 * common shell file structures
45 #define FO_MOVE 0x0001
46 #define FO_COPY 0x0002
47 #define FO_DELETE 0x0003
48 #define FO_RENAME 0x0004
50 #define FOF_MULTIDESTFILES 0x0001
51 #define FOF_CONFIRMMOUSE 0x0002
52 #define FOF_SILENT 0x0004
53 #define FOF_RENAMEONCOLLISION 0x0008
54 #define FOF_NOCONFIRMATION 0x0010
55 #define FOF_WANTMAPPINGHANDLE 0x0020
56 #define FOF_ALLOWUNDO 0x0040
57 #define FOF_FILESONLY 0x0080
58 #define FOF_SIMPLEPROGRESS 0x0100
59 #define FOF_NOCONFIRMMKDIR 0x0200
60 #define FOF_NOERRORUI 0x0400
62 typedef WORD FILEOP_FLAGS
;
64 #define PO_DELETE 0x0013
65 #define PO_RENAME 0x0014
66 #define PO_PORTCHANGE 0x0020
68 typedef WORD PRINTEROP_FLAGS
;
70 /******************************
73 typedef struct { /* structure for dropped files */
76 BOOL16 fInNonClientArea
;
77 /* memory block with filenames follows */
78 } DROPFILESTRUCT16
, *LPDROPFILESTRUCT16
;
80 typedef struct { /* structure for dropped files */
83 BOOL32 fInNonClientArea
;
85 /* memory block with filenames follows */
86 } DROPFILESTRUCT32
, *LPDROPFILESTRUCT32
;
88 DECL_WINELIB_TYPE(DROPFILESTRUCT
)
89 DECL_WINELIB_TYPE(LPDROPFILESTRUCT
)
91 void WINAPI
DragAcceptFiles16(HWND16 hWnd
, BOOL16 b
);
92 void WINAPI
DragAcceptFiles32(HWND32 hWnd
, BOOL32 b
);
93 #define DragAcceptFiles WINELIB_NAME(DragAcceptFiles)
94 UINT16 WINAPI
DragQueryFile16(HDROP16 hDrop
, WORD wFile
, LPSTR lpszFile
, WORD wLength
);
95 UINT32 WINAPI
DragQueryFile32A(HDROP32 hDrop
, UINT32 lFile
, LPSTR lpszFile
, UINT32 lLength
);
96 UINT32 WINAPI
DragQueryFile32W(HDROP32 hDrop
, UINT32 lFile
, LPWSTR lpszFile
, UINT32 lLength
);
97 #define DragQueryFile WINELIB_NAME_AW(DragQueryFile)
98 void WINAPI
DragFinish32(HDROP32 h
);
99 void WINAPI
DragFinish16(HDROP16 h
);
100 #define DragFinish WINELIB_NAME(DragFinish)
101 BOOL32 WINAPI
DragQueryPoint32(HDROP32 hDrop
, POINT32
*p
);
102 BOOL16 WINAPI
DragQueryPoint16(HDROP16 hDrop
, POINT16
*p
);
103 #define DragQueryPoint WINELIB_NAME(DragQueryPoint)
106 /****************************************************************************
109 typedef struct _NOTIFYICONDATA
{
114 UINT32 uCallbackMessage
;
117 } NOTIFYICONDATA
, *PNOTIFYICONDATA
;
119 /****************************************************************************
120 * SHITEMID, ITEMIDLIST, PIDL API
124 { WORD cb
; /* nr of bytes in this item */
125 BYTE abID
[1];/* first byte in this item */
126 } SHITEMID
,*LPSHITEMID
;
129 { SHITEMID mkid
; /* first itemid in list */
130 } ITEMIDLIST
,*LPITEMIDLIST
,*LPCITEMIDLIST
;
133 LPITEMIDLIST WINAPI
ILClone (LPCITEMIDLIST pidl
);
134 LPITEMIDLIST WINAPI
ILGetNext(LPITEMIDLIST pidl
);
135 LPITEMIDLIST WINAPI
ILCombine(LPCITEMIDLIST iil1
,LPCITEMIDLIST iil2
);
136 LPITEMIDLIST WINAPI
ILFindLastID(LPITEMIDLIST pidl
);
137 DWORD WINAPI
ILGetSize(LPITEMIDLIST pidl
);
139 DWORD WINAPI
SHGetPathFromIDList32A (LPCITEMIDLIST pidl
,LPSTR pszPath
);
140 DWORD WINAPI
SHGetPathFromIDList32W (LPCITEMIDLIST pidl
,LPWSTR pszPath
);
141 #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
143 /****************************************************************************
146 typedef struct tagSHFILEINFO32A
{
147 HICON32 hIcon
; /* icon */
148 int iIcon
; /* icon index */
149 DWORD dwAttributes
; /* SFGAO_ flags */
150 CHAR szDisplayName
[MAX_PATH
];/* display name (or path) */
151 CHAR szTypeName
[80]; /* type name */
154 typedef struct tagSHFILEINFO32W
{
155 HICON32 hIcon
; /* icon */
156 int iIcon
; /* icon index */
157 DWORD dwAttributes
; /* SFGAO_ flags */
158 WCHAR szDisplayName
[MAX_PATH
];/* display name (or path) */
159 WCHAR szTypeName
[80]; /* type name */
162 DECL_WINELIB_TYPE_AW(SHFILEINFO
)
164 DWORD WINAPI
SHGetFileInfo32A(LPCSTR
,DWORD
,SHFILEINFO32A
*,UINT32
,UINT32
);
165 DWORD WINAPI
SHGetFileInfo32W(LPCWSTR
,DWORD
,SHFILEINFO32W
*,UINT32
,UINT32
);
166 #define SHGetFileInfo WINELIB_NAME_AW(SHGetFileInfo)
168 /****************************************************************************
171 typedef struct _SHFILEOPSTRUCTA
177 BOOL32 fAnyOperationsAborted
;
178 LPVOID hNameMappings
;
179 LPCSTR lpszProgressTitle
;
180 } SHFILEOPSTRUCT32A
, *LPSHFILEOPSTRUCT32A
;
182 typedef struct _SHFILEOPSTRUCTW
188 BOOL32 fAnyOperationsAborted
;
189 LPVOID hNameMappings
;
190 LPCWSTR lpszProgressTitle
;
191 } SHFILEOPSTRUCT32W
, *LPSHFILEOPSTRUCT32W
;
193 #define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
194 #define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
196 DWORD WINAPI
SHFileOperation32A (LPSHFILEOPSTRUCT32A lpFileOp
);
197 DWORD WINAPI
SHFileOperation32W (LPSHFILEOPSTRUCT32W lpFileOp
);
198 #define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
200 DWORD WINAPI
SHFileOperation32(DWORD x
);
202 /****************************************************************************
205 typedef struct _AppBarData
{
208 UINT32 uCallbackMessage
;
212 } APPBARDATA
, *PAPPBARDATA
;
214 #define SHGFI_ICON 0x000000100 /* get icon */
215 #define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
216 #define SHGFI_TYPENAME 0x000000400 /* get type name */
217 #define SHGFI_ATTRIBUTES 0x000000800 /* get attributes */
218 #define SHGFI_ICONLOCATION 0x000001000 /* get icon location */
219 #define SHGFI_EXETYPE 0x000002000 /* return exe type */
220 #define SHGFI_SYSICONINDEX 0x000004000 /* get system icon index */
221 #define SHGFI_LINKOVERLAY 0x000008000 /* put a link overlay on icon */
222 #define SHGFI_SELECTED 0x000010000 /* show icon in selected state */
223 #define SHGFI_LARGEICON 0x000000000 /* get large icon */
224 #define SHGFI_SMALLICON 0x000000001 /* get small icon */
225 #define SHGFI_OPENICON 0x000000002 /* get open icon */
226 #define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
227 #define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
228 #define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
230 /****************************************************************************
231 * SHChangeNotifyRegister API
238 DWORD WINAPI
SHChangeNotifyRegister(HWND32 hwnd
,LONG events1
,LONG events2
,DWORD msg
,int count
,IDSTRUCT
*idlist
);
239 DWORD WINAPI
SHChangeNotifyDeregister(LONG x1
);
241 /****************************************************************************
242 * SHAddToRecentDocs API
244 #define SHARD_PIDL 0x00000001L
245 #define SHARD_PATH 0x00000002L
247 DWORD WINAPI
SHAddToRecentDocs(UINT32 uFlags
, LPCVOID pv
);
249 /****************************************************************************
250 * SHGetSpecialFolderLocation API
252 HRESULT WINAPI
SHGetSpecialFolderLocation(HWND32
, INT32
, LPITEMIDLIST
*);
253 /****************************************************************************
254 * string and path functions
256 LPSTR WINAPI
PathAddBackslash32A(LPSTR path
);
257 LPWSTR WINAPI
PathAddBackslash32W(LPWSTR path
);
258 #define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash)
259 LPVOID WINAPI
PathAddBackslash32AW(LPVOID path
);
261 LPSTR WINAPI
PathQuoteSpaces32A(LPCSTR path
);
262 LPWSTR WINAPI
PathQuoteSpaces32W(LPCWSTR path
);
263 #define PathQuoteSpaces WINELIB_NAME_AW(PathQuoteSpaces)
264 LPVOID WINAPI
PathQuoteSpaces32AW(LPCVOID path
);
266 LPSTR WINAPI
PathCombine32A(LPSTR szDest
, LPCSTR lpszDir
, LPCSTR lpszFile
);
267 LPWSTR WINAPI
PathCombine32W(LPWSTR szDest
, LPCWSTR lpszDir
, LPCWSTR lpszFile
);
268 #define PathCombine WINELIB_NAME_AW(PathCombine)
269 LPVOID WINAPI
PathCombine32AW(LPVOID szDest
, LPCVOID lpszDir
, LPCVOID lpszFile
);
271 LPCSTR WINAPI
PathFindExtension32A(LPCSTR path
);
272 LPCWSTR WINAPI
PathFindExtension32W(LPCWSTR path
);
273 #define PathFindExtension WINELIB_NAME_AW(PathFindExtension)
274 LPCVOID WINAPI
PathFindExtension32AW(LPCVOID path
);
276 LPCSTR WINAPI
PathGetExtension32A(LPCSTR path
, DWORD y
, DWORD x
);
277 LPCWSTR WINAPI
PathGetExtension32W(LPCWSTR path
, DWORD y
, DWORD x
);
278 #define PathGetExtension WINELIB_NAME_AW(PathGetExtension)
279 LPCVOID WINAPI
PathGetExtension32AW(LPCVOID path
, DWORD y
, DWORD x
);
281 LPCSTR WINAPI
PathFindFilename32A(LPCSTR path
);
282 LPCWSTR WINAPI
PathFindFilename32W(LPCWSTR path
);
283 #define PathFindFilename WINELIB_NAME_AW(PathFindFilename)
284 LPCVOID WINAPI
PathFindFilename32AW(LPCVOID path
);
286 BOOL32 WINAPI
PathMatchSpec32A(LPCSTR x
, LPCSTR y
);
287 BOOL32 WINAPI
PathMatchSpec32W(LPCWSTR x
, LPCWSTR y
);
288 #define PathMatchSpec WINELIB_NAME_AW(PathMatchSpec)
289 BOOL32 WINAPI
PathMatchSpec32AW(LPVOID x
, LPVOID y
);
291 LPSTR WINAPI
PathRemoveBlanks32A(LPSTR str
);
292 LPWSTR WINAPI
PathRemoveBlanks32W(LPWSTR str
);
293 #define PathRemoveBlanks WINELIB_NAME_AW(PathRemoveBlanks)
294 LPVOID WINAPI
PathRemoveBlanks32AW(LPVOID str
);
296 BOOL32 WINAPI
PathIsRelative32A(LPCSTR str
);
297 BOOL32 WINAPI
PathIsRelative32W(LPCWSTR str
);
298 #define PathIsRelative WINELIB_NAME_AW(PathIsRelative)
299 BOOL32 WINAPI
PathIsRelative32AW(LPCVOID str
);
301 BOOL32 WINAPI
PathIsUNC32A(LPCSTR str
);
302 BOOL32 WINAPI
PathIsUNC32W(LPCWSTR str
);
303 #define PathIsUNC WINELIB_NAME_AW(PathIsUNC)
304 BOOL32 WINAPI
PathIsUNC32AW(LPCVOID str
);
306 BOOL32 WINAPI
PathFindOnPath32A(LPSTR sFile
, LPCSTR sOtherDirs
);
307 BOOL32 WINAPI
PathFindOnPath32W(LPWSTR sFile
, LPCWSTR sOtherDirs
);
308 #define PathFindOnPath WINELIB_NAME_AW(PathFindOnPath)
309 BOOL32 WINAPI
PathFindOnPath32AW(LPVOID sFile
, LPCVOID sOtherDirs
);
311 LPSTR WINAPI
StrFormatByteSize32A ( DWORD dw
, LPSTR pszBuf
, UINT32 cchBuf
);
312 LPWSTR WINAPI
StrFormatByteSize32W ( DWORD dw
, LPWSTR pszBuf
, UINT32 cchBuf
);
313 #define StrFormatByteSize WINELIB_NAME_AW(StrFormatByteSize)
315 /****************************************************************************
318 HICON32 WINAPI
ExtractIconEx32A ( LPSTR
, INT32
, HICON32
*, HICON32
*, UINT32
);
319 HICON32 WINAPI
ExtractIconEx32W ( LPWSTR
, INT32
, HICON32
*, HICON32
*, UINT32
);
320 #define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
321 HICON32 WINAPI
ExtractIconEx32AW ( LPVOID
, INT32
, HICON32
*, HICON32
*, UINT32
);
323 LPVOID WINAPI
SHAlloc(DWORD len
);
324 DWORD WINAPI
SHFree(LPVOID x
);
326 #define SE_ERR_SHARE 26
327 #define SE_ERR_ASSOCINCOMPLETE 27
328 #define SE_ERR_DDETIMEOUT 28
329 #define SE_ERR_DDEFAIL 29
330 #define SE_ERR_DDEBUSY 30
331 #define SE_ERR_NOASSOC 31
333 #define CSIDL_DESKTOP 0x0000
334 #define CSIDL_PROGRAMS 0x0002
335 #define CSIDL_CONTROLS 0x0003
336 #define CSIDL_PRINTERS 0x0004
337 #define CSIDL_PERSONAL 0x0005
338 #define CSIDL_FAVORITES 0x0006
339 #define CSIDL_STARTUP 0x0007
340 #define CSIDL_RECENT 0x0008
341 #define CSIDL_SENDTO 0x0009
342 #define CSIDL_BITBUCKET 0x000a
343 #define CSIDL_STARTMENU 0x000b
344 #define CSIDL_DESKTOPDIRECTORY 0x0010
345 #define CSIDL_DRIVES 0x0011
346 #define CSIDL_NETWORK 0x0012
347 #define CSIDL_NETHOOD 0x0013
348 #define CSIDL_FONTS 0x0014
349 #define CSIDL_TEMPLATES 0x0015
350 #define CSIDL_COMMON_STARTMENU 0x0016
351 #define CSIDL_COMMON_PROGRAMS 0X0017
352 #define CSIDL_COMMON_STARTUP 0x0018
353 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
354 #define CSIDL_APPDATA 0x001a
355 #define CSIDL_PRINTHOOD 0x001b
358 #endif /* __WINE_SHELL_H */