* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+
+#define COBJMACROS
+#define NONAMELESSUNION
+
+#include "windef.h"
+#include "winbase.h"
+#include "winnls.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "winreg.h"
+
+#define NO_SHLWAPI_STREAM
+#include "shlwapi.h"
+#include "filedlgbrowser.h"
#include "cdlg.h"
+#include "shlguid.h"
+#include "servprov.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
typedef struct
{
*/
IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner)
{
+ FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndOwner);
IShellBrowserImpl *sb;
- FileOpenDlgInfos *fodInfos = GetPropA(hwndOwner,FileOpenDlgInfosStr);
sb = COMDLG32_SHAlloc(sizeof(IShellBrowserImpl));
/***************************************************************************
* IShellBrowserImpl_QueryInterface
*/
-static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface,
- REFIID riid,
- LPVOID *ppvObj)
+static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface, REFIID riid, void **ppvObj)
{
IShellBrowserImpl *This = impl_from_IShellBrowser(iface);
- TRACE("(%p)\n\t%s\n", This, debugstr_guid(riid));
+ TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObj);
*ppvObj = NULL;
return S_OK;
}
- FIXME("Unknown interface requested\n");
+ FIXME("unsupported interface, %s\n", debugstr_guid(riid));
return E_NOINTERFACE;
}
{
COMDLG32_SHFree(This);
TRACE("-- destroyed\n");
- return 0;
}
return ref;
}
TRACE("(%p)(pidl=%p,flags=0x%08x)\n", This, pidl, wFlags);
COMDLG32_DumpSBSPFlags(wFlags);
- fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
+ fodInfos = get_filedlg_infoptr(This->hwndOwner);
/* Format the pidl according to its parameter's category */
if(wFlags & SBSP_RELATIVE)
TRACE("(%p)\n", This);
- fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
+ fodInfos = get_filedlg_infoptr(This->hwndOwner);
if(!(*ppshv = fodInfos->Shell.FOIShellView))
{
TRACE("(%p)\n", This);
- fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
+ fodInfos = get_filedlg_infoptr(This->hwndOwner);
/* If the selected object is not a folder, send an IDOK command to parent window */
if((pidl = GetPidlFromDataObject(fodInfos->Shell.FOIDataObject, 1)))
{
FileOpenDlgInfos *fodInfos;
- fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
+ fodInfos = get_filedlg_infoptr(This->hwndOwner);
TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView);
/* release old selections */
break;
case CDBOSC_KILLFOCUS:
{
- FileOpenDlgInfos *fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
+ FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(This->hwndOwner);
if(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
{
WCHAR szSave[16];
static LRESULT send_includeitem_notification(HWND hwndParentDlg, LPCITEMIDLIST pidl)
{
LRESULT hook_result = 0;
- FileOpenDlgInfos *fodInfos = GetPropA(hwndParentDlg, FileOpenDlgInfosStr);
+ FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndParentDlg);
if(!fodInfos) return 0;
TRACE("(%p)\n", This);
- fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
+ fodInfos = get_filedlg_infoptr(This->hwndOwner);
ulAttr = SFGAO_HIDDEN | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR | SFGAO_LINK;
IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, &pidl, &ulAttr);
return S_OK;
/* Check if there is a mask to apply if not */
- if(!fodInfos->ShellInfos.lpstrCurrentFilter || !lstrlenW(fodInfos->ShellInfos.lpstrCurrentFilter))
+ if(!fodInfos->ShellInfos.lpstrCurrentFilter || !fodInfos->ShellInfos.lpstrCurrentFilter[0])
return S_OK;
if (SUCCEEDED(IShellFolder_GetDisplayNameOf(fodInfos->Shell.FOIShellFolder, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING, &str)))