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
77cc2687
Commit
77cc2687
authored
May 24, 2011
by
David Hedberg
Committed by
Alexandre Julliard
May 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Fix reference counting when querying services.
parent
f539d4c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
itemdlg.c
dlls/comdlg32/itemdlg.c
+1
-7
itemdlg.c
dlls/comdlg32/tests/itemdlg.c
+15
-6
No files found.
dlls/comdlg32/itemdlg.c
View file @
77cc2687
...
...
@@ -1915,13 +1915,7 @@ static HRESULT WINAPI IServiceProvider_fnQueryService(IServiceProvider *iface,
FIXME
(
"Interface %s requested from unknown service %s
\n
"
,
debugstr_guid
(
riid
),
debugstr_guid
(
guidService
));
if
(
SUCCEEDED
(
hr
)
&&
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
return
E_FAIL
;
return
hr
;
}
static
const
IServiceProviderVtbl
vt_IServiceProvider
=
{
...
...
dlls/comdlg32/tests/itemdlg.c
View file @
77cc2687
...
...
@@ -157,6 +157,7 @@ static BOOL test_instantiation(void)
IServiceProvider
*
psp
;
IUnknown
*
punk
;
HRESULT
hr
;
LONG
ref
;
/* Instantiate FileOpenDialog */
hr
=
CoCreateInstance
(
&
CLSID_FileOpenDialog
,
NULL
,
CLSCTX_INPROC_SERVER
,
...
...
@@ -223,7 +224,8 @@ static BOOL test_instantiation(void)
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
IFileOpenDialog_Release
(
pfod
);
ref
=
IFileOpenDialog_Release
(
pfod
);
ok
(
!
ref
,
"Got refcount %d, should have been released.
\n
"
,
ref
);
/* Instantiate FileSaveDialog */
hr
=
CoCreateInstance
(
&
CLSID_FileSaveDialog
,
NULL
,
CLSCTX_INPROC_SERVER
,
...
...
@@ -267,7 +269,8 @@ static BOOL test_instantiation(void)
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
IFileSaveDialog_Release
(
pfsd
);
ref
=
IFileSaveDialog_Release
(
pfsd
);
ok
(
!
ref
,
"Got refcount %d, should have been released.
\n
"
,
ref
);
return
TRUE
;
}
...
...
@@ -284,6 +287,7 @@ static void test_basics(void)
LPITEMIDLIST
pidl
;
WCHAR
*
filename
;
UINT
filetype
;
LONG
ref
;
HRESULT
hr
;
const
WCHAR
txt
[]
=
{
't'
,
'x'
,
't'
,
0
};
const
WCHAR
null
[]
=
{
0
};
...
...
@@ -735,8 +739,10 @@ static void test_basics(void)
/* Cleanup */
IShellItem_Release
(
psidesktop
);
IFileOpenDialog_Release
(
pfod
);
IFileSaveDialog_Release
(
pfsd
);
ref
=
IFileOpenDialog_Release
(
pfod
);
ok
(
!
ref
,
"Got refcount %d, should have been released.
\n
"
,
ref
);
ref
=
IFileSaveDialog_Release
(
pfsd
);
ok
(
!
ref
,
"Got refcount %d, should have been released.
\n
"
,
ref
);
}
static
void
test_advise_helper
(
IFileDialog
*
pfd
)
...
...
@@ -811,20 +817,23 @@ static void test_advise(void)
{
IFileDialog
*
pfd
;
HRESULT
hr
;
LONG
ref
;
trace
(
"Testing FileOpenDialog (advise)
\n
"
);
hr
=
CoCreateInstance
(
&
CLSID_FileOpenDialog
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IFileDialog
,
(
void
**
)
&
pfd
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
test_advise_helper
(
pfd
);
IFileDialog_Release
(
pfd
);
ref
=
IFileDialog_Release
(
pfd
);
ok
(
!
ref
,
"Got refcount %d, should have been released.
\n
"
,
ref
);
trace
(
"Testing FileSaveDialog (advise)
\n
"
);
hr
=
CoCreateInstance
(
&
CLSID_FileSaveDialog
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IFileDialog
,
(
void
**
)
&
pfd
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
test_advise_helper
(
pfd
);
IFileDialog_Release
(
pfd
);
ref
=
IFileDialog_Release
(
pfd
);
ok
(
!
ref
,
"Got refcount %d, should have been released.
\n
"
,
ref
);
}
START_TEST
(
itemdlg
)
...
...
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