34#define NO_SHLWAPI_STREAM
85#define add_flag(a) if (flags & a) {strcat(str, #a );strcat(str," ");}
102 FE(SBSP_EXPLOREMODE),
104 FE(SBSP_NOTRANSFERHIST),
109 FE(SBSP_NAVIGATEBACK),
110 FE(SBSP_NAVIGATEFORWARD),
111 FE(SBSP_ALLOW_AUTONAVIGATE),
113 FE(SBSP_NOAUTOSELECT),
114 FE(SBSP_WRITENOHISTORY),
117 FE(SBSP_INITIATEDBYHLINKFRAME),
120 TRACE(
"SBSP Flags: %08x =", uflags);
130 LPSHELLFOLDER psfDesktop;
139 SHGDN_FORPARSING, &strret);
151 IShellFolder_Release(psfDesktop);
181 FIXME(
"unknown type!\n");
206 sb->hwndOwner = hwndOwner;
217 return &
sb->IShellBrowser_iface;
232 *ppvObj = &
This->IShellBrowser_iface;
234 *ppvObj = &
This->IShellBrowser_iface;
236 *ppvObj = &
This->IShellBrowser_iface;
238 *ppvObj = &
This->ICommDlgBrowser_iface;
240 *ppvObj = &
This->IServiceProvider_iface;
243 IUnknown_AddRef((
IUnknown*)*ppvObj);
308 *phwnd =
This->hwndOwner;
362 if(
wFlags & SBSP_RELATIVE)
366 if (
FAILED(hRes = IShellFolder_BindToObject(fodInfos->
Shell.FOIShellFolder,
367 pidl,
NULL, &IID_IShellFolder, (
void **)&
folder)))
369 ERR(
"bind to object failed\n");
375 else if(
wFlags & SBSP_PARENT)
390 ERR(
"could not browse to folder\n");
399 IShellFolder_Release(
folder);
401 TRACE(
"keep current folder\n");
406 if (fodInfos->
Shell.FOIDataObject)
408 IDataObject_Release(fodInfos->
Shell.FOIDataObject);
413 TRACE(
"create view object\n");
415 &IID_IShellView, (
void **)&psvTmp)))
417 IShellFolder_Release(
folder);
426 if(fodInfos->
Shell.FOIShellView)
427 IShellView_GetCurrentInfo(fodInfos->
Shell.FOIShellView, &fodInfos->
ShellInfos.folderSettings);
432 if(fodInfos->
Shell.FOIShellView)
434 IShellView_DestroyViewWindow(fodInfos->
Shell.FOIShellView);
435 IShellView_Release(fodInfos->
Shell.FOIShellView);
437 fodInfos->
Shell.FOIShellView = psvTmp;
440 if (fodInfos->
Shell.FOIShellFolder)
441 IShellFolder_Release(fodInfos->
Shell.FOIShellFolder);
446 fodInfos->
ShellInfos.pidlAbsCurrent = pidlTmp;
454 TRACE(
"create view window\n");
455 if (
FAILED(hRes = IShellView_CreateViewWindow(psvTmp,
NULL,
457 &rectView, &hwndView)))
459 WARN(
"Failed to create view window, hr %#lx.\n", hRes);
524 FIXME(
"(%p 0x%08lx %p)\n",
This, grfMode, ppStrm);
535 LPOLEMENUGROUPWIDTHS lpMenuWidths)
576 if(!(*ppshv = fodInfos->
Shell.FOIShellView))
580 IShellView_AddRef(fodInfos->
Shell.FOIShellView);
622 TRACE(
"ctrl id: %x\n",
id);
624 FIXME(
"ctrl id: %x\n",
id);
628 if (pret) *pret = lres;
637 HOLEMENU holemenuReserved,
638 HWND hwndActiveObject)
653 LPCOLESTR lpszStatusText)
790 ULONG ulAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
792 ULONG ulAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER;
794 IShellFolder_GetAttributesOf(fodInfos->
Shell.FOIShellFolder, 1, (
LPCITEMIDLIST *)&pidl, &ulAttr);
796 if ((ulAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER)) && (ulAttr & SFGAO_FILESYSANCESTOR))
798 if (ulAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER) )
801 hRes = IShellBrowser_BrowseObject(&
This->IShellBrowser_iface,pidl,SBSP_RELATIVE);
828 TRACE(
"(%p do=%p view=%p)\n",
This, fodInfos->
Shell.FOIDataObject, fodInfos->
Shell.FOIShellView);
831 if (fodInfos->
Shell.FOIDataObject)
832 IDataObject_Release(fodInfos->
Shell.FOIDataObject);
835 if(
FAILED(IShellView_GetItemObject(fodInfos->
Shell.FOIShellView, SVGIO_SELECTION,
860 case CDBOSC_SETFOCUS:
868 case CDBOSC_KILLFOCUS:
879 case CDBOSC_SELCHANGE:
898 if(!fodInfos)
return 0;
900 if(fodInfos->
DlgInfos.hwndCustomDlg)
902 TRACE(
"call notify CDN_INCLUDEITEM for pidl=%p\n", pidl);
906 ofnNotify.
psf = fodInfos->
Shell.FOIShellFolder;
917 ofnNotify.
psf = fodInfos->
Shell.FOIShellFolder;
926 TRACE(
"Retval: 0x%08Ix\n", hook_result);
948 ulAttr = SFGAO_HIDDEN | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR | SFGAO_LINK;
949 IShellFolder_GetAttributesOf(fodInfos->
Shell.FOIShellFolder, 1, &pidl, &ulAttr);
951 if( (ulAttr & SFGAO_HIDDEN) ||
952 !(ulAttr & (SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR)))
956 if(ulAttr & (SFGAO_FOLDER | SFGAO_LINK))
1060 if(guidService &&
IsEqualIID(guidService, &SID_STopLevelBrowser))
1063 FIXME(
"(%p) unknown interface requested\n",
This);
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
HINSTANCE COMDLG32_hInstance
EXTERN_C HRESULT DoUpdateAutoCompleteWithCWD(const FileOpenDlgInfos *info, LPCITEMIDLIST pidl)
struct tagOFNA * LPOPENFILENAMEA
#define OFN_ENABLEINCLUDENOTIFY
void WINAPI CoTaskMemFree(void *ptr)
LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl)
void FILEDLG95_FILENAME_FillFromSelection(HWND hwnd)
FileOpenDlgInfos * get_filedlg_infoptr(HWND hwnd)
IShellFolder * GetShellFolderFromPidl(LPITEMIDLIST pidlAbs)
LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode)
LPITEMIDLIST GetPidlFromDataObject(IDataObject *doSelected, UINT nPidlIndex)
int FILEDLG95_LOOKIN_SelectItem(HWND hwnd, LPITEMIDLIST pidl)
#define MultiByteToWideChar
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
BOOL WINAPI PathMatchSpecW(const WCHAR *path, const WCHAR *mask)
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
HRESULT WINAPI StrRetToBufW(LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
#define IShellFolder_GetDisplayNameOf
static HRESULT WINAPI IShellBrowserImpl_SetToolbarItems(IShellBrowser *iface, LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags)
static const ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowser *iface, IShellView *ppshv)
static const IShellBrowserVtbl IShellBrowserImpl_Vtbl
static LRESULT send_includeitem_notification(HWND hwndParentDlg, LPCITEMIDLIST pidl)
static HRESULT WINAPI IShellBrowserImpl_GetControlWindow(IShellBrowser *iface, UINT id, HWND *lphwnd)
static ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser *iface)
static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release(ICommDlgBrowser *iface)
static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface, REFIID riid, void **ppvObj)
static HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface, UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret)
static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
static ULONG WINAPI IShellBrowserImpl_IServiceProvider_AddRef(IServiceProvider *iface)
static HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp(IShellBrowser *iface, BOOL fEnterMode)
static ULONG WINAPI IShellBrowserImpl_IServiceProvider_Release(IServiceProvider *iface)
static HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface, BOOL fEnable)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *iface, IShellView *ppshv, LPCITEMIDLIST pidl)
static BOOL COMDLG32_StrRetToStrNW(LPVOID dest, DWORD len, LPSTRRET src, LPCITEMIDLIST pidl)
static HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB(IShellBrowser *iface, HMENU hmenuShared)
static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface, LPCITEMIDLIST pidl, UINT wFlags)
static HRESULT WINAPI IShellBrowserImpl_InsertMenusSB(IShellBrowser *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser *iface)
static void COMDLG32_UpdateCurrentDir(const FileOpenDlgInfos *fodInfos)
static HRESULT WINAPI IShellBrowserImpl_SetMenuSB(IShellBrowser *iface, HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwndActiveObject)
static HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive(IShellBrowser *iface, IShellView *ppshv)
static IShellBrowserImpl * impl_from_ICommDlgBrowser(ICommDlgBrowser *iface)
static HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface, DWORD grfMode, LPSTREAM *ppStrm)
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
static ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser *iface)
static HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB(IShellBrowser *iface, LPCOLESTR lpszStatusText)
static HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *iface, IShellView **ppshv)
static const IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl
static HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser *iface, HWND *phwnd)
static HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface, LPMSG lpmsg, WORD wID)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface(ICommDlgBrowser *iface, REFIID riid, LPVOID *ppvObj)
static IShellBrowserImpl * impl_from_IServiceProvider(IServiceProvider *iface)
static HRESULT IShellBrowserImpl_OnSelChange(IShellBrowserImpl *This, const IShellView *ppshv)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBrowser *iface, IShellView *ppshv, ULONG uChange)
static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, LPVOID *ppvObj)
static void COMDLG32_DumpSBSPFlags(UINT uflags)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
interface IStream * LPSTREAM
const GUID IID_IOleWindow
const GUID IID_IDataObject
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
void WINAPI ILFree(LPITEMIDLIST pidl)
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
#define IsEqualIID(riid1, riid2)
static IShellBrowser * IShellBrowserImpl_Construct(void)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
struct FileOpenDlgInfos::@347 DlgInfos
struct FileOpenDlgInfos::@346 ShellInfos
struct FileOpenDlgInfos::@345 Shell
IServiceProvider IServiceProvider_iface
ICommDlgBrowser ICommDlgBrowser_iface
IShellBrowser IShellBrowser_iface
#define CONTAINING_RECORD(address, type, field)
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
HWND WINAPI GetFocus(void)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)
HWND WINAPI GetParent(_In_ HWND)
#define SetWindowLongPtrW
LRESULT WINAPI SendDlgItemMessageA(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)