Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8d18b893
Commit
8d18b893
authored
May 25, 2013
by
Qian Hong
Committed by
Alexandre Julliard
May 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl100: Fixed AtlAdvise and AtlUnadvise crashing with NULL pUnkCP.
parent
af59b20c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
atl.c
dlls/atl100/atl.c
+6
-0
atl.c
dlls/atl100/tests/atl.c
+6
-0
No files found.
dlls/atl100/atl.c
View file @
8d18b893
...
...
@@ -51,6 +51,9 @@ HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, DWORD
TRACE
(
"%p %p %p %p
\n
"
,
pUnkCP
,
pUnk
,
iid
,
pdw
);
if
(
!
pUnkCP
)
return
E_INVALIDARG
;
hres
=
IUnknown_QueryInterface
(
pUnkCP
,
&
IID_IConnectionPointContainer
,
(
void
**
)
&
container
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -76,6 +79,9 @@ HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID *iid, DWORD dw)
TRACE
(
"%p %p %d
\n
"
,
pUnkCP
,
iid
,
dw
);
if
(
!
pUnkCP
)
return
E_INVALIDARG
;
hres
=
IUnknown_QueryInterface
(
pUnkCP
,
&
IID_IConnectionPointContainer
,
(
void
**
)
&
container
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/atl100/tests/atl.c
View file @
8d18b893
...
...
@@ -359,6 +359,12 @@ static void test_cp(void)
DWORD
cookie
=
0
;
HRESULT
hres
;
hres
=
AtlAdvise
(
NULL
,
(
IUnknown
*
)
0xdeed0000
,
&
CLSID_Test
,
&
cookie
);
ok
(
hres
==
E_INVALIDARG
,
"expect E_INVALIDARG, returned %08x
\n
"
,
hres
);
hres
=
AtlUnadvise
(
NULL
,
&
CLSID_Test
,
0xdeadbeef
);
ok
(
hres
==
E_INVALIDARG
,
"expect E_INVALIDARG, returned %08x
\n
"
,
hres
);
hres
=
AtlAdvise
((
IUnknown
*
)
&
ConnectionPointContainer
,
(
IUnknown
*
)
0xdead0000
,
&
CLSID_Test
,
&
cookie
);
ok
(
hres
==
S_OK
,
"AtlAdvise failed: %08x
\n
"
,
hres
);
ok
(
cookie
==
0xdeadbeef
,
"cookie = %x
\n
"
,
cookie
);
...
...
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