shell32: Use interface pointers instead of a pointer to implementation structure.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-11-23 18:15:33 +03:00 committed by Alexandre Julliard
parent 4f3d390051
commit 5ad123f851
1 changed files with 31 additions and 26 deletions

View File

@ -201,47 +201,52 @@ typedef void (CALLBACK *PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMa
* ##### helperfunctions for communication with ICommDlgBrowser ##### * ##### helperfunctions for communication with ICommDlgBrowser #####
*/ */
static BOOL IsInCommDlg(IShellViewImpl * This) static BOOL IsInCommDlg(IShellViewImpl * This)
{ return(This->pCommDlgBrowser != NULL); {
return This->pCommDlgBrowser != NULL;
} }
static HRESULT IncludeObject(IShellViewImpl * This, LPCITEMIDLIST pidl) static HRESULT IncludeObject(IShellViewImpl * This, LPCITEMIDLIST pidl)
{ {
HRESULT ret = S_OK; HRESULT ret = S_OK;
if ( IsInCommDlg(This) ) if (IsInCommDlg(This))
{ {
TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl); TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl);
ret = ICommDlgBrowser_IncludeObject(This->pCommDlgBrowser, (IShellView*)This, pidl); ret = ICommDlgBrowser_IncludeObject(This->pCommDlgBrowser, (IShellView *)&This->IShellView3_iface, pidl);
TRACE("--0x%08x\n", ret); TRACE("-- returns 0x%08x\n", ret);
} }
return ret;
return ret;
} }
static HRESULT OnDefaultCommand(IShellViewImpl * This) static HRESULT OnDefaultCommand(IShellViewImpl * This)
{ {
HRESULT ret = S_FALSE; HRESULT ret = S_FALSE;
if (IsInCommDlg(This)) if (IsInCommDlg(This))
{ {
TRACE("ICommDlgBrowser::OnDefaultCommand\n"); TRACE("ICommDlgBrowser::OnDefaultCommand\n");
ret = ICommDlgBrowser_OnDefaultCommand(This->pCommDlgBrowser, (IShellView*)This); ret = ICommDlgBrowser_OnDefaultCommand(This->pCommDlgBrowser, (IShellView *)&This->IShellView3_iface);
TRACE("-- returns %08x\n", ret); TRACE("-- returns 0x%08x\n", ret);
} }
return ret;
return ret;
} }
static HRESULT OnStateChange(IShellViewImpl * This, UINT uFlags) static HRESULT OnStateChange(IShellViewImpl * This, UINT change)
{ {
HRESULT ret = S_FALSE; HRESULT ret = S_FALSE;
if (IsInCommDlg(This)) if (IsInCommDlg(This))
{ {
TRACE("ICommDlgBrowser::OnStateChange flags=%x\n", uFlags); TRACE("ICommDlgBrowser::OnStateChange change=%d\n", change);
ret = ICommDlgBrowser_OnStateChange(This->pCommDlgBrowser, (IShellView*)This, uFlags); ret = ICommDlgBrowser_OnStateChange(This->pCommDlgBrowser, (IShellView *)&This->IShellView3_iface, change);
TRACE("--\n"); TRACE("-- returns 0x%08x\n", ret);
} }
return ret;
return ret;
} }
/********************************************************** /**********************************************************
* set the toolbar of the filedialog buttons * set the toolbar of the filedialog buttons
* *