2 * Shell Library definitions
10 /****************************************************************************
13 extern void SHELL_LoadRegistry(void);
14 extern void SHELL_SaveRegistry(void);
15 extern void SHELL_Init(void);
17 /* global functions used from shell32 */
18 extern HINSTANCE
SHELL_FindExecutable(LPCSTR
,LPCSTR
,LPSTR
);
19 extern HGLOBAL16 WINAPI
InternalExtractIcon16(HINSTANCE16
,LPCSTR
,UINT16
,WORD
);
21 /****************************************************************************
24 /****************************************************************************
27 #define SHELL_ERROR_SUCCESS 0L
28 #define SHELL_ERROR_BADDB 1L
29 #define SHELL_ERROR_BADKEY 2L
30 #define SHELL_ERROR_CANTOPEN 3L
31 #define SHELL_ERROR_CANTREAD 4L
32 #define SHELL_ERROR_CANTWRITE 5L
33 #define SHELL_ERROR_OUTOFMEMORY 6L
34 #define SHELL_ERROR_INVALID_PARAMETER 7L
35 #define SHELL_ERROR_ACCESS_DENIED 8L
37 /****************************************************************************
38 * common shell file structures
40 #define FO_MOVE 0x0001
41 #define FO_COPY 0x0002
42 #define FO_DELETE 0x0003
43 #define FO_RENAME 0x0004
45 #define FOF_MULTIDESTFILES 0x0001
46 #define FOF_CONFIRMMOUSE 0x0002
47 #define FOF_SILENT 0x0004
48 #define FOF_RENAMEONCOLLISION 0x0008
49 #define FOF_NOCONFIRMATION 0x0010
50 #define FOF_WANTMAPPINGHANDLE 0x0020
51 #define FOF_ALLOWUNDO 0x0040
52 #define FOF_FILESONLY 0x0080
53 #define FOF_SIMPLEPROGRESS 0x0100
54 #define FOF_NOCONFIRMMKDIR 0x0200
55 #define FOF_NOERRORUI 0x0400
57 typedef WORD FILEOP_FLAGS
;
59 #define PO_DELETE 0x0013
60 #define PO_RENAME 0x0014
61 #define PO_PORTCHANGE 0x0020
63 typedef WORD PRINTEROP_FLAGS
;
65 /******************************
68 typedef struct { /* structure for dropped files */
71 BOOL16 fInNonClientArea
;
72 /* memory block with filenames follows */
73 } DROPFILESTRUCT16
, *LPDROPFILESTRUCT16
;
75 typedef struct { /* structure for dropped files */
78 BOOL fInNonClientArea
;
80 /* memory block with filenames follows */
81 } DROPFILESTRUCT
, *LPDROPFILESTRUCT
;
84 void WINAPI
DragAcceptFiles16(HWND16 hWnd
, BOOL16 b
);
85 void WINAPI
DragAcceptFiles(HWND hWnd
, BOOL b
);
86 UINT16 WINAPI
DragQueryFile16(HDROP16 hDrop
, WORD wFile
, LPSTR lpszFile
, WORD wLength
);
87 UINT WINAPI
DragQueryFileA(HDROP hDrop
, UINT lFile
, LPSTR lpszFile
, UINT lLength
);
88 UINT WINAPI
DragQueryFileW(HDROP hDrop
, UINT lFile
, LPWSTR lpszFile
, UINT lLength
);
89 #define DragQueryFile WINELIB_NAME_AW(DragQueryFile)
90 void WINAPI
DragFinish(HDROP h
);
91 void WINAPI
DragFinish16(HDROP16 h
);
92 BOOL WINAPI
DragQueryPoint(HDROP hDrop
, POINT
*p
);
93 BOOL16 WINAPI
DragQueryPoint16(HDROP16 hDrop
, POINT16
*p
);
96 /****************************************************************************
99 typedef struct _NOTIFYICONDATA
{
104 UINT uCallbackMessage
;
107 } NOTIFYICONDATA
, *PNOTIFYICONDATA
;
109 /****************************************************************************
110 * SHITEMID, ITEMIDLIST, PIDL API
114 { WORD cb
; /* nr of bytes in this item */
115 BYTE abID
[1];/* first byte in this item */
116 } SHITEMID
,*LPSHITEMID
;
119 { SHITEMID mkid
; /* first itemid in list */
120 } ITEMIDLIST
,*LPITEMIDLIST
,*LPCITEMIDLIST
;
123 DWORD WINAPI
SHGetPathFromIDListA (LPCITEMIDLIST pidl
,LPSTR pszPath
);
124 DWORD WINAPI
SHGetPathFromIDListW (LPCITEMIDLIST pidl
,LPWSTR pszPath
);
125 #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
127 /****************************************************************************
130 typedef struct tagSHFILEINFOA
{
131 HICON hIcon
; /* icon */
132 int iIcon
; /* icon index */
133 DWORD dwAttributes
; /* SFGAO_ flags */
134 CHAR szDisplayName
[MAX_PATH
];/* display name (or path) */
135 CHAR szTypeName
[80]; /* type name */
138 typedef struct tagSHFILEINFOW
{
139 HICON hIcon
; /* icon */
140 int iIcon
; /* icon index */
141 DWORD dwAttributes
; /* SFGAO_ flags */
142 WCHAR szDisplayName
[MAX_PATH
];/* display name (or path) */
143 WCHAR szTypeName
[80]; /* type name */
146 DECL_WINELIB_TYPE_AW(SHFILEINFO
)
148 DWORD WINAPI
SHGetFileInfoA(LPCSTR
,DWORD
,SHFILEINFOA
*,UINT
,UINT
);
149 DWORD WINAPI
SHGetFileInfoW(LPCWSTR
,DWORD
,SHFILEINFOW
*,UINT
,UINT
);
150 #define SHGetFileInfo WINELIB_NAME_AW(SHGetFileInfo)
152 /****************************************************************************
155 typedef struct _SHFILEOPSTRUCTA
161 BOOL fAnyOperationsAborted
;
162 LPVOID hNameMappings
;
163 LPCSTR lpszProgressTitle
;
164 } SHFILEOPSTRUCTA
, *LPSHFILEOPSTRUCTA
;
166 typedef struct _SHFILEOPSTRUCTW
172 BOOL fAnyOperationsAborted
;
173 LPVOID hNameMappings
;
174 LPCWSTR lpszProgressTitle
;
175 } SHFILEOPSTRUCTW
, *LPSHFILEOPSTRUCTW
;
177 #define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
178 #define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
180 DWORD WINAPI
SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp
);
181 DWORD WINAPI
SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp
);
182 #define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
184 DWORD WINAPI
SHFileOperationAW(DWORD x
);
186 /****************************************************************************
189 typedef struct _AppBarData
{
192 UINT uCallbackMessage
;
196 } APPBARDATA
, *PAPPBARDATA
;
198 #define SHGFI_LARGEICON 0x000000000 /* get large icon */
199 #define SHGFI_SMALLICON 0x000000001 /* get small icon */
200 #define SHGFI_OPENICON 0x000000002 /* get open icon */
201 #define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
202 #define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
203 #define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
204 #define SHGFI_UNKNOWN1 0x000000020
205 #define SHGFI_UNKNOWN2 0x000000040
206 #define SHGFI_UNKNOWN3 0x000000080
207 #define SHGFI_ICON 0x000000100 /* get icon */
208 #define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
209 #define SHGFI_TYPENAME 0x000000400 /* get type name */
210 #define SHGFI_ATTRIBUTES 0x000000800 /* get attributes */
211 #define SHGFI_ICONLOCATION 0x000001000 /* get icon location */
212 #define SHGFI_EXETYPE 0x000002000 /* return exe type */
213 #define SHGFI_SYSICONINDEX 0x000004000 /* get system icon index */
214 #define SHGFI_LINKOVERLAY 0x000008000 /* put a link overlay on icon */
215 #define SHGFI_SELECTED 0x000010000 /* show icon in selected state */
216 #define SHGFI_ATTR_SPECIFIED 0x000020000 /* get only specified attributes */
218 /****************************************************************************
219 * SHChangeNotifyRegister API
226 DWORD WINAPI
SHChangeNotifyRegister(HWND hwnd
,LONG events1
,LONG events2
,DWORD msg
,int count
,IDSTRUCT
*idlist
);
227 DWORD WINAPI
SHChangeNotifyDeregister(LONG x1
);
229 /****************************************************************************
230 * SHAddToRecentDocs API
232 #define SHARD_PIDL 0x00000001L
233 #define SHARD_PATH 0x00000002L
235 DWORD WINAPI
SHAddToRecentDocs(UINT uFlags
, LPCVOID pv
);
237 /****************************************************************************
238 * SHGetSpecialFolderLocation API
240 HRESULT WINAPI
SHGetSpecialFolderLocation(HWND
, INT
, LPITEMIDLIST
*);
241 /****************************************************************************
242 * string and path functions
244 BOOL WINAPI
PathIsRootA(LPCSTR x
);
245 BOOL WINAPI
PathIsRootW(LPCWSTR x
);
246 #define PathIsRoot WINELIB_NAME_AW(PathIsRoot)
247 BOOL WINAPI
PathIsRootAW(LPCVOID x
);
249 LPSTR WINAPI
PathAddBackslashA(LPSTR path
);
250 LPWSTR WINAPI
PathAddBackslashW(LPWSTR path
);
251 #define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash)
252 LPVOID WINAPI
PathAddBackslashAW(LPVOID path
);
254 BOOL WINAPI
PathQualifyA(LPCSTR path
);
255 BOOL WINAPI
PathQualifyW(LPCWSTR path
);
256 #define PathQualify WINELIB_NAME_AW(PathQualify)
257 BOOL WINAPI
PathQualifyAW(LPCVOID path
);
259 LPSTR WINAPI
PathQuoteSpacesA(LPCSTR path
);
260 LPWSTR WINAPI
PathQuoteSpacesW(LPCWSTR path
);
261 #define PathQuoteSpaces WINELIB_NAME_AW(PathQuoteSpaces)
262 LPVOID WINAPI
PathQuoteSpacesAW(LPCVOID path
);
264 LPSTR WINAPI
PathCombineA(LPSTR szDest
, LPCSTR lpszDir
, LPCSTR lpszFile
);
265 LPWSTR WINAPI
PathCombineW(LPWSTR szDest
, LPCWSTR lpszDir
, LPCWSTR lpszFile
);
266 #define PathCombine WINELIB_NAME_AW(PathCombine)
267 LPVOID WINAPI
PathCombineAW(LPVOID szDest
, LPCVOID lpszDir
, LPCVOID lpszFile
);
269 LPCSTR WINAPI
PathFindExtensionA(LPCSTR path
);
270 LPCWSTR WINAPI
PathFindExtensionW(LPCWSTR path
);
271 #define PathFindExtension WINELIB_NAME_AW(PathFindExtension)
272 LPCVOID WINAPI
PathFindExtensionAW(LPCVOID path
);
274 LPCSTR WINAPI
PathGetExtensionA(LPCSTR path
, DWORD y
, DWORD x
);
275 LPCWSTR WINAPI
PathGetExtensionW(LPCWSTR path
, DWORD y
, DWORD x
);
276 #define PathGetExtension WINELIB_NAME_AW(PathGetExtension)
277 LPCVOID WINAPI
PathGetExtensionAW(LPCVOID path
, DWORD y
, DWORD x
);
279 LPCSTR WINAPI
PathFindFilenameA(LPCSTR path
);
280 LPCWSTR WINAPI
PathFindFilenameW(LPCWSTR path
);
281 #define PathFindFilename WINELIB_NAME_AW(PathFindFilename)
282 LPCVOID WINAPI
PathFindFilenameAW(LPCVOID path
);
284 BOOL WINAPI
PathMatchSpecA(LPCSTR x
, LPCSTR y
);
285 BOOL WINAPI
PathMatchSpecW(LPCWSTR x
, LPCWSTR y
);
286 #define PathMatchSpec WINELIB_NAME_AW(PathMatchSpec)
287 BOOL WINAPI
PathMatchSpecAW(LPVOID x
, LPVOID y
);
289 LPSTR WINAPI
PathRemoveBlanksA(LPSTR str
);
290 LPWSTR WINAPI
PathRemoveBlanksW(LPWSTR str
);
291 #define PathRemoveBlanks WINELIB_NAME_AW(PathRemoveBlanks)
292 LPVOID WINAPI
PathRemoveBlanksAW(LPVOID str
);
294 BOOL WINAPI
PathIsRelativeA(LPCSTR str
);
295 BOOL WINAPI
PathIsRelativeW(LPCWSTR str
);
296 #define PathIsRelative WINELIB_NAME_AW(PathIsRelative)
297 BOOL WINAPI
PathIsRelativeAW(LPCVOID str
);
299 BOOL WINAPI
PathIsUNCA(LPCSTR str
);
300 BOOL WINAPI
PathIsUNCW(LPCWSTR str
);
301 #define PathIsUNC WINELIB_NAME_AW(PathIsUNC)
302 BOOL WINAPI
PathIsUNCAW(LPCVOID str
);
304 BOOL WINAPI
PathFindOnPathA(LPSTR sFile
, LPCSTR sOtherDirs
);
305 BOOL WINAPI
PathFindOnPathW(LPWSTR sFile
, LPCWSTR sOtherDirs
);
306 #define PathFindOnPath WINELIB_NAME_AW(PathFindOnPath)
307 BOOL WINAPI
PathFindOnPathAW(LPVOID sFile
, LPCVOID sOtherDirs
);
309 LPSTR WINAPI
StrFormatByteSizeA ( DWORD dw
, LPSTR pszBuf
, UINT cchBuf
);
310 LPWSTR WINAPI
StrFormatByteSizeW ( DWORD dw
, LPWSTR pszBuf
, UINT cchBuf
);
311 #define StrFormatByteSize WINELIB_NAME_AW(StrFormatByteSize)
313 /****************************************************************************
316 HICON16 WINAPI
ExtractIconEx16 ( LPCSTR
, INT16
, HICON16
*, HICON16
*, UINT16
);
317 HICON WINAPI
ExtractIconExA( LPCSTR
, INT
, HICON
*, HICON
*, UINT
);
318 HICON WINAPI
ExtractIconExW( LPCWSTR
, INT
, HICON
*, HICON
*, UINT
);
319 #define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
320 HICON WINAPI
ExtractIconExAW(LPCVOID
, INT
, HICON
*, HICON
*, UINT
);
322 LPVOID WINAPI
SHAlloc(DWORD len
);
323 DWORD WINAPI
SHFree(LPVOID x
);
325 #define SE_ERR_SHARE 26
326 #define SE_ERR_ASSOCINCOMPLETE 27
327 #define SE_ERR_DDETIMEOUT 28
328 #define SE_ERR_DDEFAIL 29
329 #define SE_ERR_DDEBUSY 30
330 #define SE_ERR_NOASSOC 31
332 #define CSIDL_DESKTOP 0x0000
333 #define CSIDL_PROGRAMS 0x0002
334 #define CSIDL_CONTROLS 0x0003
335 #define CSIDL_PRINTERS 0x0004
336 #define CSIDL_PERSONAL 0x0005
337 #define CSIDL_FAVORITES 0x0006
338 #define CSIDL_STARTUP 0x0007
339 #define CSIDL_RECENT 0x0008
340 #define CSIDL_SENDTO 0x0009
341 #define CSIDL_BITBUCKET 0x000a
342 #define CSIDL_STARTMENU 0x000b
343 #define CSIDL_DESKTOPDIRECTORY 0x0010
344 #define CSIDL_DRIVES 0x0011
345 #define CSIDL_NETWORK 0x0012
346 #define CSIDL_NETHOOD 0x0013
347 #define CSIDL_FONTS 0x0014
348 #define CSIDL_TEMPLATES 0x0015
349 #define CSIDL_COMMON_STARTMENU 0x0016
350 #define CSIDL_COMMON_PROGRAMS 0X0017
351 #define CSIDL_COMMON_STARTUP 0x0018
352 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
353 #define CSIDL_APPDATA 0x001a
354 #define CSIDL_PRINTHOOD 0x001b
355 #define CSIDL_ALTSTARTUP 0x001d
356 #define CSIDL_COMMON_ALTSTARTUP 0x001e
357 #define CSIDL_COMMON_FAVORITES 0x001f
358 #define CSIDL_INTERNET_CACHE 0x0020
359 #define CSIDL_COOKIES 0x0021
360 #define CSIDL_HISTORY 0x0022
362 #endif /* __WINE_SHELL_H */