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
7f9f1697
Commit
7f9f1697
authored
Jan 03, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: COM cleanup for the IConnectionPoint* ifaces.
parent
e5214b24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
35 deletions
+35
-35
conpoint.c
dlls/mshtml/conpoint.c
+31
-30
htmldoc.c
dlls/mshtml/htmldoc.c
+1
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+1
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-3
No files found.
dlls/mshtml/conpoint.c
View file @
7f9f1697
...
...
@@ -31,8 +31,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
#define CONPOINT(x) ((IConnectionPoint*) &(x)->lpConnectionPointVtbl);
static
const
char
*
debugstr_cp_guid
(
REFIID
riid
)
{
#define X(x) \
...
...
@@ -60,21 +58,24 @@ void call_property_onchanged(ConnectionPoint *This, DISPID dispid)
}
}
#define CONPOINT_THIS(iface) DEFINE_THIS(ConnectionPoint, ConnectionPoint, iface)
static
inline
ConnectionPoint
*
impl_from_IConnectionPoint
(
IConnectionPoint
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ConnectionPoint
,
IConnectionPoint_iface
);
}
static
HRESULT
WINAPI
ConnectionPoint_QueryInterface
(
IConnectionPoint
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
ConnectionPoint
*
This
=
CONPOINT_THIS
(
iface
);
ConnectionPoint
*
This
=
impl_from_IConnectionPoint
(
iface
);
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
CONPOINT
(
This
)
;
*
ppv
=
&
This
->
IConnectionPoint_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IConnectionPoint
,
riid
))
{
TRACE
(
"(%p)->(IID_IConnectionPoint %p)
\n
"
,
This
,
ppv
);
*
ppv
=
CONPOINT
(
This
)
;
*
ppv
=
&
This
->
IConnectionPoint_iface
;
}
if
(
*
ppv
)
{
...
...
@@ -88,19 +89,19 @@ static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface,
static
ULONG
WINAPI
ConnectionPoint_AddRef
(
IConnectionPoint
*
iface
)
{
ConnectionPoint
*
This
=
CONPOINT_THIS
(
iface
);
return
IConnectionPointContainer_AddRef
(
CONPTCONT
(
This
->
container
)
);
ConnectionPoint
*
This
=
impl_from_IConnectionPoint
(
iface
);
return
IConnectionPointContainer_AddRef
(
&
This
->
container
->
IConnectionPointContainer_iface
);
}
static
ULONG
WINAPI
ConnectionPoint_Release
(
IConnectionPoint
*
iface
)
{
ConnectionPoint
*
This
=
CONPOINT_THIS
(
iface
);
return
IConnectionPointContainer_Release
(
CONPTCONT
(
This
->
container
)
);
ConnectionPoint
*
This
=
impl_from_IConnectionPoint
(
iface
);
return
IConnectionPointContainer_Release
(
&
This
->
container
->
IConnectionPointContainer_iface
);
}
static
HRESULT
WINAPI
ConnectionPoint_GetConnectionInterface
(
IConnectionPoint
*
iface
,
IID
*
pIID
)
{
ConnectionPoint
*
This
=
CONPOINT_THIS
(
iface
);
ConnectionPoint
*
This
=
impl_from_IConnectionPoint
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pIID
);
...
...
@@ -114,14 +115,14 @@ static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *i
static
HRESULT
WINAPI
ConnectionPoint_GetConnectionPointContainer
(
IConnectionPoint
*
iface
,
IConnectionPointContainer
**
ppCPC
)
{
ConnectionPoint
*
This
=
CONPOINT_THIS
(
iface
);
ConnectionPoint
*
This
=
impl_from_IConnectionPoint
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppCPC
);
if
(
!
ppCPC
)
return
E_POINTER
;
*
ppCPC
=
CONPTCONT
(
This
->
container
)
;
*
ppCPC
=
&
This
->
container
->
IConnectionPointContainer_iface
;
IConnectionPointContainer_AddRef
(
*
ppCPC
);
return
S_OK
;
}
...
...
@@ -129,7 +130,7 @@ static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoi
static
HRESULT
WINAPI
ConnectionPoint_Advise
(
IConnectionPoint
*
iface
,
IUnknown
*
pUnkSink
,
DWORD
*
pdwCookie
)
{
ConnectionPoint
*
This
=
CONPOINT_THIS
(
iface
);
ConnectionPoint
*
This
=
impl_from_IConnectionPoint
(
iface
);
IUnknown
*
sink
;
DWORD
i
;
HRESULT
hres
;
...
...
@@ -167,7 +168,7 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
static
HRESULT
WINAPI
ConnectionPoint_Unadvise
(
IConnectionPoint
*
iface
,
DWORD
dwCookie
)
{
ConnectionPoint
*
This
=
CONPOINT_THIS
(
iface
);
ConnectionPoint
*
This
=
impl_from_IConnectionPoint
(
iface
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
dwCookie
);
if
(
!
dwCookie
||
dwCookie
>
This
->
sinks_size
||
!
This
->
sinks
[
dwCookie
-
1
].
unk
)
...
...
@@ -182,13 +183,11 @@ static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD dw
static
HRESULT
WINAPI
ConnectionPoint_EnumConnections
(
IConnectionPoint
*
iface
,
IEnumConnections
**
ppEnum
)
{
ConnectionPoint
*
This
=
CONPOINT_THIS
(
iface
);
ConnectionPoint
*
This
=
impl_from_IConnectionPoint
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppEnum
);
return
E_NOTIMPL
;
}
#undef CONPOINT_THIS
static
const
IConnectionPointVtbl
ConnectionPointVtbl
=
{
ConnectionPoint_QueryInterface
,
...
...
@@ -203,7 +202,7 @@ static const IConnectionPointVtbl ConnectionPointVtbl =
void
ConnectionPoint_Init
(
ConnectionPoint
*
cp
,
ConnectionPointContainer
*
container
,
REFIID
riid
,
cp_static_data_t
*
data
)
{
cp
->
lpConnectionPoint
Vtbl
=
&
ConnectionPointVtbl
;
cp
->
IConnectionPoint_iface
.
lp
Vtbl
=
&
ConnectionPointVtbl
;
cp
->
container
=
container
;
cp
->
sinks
=
NULL
;
cp
->
sinks_size
=
0
;
...
...
@@ -226,31 +225,34 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This)
heap_free
(
This
->
sinks
);
}
#define CONPTCONT_THIS(iface) DEFINE_THIS(ConnectionPointContainer, ConnectionPointContainer, iface)
static
inline
ConnectionPointContainer
*
impl_from_IConnectionPointContainer
(
IConnectionPointContainer
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ConnectionPointContainer
,
IConnectionPointContainer_iface
);
}
static
HRESULT
WINAPI
ConnectionPointContainer_QueryInterface
(
IConnectionPointContainer
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
ConnectionPointContainer
*
This
=
CONPTCONT_THIS
(
iface
);
ConnectionPointContainer
*
This
=
impl_from_IConnectionPointContainer
(
iface
);
return
IUnknown_QueryInterface
(
This
->
outer
,
riid
,
ppv
);
}
static
ULONG
WINAPI
ConnectionPointContainer_AddRef
(
IConnectionPointContainer
*
iface
)
{
ConnectionPointContainer
*
This
=
CONPTCONT_THIS
(
iface
);
ConnectionPointContainer
*
This
=
impl_from_IConnectionPointContainer
(
iface
);
return
IUnknown_AddRef
(
This
->
outer
);
}
static
ULONG
WINAPI
ConnectionPointContainer_Release
(
IConnectionPointContainer
*
iface
)
{
ConnectionPointContainer
*
This
=
CONPTCONT_THIS
(
iface
);
ConnectionPointContainer
*
This
=
impl_from_IConnectionPointContainer
(
iface
);
return
IUnknown_Release
(
This
->
outer
);
}
static
HRESULT
WINAPI
ConnectionPointContainer_EnumConnectionPoints
(
IConnectionPointContainer
*
iface
,
IEnumConnectionPoints
**
ppEnum
)
{
ConnectionPointContainer
*
This
=
CONPTCONT_THIS
(
iface
);
ConnectionPointContainer
*
This
=
impl_from_IConnectionPointContainer
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppEnum
);
return
E_NOTIMPL
;
}
...
...
@@ -258,19 +260,20 @@ static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints(IConnectionP
static
HRESULT
WINAPI
ConnectionPointContainer_FindConnectionPoint
(
IConnectionPointContainer
*
iface
,
REFIID
riid
,
IConnectionPoint
**
ppCP
)
{
ConnectionPointContainer
*
This
=
CONPTCONT_THIS
(
iface
);
ConnectionPointContainer
*
This
=
impl_from_IConnectionPointContainer
(
iface
);
ConnectionPoint
*
iter
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_cp_guid
(
riid
),
ppCP
);
if
(
This
->
forward_container
)
return
IConnectionPointContainer_FindConnectionPoint
(
CONPTCONT
(
This
),
riid
,
ppCP
);
return
IConnectionPointContainer_FindConnectionPoint
(
&
This
->
IConnectionPointContainer_iface
,
riid
,
ppCP
);
*
ppCP
=
NULL
;
for
(
iter
=
This
->
cp_list
;
iter
;
iter
=
iter
->
next
)
{
if
(
IsEqualGUID
(
iter
->
iid
,
riid
))
*
ppCP
=
CONPOINT
(
iter
)
;
*
ppCP
=
&
iter
->
IConnectionPoint_iface
;
}
if
(
*
ppCP
)
{
...
...
@@ -290,11 +293,9 @@ static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = {
ConnectionPointContainer_FindConnectionPoint
};
#undef CONPTCONT_THIS
void
ConnectionPointContainer_Init
(
ConnectionPointContainer
*
This
,
IUnknown
*
outer
)
{
This
->
lpConnectionPointContainer
Vtbl
=
&
ConnectionPointContainerVtbl
;
This
->
IConnectionPointContainer_iface
.
lp
Vtbl
=
&
ConnectionPointContainerVtbl
;
This
->
cp_list
=
NULL
;
This
->
outer
=
outer
;
}
...
...
dlls/mshtml/htmldoc.c
View file @
7f9f1697
...
...
@@ -1790,7 +1790,7 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
*
ppv
=
&
This
->
IHlinkTarget_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IConnectionPointContainer
,
riid
))
{
TRACE
(
"(%p)->(IID_IConnectionPointContainer %p)
\n
"
,
This
,
ppv
);
*
ppv
=
CONPTCONT
(
&
This
->
cp_container
)
;
*
ppv
=
&
This
->
cp_container
.
IConnectionPointContainer_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IPersistStreamInit
,
riid
))
{
TRACE
(
"(%p)->(IID_IPersistStreamInit %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IPersistStreamInit_iface
;
...
...
dlls/mshtml/htmlelem.c
View file @
7f9f1697
...
...
@@ -1618,7 +1618,7 @@ HRESULT HTMLElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
*
ppv
=
&
This
->
IHTMLElement3_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IConnectionPointContainer
,
riid
))
{
TRACE
(
"(%p)->(IID_IConnectionPointContainer %p)
\n
"
,
This
,
ppv
);
*
ppv
=
CONPTCONT
(
&
This
->
cp_container
)
;
*
ppv
=
&
This
->
cp_container
.
IConnectionPointContainer_iface
;
}
if
(
*
ppv
)
{
...
...
dlls/mshtml/mshtml_private.h
View file @
7f9f1697
...
...
@@ -318,7 +318,7 @@ typedef struct _cp_static_data_t {
}
cp_static_data_t
;
typedef
struct
ConnectionPointContainer
{
const
IConnectionPointContainerVtbl
*
lpConnectionPointContainerVtbl
;
IConnectionPointContainer
IConnectionPointContainer_iface
;
ConnectionPoint
*
cp_list
;
IUnknown
*
outer
;
...
...
@@ -326,7 +326,7 @@ typedef struct ConnectionPointContainer {
}
ConnectionPointContainer
;
struct
ConnectionPoint
{
const
IConnectionPointVtbl
*
lpConnectionPointVtbl
;
IConnectionPoint
IConnectionPoint_iface
;
ConnectionPointContainer
*
container
;
...
...
@@ -624,7 +624,6 @@ struct HTMLDocumentNode {
struct
list
plugin_hosts
;
};
#define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
#define CUSTOMDOC(x) ((ICustomDoc*) &(x)->lpCustomDocVtbl)
#define NSEVENTLIST(x) ((nsIDOMEventListener*) &(x)->lpDOMEventListenerVtbl)
...
...
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