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
6de3e39a
Commit
6de3e39a
authored
Jan 03, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl100: Added AtlUnadvise implementation.
parent
e57b22b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
4 deletions
+29
-4
atl.c
dlls/atl100/atl.c
+18
-2
atl.c
dlls/atl100/tests/atl.c
+11
-2
No files found.
dlls/atl100/atl.c
View file @
6de3e39a
...
...
@@ -68,8 +68,24 @@ HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, DWORD
*/
HRESULT
WINAPI
AtlUnadvise
(
IUnknown
*
pUnkCP
,
const
IID
*
iid
,
DWORD
dw
)
{
FIXME
(
"%p %p %d
\n
"
,
pUnkCP
,
iid
,
dw
);
return
S_OK
;
IConnectionPointContainer
*
container
;
IConnectionPoint
*
cp
;
HRESULT
hres
;
TRACE
(
"%p %p %d
\n
"
,
pUnkCP
,
iid
,
dw
);
hres
=
IUnknown_QueryInterface
(
pUnkCP
,
&
IID_IConnectionPointContainer
,
(
void
**
)
&
container
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IConnectionPointContainer_FindConnectionPoint
(
container
,
iid
,
&
cp
);
IConnectionPointContainer_Release
(
container
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IConnectionPoint_Unadvise
(
cp
,
dw
);
IConnectionPoint_Release
(
cp
);
return
hres
;
}
/***********************************************************************
...
...
dlls/atl100/tests/atl.c
View file @
6de3e39a
...
...
@@ -242,18 +242,22 @@ static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoi
return
E_NOTIMPL
;
}
static
int
advise_cnt
;
static
HRESULT
WINAPI
ConnectionPoint_Advise
(
IConnectionPoint
*
iface
,
IUnknown
*
pUnkSink
,
DWORD
*
pdwCookie
)
{
ok
(
pUnkSink
==
(
IUnknown
*
)
0xdead0000
,
"pUnkSink = %p
\n
"
,
pUnkSink
);
*
pdwCookie
=
0xdeadbeef
;
advise_cnt
++
;
return
S_OK
;
}
static
HRESULT
WINAPI
ConnectionPoint_Unadvise
(
IConnectionPoint
*
iface
,
DWORD
dwCookie
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
ok
(
dwCookie
==
0xdeadbeef
,
"dwCookie = %x
\n
"
,
dwCookie
);
advise_cnt
--
;
return
S_OK
;
}
static
HRESULT
WINAPI
ConnectionPoint_EnumConnections
(
IConnectionPoint
*
iface
,
...
...
@@ -332,6 +336,11 @@ static void test_cp(void)
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
);
ok
(
advise_cnt
==
1
,
"advise_cnt = %d
\n
"
,
advise_cnt
);
hres
=
AtlUnadvise
((
IUnknown
*
)
&
ConnectionPointContainer
,
&
CLSID_Test
,
0xdeadbeef
);
ok
(
hres
==
S_OK
,
"AtlUnadvise failed: %08x
\n
"
,
hres
);
ok
(
!
advise_cnt
,
"advise_cnt = %d
\n
"
,
advise_cnt
);
}
START_TEST
(
atl
)
...
...
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