Implemented QueryServiceConfigA.
[wine.git] / dlls / shell32 / undocshell.h
blob9eaafb685df12a4b2c25be5b6b88c5f832e9d821
1 /*
2 * Copyright 1999, 2000 Juergen Schmied
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_UNDOCSHELL_H
20 #define __WINE_UNDOCSHELL_H
22 #include <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winuser.h"
27 #include "commctrl.h"
28 #include "shlobj.h"
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* defined(__cplusplus) */
34 /****************************************************************************
35 * IDList Functions
37 BOOL WINAPI ILGetDisplayName(
38 LPCITEMIDLIST pidl,
39 LPVOID path);
41 /* type parameter for ILGetDisplayNameEx() */
42 #define ILGDN_FORPARSING 0
43 #define ILGDN_NORMAL 1
44 #define ILGDN_INFOLDER 2
46 BOOL WINAPI ILGetDisplayNameEx(
47 LPSHELLFOLDER psf,
48 LPCITEMIDLIST pidl,
49 LPVOID path,
50 DWORD type);
52 LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl);
53 void WINAPI ILGlobalFree(LPITEMIDLIST pidl);
55 LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath);
56 LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath);
58 HRESULT WINAPI SHILCreateFromPathA (
59 LPCSTR path,
60 LPITEMIDLIST * ppidl,
61 DWORD *attributes);
63 HRESULT WINAPI SHILCreateFromPathW (
64 LPCWSTR path,
65 LPITEMIDLIST * ppidl,
66 DWORD *attributes);
68 LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR path);
69 LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path);
72 string functions
74 BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
75 BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
78 /****************************************************************************
79 * SHChangeNotifyRegister API
81 #define SHCNRF_InterruptLevel 0x0001
82 #define SHCNRF_ShellLevel 0x0002
83 #define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */
84 #define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */
86 /****************************************************************************
87 * Shell Common Dialogs
90 BOOL WINAPI PickIconDlg(
91 HWND hwndOwner,
92 LPSTR lpstrFile,
93 DWORD nMaxFile,
94 LPDWORD lpdwIconIndex);
96 /* RunFileDlg flags */
97 #define RFF_NOBROWSE 0x01
98 #define RFF_NODEFAULT 0x02
99 #define RFF_CALCDIRECTORY 0x04
100 #define RFF_NOLABEL 0x08
101 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
103 /* RunFileFlg notification structure */
104 typedef struct
106 NMHDR hdr;
107 LPCSTR lpFile;
108 LPCSTR lpDirectory;
109 int nShow;
110 } NM_RUNFILEDLG, * LPNM_RUNFILEDLG;
112 /* RunFileDlg notification return values */
113 #define RF_OK 0x00
114 #define RF_CANCEL 0x01
115 #define RF_RETRY 0x02
117 void WINAPI RunFileDlg(
118 HWND hwndOwner,
119 HICON hIcon,
120 LPCSTR lpstrDirectory,
121 LPCSTR lpstrTitle,
122 LPCSTR lpstrDescription,
123 UINT uFlags);
125 void WINAPI ExitWindowsDialog(HWND hwndOwner);
127 BOOL WINAPI GetFileNameFromBrowse(
128 HWND hwndOwner,
129 LPSTR lpstrFile,
130 DWORD nMaxFile,
131 LPCSTR lpstrInitialDir,
132 LPCSTR lpstrDefExt,
133 LPCSTR lpstrFilter,
134 LPCSTR lpstrTitle);
136 BOOL WINAPI SHFindComputer(
137 LPCITEMIDLIST pidlRoot,
138 LPCITEMIDLIST pidlSavedSearch);
140 void WINAPI SHHandleDiskFull(HWND hwndOwner,
141 UINT uDrive);
143 int WINAPI SHOutOfMemoryMessageBox(
144 HWND hwndOwner,
145 LPCSTR lpCaption,
146 UINT uType);
148 DWORD WINAPI SHNetConnectionDialog(
149 HWND hwndOwner,
150 LPCSTR lpstrRemoteName,
151 DWORD dwType);
153 /****************************************************************************
154 * Memory Routines
157 /* The Platform SDK's shlobj.h header defines similar functions with a
158 * leading underscore. However those are unusable because of the leading
159 * underscore, because they have an incorrect calling convention, and
160 * because these functions are not exported by name anyway.
162 HANDLE WINAPI SHAllocShared(
163 LPVOID pv,
164 ULONG cb,
165 DWORD pid);
167 BOOL WINAPI SHFreeShared(
168 HANDLE hMem,
169 DWORD pid);
171 LPVOID WINAPI SHLockShared(
172 HANDLE hMem,
173 DWORD pid);
175 BOOL WINAPI SHUnlockShared(LPVOID pv);
177 /****************************************************************************
178 * Cabinet Window Messages
181 #define CWM_SETPATH (WM_USER + 2)
182 #define CWM_WANTIDLE (WM_USER + 3)
183 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
184 #define CWM_SELECTITEM (WM_USER + 5)
185 #define CWM_SELECTITEMSTR (WM_USER + 6)
186 #define CWM_GETISHELLBROWSER (WM_USER + 7)
187 #define CWM_TESTPATH (WM_USER + 9)
188 #define CWM_STATECHANGE (WM_USER + 10)
189 #define CWM_GETPATH (WM_USER + 12)
191 /* CWM_TESTPATH types */
192 #define CWTP_ISEQUAL 0
193 #define CWTP_ISCHILD 1
195 /* CWM_TESTPATH structure */
196 typedef struct
198 DWORD dwType;
199 ITEMIDLIST idl;
200 } CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT;
202 /****************************************************************************
203 * System Imagelist Routines
206 int WINAPI Shell_GetCachedImageIndex(
207 LPCSTR lpszFileName,
208 UINT nIconIndex,
209 BOOL bSimulateDoc);
211 BOOL WINAPI Shell_GetImageLists(
212 HIMAGELIST *lphimlLarge,
213 HIMAGELIST *lphimlSmall);
215 HICON WINAPI SHGetFileIcon(
216 DWORD dwReserved,
217 LPCSTR lpszPath,
218 DWORD dwFileAttributes,
219 UINT uFlags);
221 BOOL WINAPI FileIconInit(BOOL bFullInit);
223 /****************************************************************************
224 * File Menu Routines
226 /* FileMenu_Create nSelHeight constants */
227 #define FM_DEFAULT_SELHEIGHT -1
228 #define FM_FULL_SELHEIGHT 0
230 /* FileMenu_Create flags */
231 #define FMF_SMALL_ICONS 0x00
232 #define FMF_LARGE_ICONS 0x08
233 #define FMF_NO_COLUMN_BREAK 0x10
235 HMENU WINAPI FileMenu_Create(
236 COLORREF crBorderColor,
237 int nBorderWidth,
238 HBITMAP hBorderBmp,
239 int nSelHeight,
240 UINT uFlags);
242 void WINAPI FileMenu_Destroy(HMENU hMenu);
244 /* FileMenu_AppendItem constants */
245 #define FM_SEPARATOR (LPCSTR)1
246 #define FM_BLANK_ICON -1
247 #define FM_DEFAULT_HEIGHT 0
249 BOOL WINAPI FileMenu_AppendItem(
250 HMENU hMenu,
251 LPCSTR lpszText,
252 UINT uID,
253 int iIcon,
254 HMENU hMenuPopup,
255 int nItemHeight);
257 /* FileMenu_InsertUsingPidl flags */
258 #define FMF_NO_EMPTY_ITEM 0x01
259 #define FMF_NO_PROGRAM_GROUPS 0x04
261 /* FileMenu_InsertUsingPidl callback function */
262 typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
264 int WINAPI FileMenu_InsertUsingPidl(
265 HMENU hMenu,
266 UINT uID,
267 LPCITEMIDLIST pidl,
268 UINT uFlags,
269 UINT uEnumFlags,
270 LPFNFMCALLBACK lpfnCallback);
272 int WINAPI FileMenu_ReplaceUsingPidl(
273 HMENU hMenu,
274 UINT uID,
275 LPCITEMIDLIST pidl,
276 UINT uEnumFlags,
277 LPFNFMCALLBACK lpfnCallback);
279 void WINAPI FileMenu_Invalidate(HMENU hMenu);
281 HMENU WINAPI FileMenu_FindSubMenuByPidl(
282 HMENU hMenu,
283 LPCITEMIDLIST pidl);
285 BOOL WINAPI FileMenu_TrackPopupMenuEx(
286 HMENU hMenu,
287 UINT uFlags,
288 int x,
289 int y,
290 HWND hWnd,
291 LPTPMPARAMS lptpm);
293 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
294 UINT uReserved,
295 LPCITEMIDLIST *ppidlFolder,
296 LPCITEMIDLIST *ppidlItem);
298 LRESULT WINAPI FileMenu_MeasureItem(
299 HWND hWnd,
300 LPMEASUREITEMSTRUCT lpmis);
302 LRESULT WINAPI FileMenu_DrawItem(
303 HWND hWnd,
304 LPDRAWITEMSTRUCT lpdis);
306 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
308 void WINAPI FileMenu_AbortInitMenu(void);
310 LRESULT WINAPI FileMenu_HandleMenuChar(
311 HMENU hMenu,
312 WPARAM wParam);
314 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
316 BOOL WINAPI FileMenu_DeleteItemByCmd(
317 HMENU hMenu,
318 UINT uID);
320 BOOL WINAPI FileMenu_DeleteItemByIndex(
321 HMENU hMenu,
322 UINT uPos);
324 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
325 HMENU hMenu,
326 UINT uID);
328 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
330 BOOL WINAPI FileMenu_EnableItemByCmd(
331 HMENU hMenu,
332 UINT uID,
333 BOOL bEnable);
335 DWORD WINAPI FileMenu_GetItemExtent(
336 HMENU hMenu,
337 UINT uPos);
339 int WINAPI FileMenu_AppendFilesForPidl(
340 HMENU hMenu,
341 LPCITEMIDLIST pidl,
342 BOOL bAddSeparator);
344 int WINAPI FileMenu_AddFilesForPidl(
345 HMENU hMenu,
346 UINT uReserved,
347 UINT uID,
348 LPCITEMIDLIST pidl,
349 UINT uFlags,
350 UINT uEnumFlags,
351 LPFNFMCALLBACK lpfnCallback);
353 /****************************************************************************
354 * Drag And Drop Routines
357 HRESULT WINAPI SHRegisterDragDrop(
358 HWND hWnd,
359 LPDROPTARGET lpDropTarget);
361 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
363 BOOL WINAPI DAD_DragEnter(HWND hWnd);
365 BOOL WINAPI DAD_SetDragImageFromListView(
366 HWND hWnd,
367 POINT pt);
369 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
371 HRESULT WINAPI CIDLData_CreateFromIDArray(
372 LPCITEMIDLIST pidlFolder,
373 DWORD cpidlFiles,
374 LPCITEMIDLIST *lppidlFiles,
375 LPDATAOBJECT *ppdataObject);
377 /****************************************************************************
378 * Path Manipulation Routines
381 BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2);
383 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
385 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
387 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
389 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
391 LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
393 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2);
395 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
397 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath);
399 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
401 VOID WINAPI PathQuoteSpacesAW(LPVOID path);
403 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
405 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
407 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
409 BOOL WINAPI PathIsRootAW(LPCVOID x);
411 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
413 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
415 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
417 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
419 BOOL WINAPI PathMakeUniqueNameAW(
420 LPVOID lpszBuffer,
421 DWORD dwBuffSize,
422 LPCVOID lpszShortName,
423 LPCVOID lpszLongName,
424 LPCVOID lpszPathName);
426 BOOL WINAPI PathYetAnotherMakeUniqueName(
427 LPWSTR lpszBuffer,
428 LPCWSTR lpszPathName,
429 LPCWSTR lpszShortName,
430 LPCWSTR lpszLongName);
432 /* PathCleanupSpec return values */
433 #define PCS_REPLACEDCHARS 0x00000001
434 #define PCS_REMOVEDCHARS 0x00000002
435 #define PCS_SHORTENED 0x00000004
436 #define PCS_PATHTOOLONG 0x80000008
438 DWORD WINAPI PathCleanupSpecAW(LPCVOID lpszPath, LPVOID lpszFile);
440 BOOL WINAPI PathQualifyA(LPCSTR path);
441 BOOL WINAPI PathQualifyW(LPCWSTR path);
442 #define PathQualify WINELIB_NAME_AW(PathQualify)
443 BOOL WINAPI PathQualifyAW(LPCVOID path);
446 /* PathResolve flags */
447 #define PRF_CHECKEXISTANCE 0x01
448 #define PRF_EXECUTABLE 0x02
449 #define PRF_QUALIFYONPATH 0x04
450 #define PRF_WINDOWS31 0x08
452 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
454 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
456 /* PathProcessCommand flags */
457 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
458 #define PPCF_INCLUDEARGS 0x02
459 #define PPCF_NODIRECTORIES 0x10
460 #define PPCF_DONTRESOLVE 0x20
461 #define PPCF_PATHISRELATIVE 0x40
463 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
464 DWORD dwBuffSize, DWORD dwFlags);
466 void WINAPI PathStripPathAW(LPVOID lpszPath);
468 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
470 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
472 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
474 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
476 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
478 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs);
480 /****************************************************************************
481 * Shell Namespace Routines
484 /* Generic structure used by several messages */
485 typedef struct
487 DWORD dwReserved;
488 DWORD dwReserved2;
489 LPCITEMIDLIST pidl;
490 LPDWORD lpdwUser;
491 } SFVCBINFO, * LPSFVCBINFO;
492 typedef const SFVCBINFO * LPCSFVCBINFO;
494 /* SFVCB_SELECTIONCHANGED structure */
495 typedef struct
497 UINT uOldState;
498 UINT uNewState;
499 LPCITEMIDLIST pidl;
500 LPDWORD lpdwUser;
501 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
502 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
504 /* SFVCB_COPYHOOKCALLBACK structure */
505 typedef struct
507 HWND hwnd;
508 UINT wFunc;
509 UINT wFlags;
510 LPCSTR pszSrcFile;
511 DWORD dwSrcAttribs;
512 LPCSTR pszDestFile;
513 DWORD dwDestAttribs;
514 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
515 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
517 /* SFVCB_GETDETAILSOF structure */
518 typedef struct
520 LPCITEMIDLIST pidl;
521 int fmt;
522 int cx;
523 STRRET lpText;
524 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
526 /****************************************************************************
527 * Misc Stuff
530 /* SHWaitForFileToOpen flags */
531 #define SHWFF_ADD 0x01
532 #define SHWFF_REMOVE 0x02
533 #define SHWFF_WAIT 0x04
535 BOOL WINAPI SHWaitForFileToOpen(
536 LPCITEMIDLIST pidl,
537 DWORD dwFlags,
538 DWORD dwTimeout);
540 WORD WINAPI ArrangeWindows(
541 HWND hwndParent,
542 DWORD dwReserved,
543 LPCRECT lpRect,
544 WORD cKids,
545 CONST HWND * lpKids);
547 /* RegisterShellHook types */
548 #define RSH_DEREGISTER 0
549 #define RSH_REGISTER 1
550 #define RSH_REGISTER_PROGMAN 2
551 #define RSH_REGISTER_TASKMAN 3
553 BOOL WINAPI RegisterShellHook(
554 HWND hWnd,
555 DWORD dwType);
557 /* SHCreateDefClassObject callback function */
558 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
559 LPUNKNOWN pUnkOuter,
560 REFIID riidObject,
561 LPVOID *ppvObject);
563 HRESULT WINAPI SHCreateDefClassObject(
564 REFIID riidFactory,
565 LPVOID *ppvFactory,
566 LPFNCDCOCALLBACK lpfnCallback,
567 LPDWORD lpdwUsage,
568 REFIID riidObject);
570 void WINAPI SHFreeUnusedLibraries();
572 /* SHCreateLinks flags */
573 #define SHCLF_PREFIXNAME 0x01
574 #define SHCLF_CREATEONDESKTOP 0x02
576 HRESULT WINAPI SHCreateLinks(
577 HWND hWnd,
578 LPCSTR lpszDir,
579 LPDATAOBJECT lpDataObject,
580 UINT uFlags,
581 LPITEMIDLIST *lppidlLinks);
583 DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len);
584 DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
586 /* policy functions */
587 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
589 #ifdef __cplusplus
590 } /* extern "C" */
591 #endif /* defined(__cplusplus) */
593 #endif /* __WINE_UNDOCSHELL_H */