[PATCH] shell32: Use interface pointers instead of a pointer to implementation structure
Nikolay Sivov
nsivov at codeweavers.com
Wed Nov 23 09:15:33 CST 2016
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
Also changed formatting of ICommDlgBrowser integration helpers, it has to be done eventually for
old parts of shell32.
dlls/shell32/shlview.c | 57 +++++++++++++++++++++++++++-----------------------
1 file changed, 31 insertions(+), 26 deletions(-)
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
index 5990982..3bdd205 100644
--- a/dlls/shell32/shlview.c
+++ b/dlls/shell32/shlview.c
@@ -201,47 +201,52 @@ typedef void (CALLBACK *PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMa
* ##### helperfunctions for communication with ICommDlgBrowser #####
*/
static BOOL IsInCommDlg(IShellViewImpl * This)
-{ return(This->pCommDlgBrowser != NULL);
+{
+ return This->pCommDlgBrowser != NULL;
}
static HRESULT IncludeObject(IShellViewImpl * This, LPCITEMIDLIST pidl)
{
- HRESULT ret = S_OK;
+ HRESULT ret = S_OK;
- if ( IsInCommDlg(This) )
- {
- TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl);
- ret = ICommDlgBrowser_IncludeObject(This->pCommDlgBrowser, (IShellView*)This, pidl);
- TRACE("--0x%08x\n", ret);
- }
- return ret;
+ if (IsInCommDlg(This))
+ {
+ TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl);
+ ret = ICommDlgBrowser_IncludeObject(This->pCommDlgBrowser, (IShellView *)&This->IShellView3_iface, pidl);
+ TRACE("-- returns 0x%08x\n", ret);
+ }
+
+ return ret;
}
static HRESULT OnDefaultCommand(IShellViewImpl * This)
{
- HRESULT ret = S_FALSE;
+ HRESULT ret = S_FALSE;
- if (IsInCommDlg(This))
- {
- TRACE("ICommDlgBrowser::OnDefaultCommand\n");
- ret = ICommDlgBrowser_OnDefaultCommand(This->pCommDlgBrowser, (IShellView*)This);
- TRACE("-- returns %08x\n", ret);
- }
- return ret;
+ if (IsInCommDlg(This))
+ {
+ TRACE("ICommDlgBrowser::OnDefaultCommand\n");
+ ret = ICommDlgBrowser_OnDefaultCommand(This->pCommDlgBrowser, (IShellView *)&This->IShellView3_iface);
+ TRACE("-- returns 0x%08x\n", 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))
- {
- TRACE("ICommDlgBrowser::OnStateChange flags=%x\n", uFlags);
- ret = ICommDlgBrowser_OnStateChange(This->pCommDlgBrowser, (IShellView*)This, uFlags);
- TRACE("--\n");
- }
- return ret;
+ if (IsInCommDlg(This))
+ {
+ TRACE("ICommDlgBrowser::OnStateChange change=%d\n", change);
+ ret = ICommDlgBrowser_OnStateChange(This->pCommDlgBrowser, (IShellView *)&This->IShellView3_iface, change);
+ TRACE("-- returns 0x%08x\n", ret);
+ }
+
+ return ret;
}
+
/**********************************************************
* set the toolbar of the filedialog buttons
*
--
2.10.2
More information about the wine-patches
mailing list