Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e5e26739
Commit
e5e26739
authored
Aug 16, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Use proper helpers for iface calls.
parent
7839d134
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
24 deletions
+20
-24
filedlgbrowser.c
dlls/comdlg32/filedlgbrowser.c
+12
-16
itemdlg.c
dlls/comdlg32/itemdlg.c
+2
-2
itemdlg.c
dlls/comdlg32/tests/itemdlg.c
+6
-6
No files found.
dlls/comdlg32/filedlgbrowser.c
View file @
e5e26739
...
...
@@ -226,26 +226,22 @@ static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface,
*
ppvObj
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
/*IUnknown*/
{
*
ppvObj
=
This
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IOleWindow
))
/*IOleWindow*/
{
*
ppvObj
=
This
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellBrowser
))
/*IShellBrowser*/
{
*
ppvObj
=
This
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_ICommDlgBrowser
))
/*ICommDlgBrowser*/
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
*
ppvObj
=
&
This
->
IShellBrowser_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IOleWindow
))
*
ppvObj
=
&
This
->
IShellBrowser_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellBrowser
))
*
ppvObj
=
&
This
->
IShellBrowser_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_ICommDlgBrowser
))
*
ppvObj
=
&
This
->
ICommDlgBrowser_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IServiceProvider
))
/* IServiceProvider */
else
if
(
IsEqualIID
(
riid
,
&
IID_IServiceProvider
))
*
ppvObj
=
&
This
->
IServiceProvider_iface
;
if
(
*
ppvObj
)
{
IUnknown_AddRef
(
(
IShellBrowser
*
)
*
ppvObj
);
return
S_OK
;
if
(
*
ppvObj
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppvObj
);
return
S_OK
;
}
FIXME
(
"Unknown interface requested
\n
"
);
return
E_NOINTERFACE
;
}
...
...
dlls/comdlg32/itemdlg.c
View file @
e5e26739
...
...
@@ -506,7 +506,7 @@ static HRESULT on_default_action(FileDialogImpl *This)
pidla
[
i
]
=
COMDLG32_SHSimpleIDListFromPathAW
(
canon_filename
);
if
(
psf_parent
&&
!
(
open_action
==
ONOPEN_BROWSE
))
IShell
Item
_Release
(
psf_parent
);
IShell
Folder
_Release
(
psf_parent
);
fn_iter
+=
(
WCHAR
)
lstrlenW
(
fn_iter
)
+
1
;
}
...
...
@@ -528,7 +528,7 @@ static HRESULT on_default_action(FileDialogImpl *This)
if
(
FAILED
(
hr
))
ERR
(
"Failed to browse to directory: %08x
\n
"
,
hr
);
IShell
Item
_Release
(
psf_parent
);
IShell
Folder
_Release
(
psf_parent
);
break
;
case
ONOPEN_OPEN
:
...
...
dlls/comdlg32/tests/itemdlg.c
View file @
e5e26739
...
...
@@ -369,7 +369,7 @@ static BOOL test_instantiation(void)
hr
=
IFileSaveDialog_QueryInterface
(
pfsd
,
&
IID_IFileDialogEvents
,
(
void
**
)
&
punk
);
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
I
Unknown
_Release
(
pfd
);
if
(
SUCCEEDED
(
hr
))
I
FileDialog
_Release
(
pfd
);
hr
=
IFileSaveDialog_QueryInterface
(
pfsd
,
&
IID_IExplorerBrowser
,
(
void
**
)
&
punk
);
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x.
\n
"
,
hr
);
...
...
@@ -379,7 +379,7 @@ static BOOL test_instantiation(void)
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
hr
=
IFile
Open
Dialog_QueryInterface
(
pfsd
,
&
IID_ICommDlgBrowser3
,
(
void
**
)
&
punk
);
hr
=
IFile
Save
Dialog_QueryInterface
(
pfsd
,
&
IID_ICommDlgBrowser3
,
(
void
**
)
&
punk
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
...
...
@@ -1378,7 +1378,7 @@ static void test_customize(void)
&
IID_IFileDialog
,
(
void
**
)
&
pfod
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
hr
=
IFile
Open
Dialog_QueryInterface
(
pfod
,
&
IID_IFileDialogCustomize
,
(
void
**
)
&
pfdc
);
hr
=
IFileDialog_QueryInterface
(
pfod
,
&
IID_IFileDialogCustomize
,
(
void
**
)
&
pfdc
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
if
(
FAILED
(
hr
))
{
...
...
@@ -1666,7 +1666,7 @@ static void test_customize(void)
IFileDialogEvents_Release
(
pfde
);
IFileDialogCustomize_Release
(
pfdc
);
ref
=
IFile
Open
Dialog_Release
(
pfod
);
ref
=
IFileDialog_Release
(
pfod
);
ok
(
!
ref
,
"Refcount not zero (%d).
\n
"
,
ref
);
...
...
@@ -1674,7 +1674,7 @@ static void test_customize(void)
&
IID_IFileDialog
,
(
void
**
)
&
pfod
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
hr
=
IFileDialog
Customize
_QueryInterface
(
pfod
,
&
IID_IFileDialogCustomize
,
(
void
**
)
&
pfdc
);
hr
=
IFileDialog_QueryInterface
(
pfod
,
&
IID_IFileDialogCustomize
,
(
void
**
)
&
pfdc
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
i
=
0
;
...
...
@@ -1884,7 +1884,7 @@ static void test_customize(void)
}
IFileDialogCustomize_Release
(
pfdc
);
ref
=
IFile
Open
Dialog_Release
(
pfod
);
ref
=
IFileDialog_Release
(
pfod
);
ok
(
!
ref
,
"Refcount not zero (%d).
\n
"
,
ref
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment