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
b241d517
Commit
b241d517
authored
Sep 12, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make IConnectionPointContainer interface heap based.
parent
4a9d838c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
51 deletions
+38
-51
events.c
dlls/shdocvw/events.c
+32
-36
shdocvw.h
dlls/shdocvw/shdocvw.h
+3
-13
webbrowser.c
dlls/shdocvw/webbrowser.c
+3
-2
No files found.
dlls/shdocvw/events.c
View file @
b241d517
/*
/*
* Implementation of event-related interfaces for
IE Web
Browser control:
* Implementation of event-related interfaces for
Web
Browser control:
*
*
* - IConnectionPointContainer
* - IConnectionPointContainer
* - IConnectionPoint
* - IConnectionPoint
...
@@ -36,46 +36,41 @@ static const GUID IID_INotifyDBEvents =
...
@@ -36,46 +36,41 @@ static const GUID IID_INotifyDBEvents =
* Implement the IConnectionPointContainer interface
* Implement the IConnectionPointContainer interface
*/
*/
static
HRESULT
WINAPI
WBCPC_QueryInterface
(
LPCONNECTIONPOINTCONTAINER
iface
,
#define CONPTCONT_THIS(iface) DEFINE_THIS(WebBrowser, ConnectionPointContainer, iface)
static
HRESULT
WINAPI
ConnectionPointContainer_QueryInterface
(
IConnectionPointContainer
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
REFIID
riid
,
LPVOID
*
ppobj
)
{
{
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
WebBrowser
*
This
=
CONPTCONT_THIS
(
iface
);
return
IWebBrowser_QueryInterface
(
WEBBROWSER
(
This
),
riid
,
ppobj
);
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
}
static
ULONG
WINAPI
WBCPC_AddRef
(
LPCONNECTIONPOINTCONTAINER
iface
)
static
ULONG
WINAPI
ConnectionPointContainer_AddRef
(
IConnectionPointContainer
*
iface
)
{
{
SHDOCVW_LockModule
();
WebBrowser
*
This
=
CONPTCONT_THIS
(
iface
);
return
IWebBrowser_AddRef
(
WEBBROWSER
(
This
));
return
2
;
/* non-heap based object */
}
}
static
ULONG
WINAPI
WBCPC_Release
(
LPCONNECTIONPOINTCONTAINER
iface
)
static
ULONG
WINAPI
ConnectionPointContainer_Release
(
IConnectionPointContainer
*
iface
)
{
{
SHDOCVW_UnlockModule
();
WebBrowser
*
This
=
CONPTCONT_THIS
(
iface
);
return
IWebBrowser_Release
(
WEBBROWSER
(
This
));
return
1
;
/* non-heap based object */
}
}
/* Get a list of connection points inside this container. */
static
HRESULT
WINAPI
ConnectionPointContainer_EnumConnectionPoints
(
IConnectionPointContainer
*
iface
,
static
HRESULT
WINAPI
WBCPC_EnumConnectionPoints
(
LPCONNECTIONPOINTCONTAINER
iface
,
LPENUMCONNECTIONPOINTS
*
ppEnum
)
LPENUMCONNECTIONPOINTS
*
ppEnum
)
{
{
FIXME
(
"stub: IEnumConnectionPoints = %p
\n
"
,
*
ppEnum
);
WebBrowser
*
This
=
CONPTCONT_THIS
(
iface
);
return
S_OK
;
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppEnum
);
return
E_NOTIMPL
;
}
}
/* Retrieve the connection point in this container associated with the
static
HRESULT
WINAPI
ConnectionPointContainer_FindConnectionPoint
(
IConnectionPointContainer
*
iface
,
* riid interface. When events occur in the control, the control can
* call backwards into its embedding site, through these interfaces.
*/
static
HRESULT
WINAPI
WBCPC_FindConnectionPoint
(
LPCONNECTIONPOINTCONTAINER
iface
,
REFIID
riid
,
LPCONNECTIONPOINT
*
ppCP
)
REFIID
riid
,
LPCONNECTIONPOINT
*
ppCP
)
{
{
TRACE
(
": IID = %s, IConnectionPoint = %p
\n
"
,
debugstr_guid
(
riid
),
*
ppCP
);
WebBrowser
*
This
=
CONPTCONT_THIS
(
iface
);
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppCP
);
/* For now, return the same IConnectionPoint object for both
/* For now, return the same IConnectionPoint object for both
* event interface requests.
* event interface requests.
...
@@ -98,21 +93,17 @@ static HRESULT WINAPI WBCPC_FindConnectionPoint(LPCONNECTIONPOINTCONTAINER iface
...
@@ -98,21 +93,17 @@ static HRESULT WINAPI WBCPC_FindConnectionPoint(LPCONNECTIONPOINTCONTAINER iface
return
E_FAIL
;
return
E_FAIL
;
}
}
/**********************************************************************
#undef CONPTCONT_THIS
* IConnectionPointContainer virtual function table for IE Web Browser component
*/
static
const
IConnectionPointContainerVtbl
WBCPC_
Vtbl
=
static
const
IConnectionPointContainerVtbl
ConnectionPointContainer
Vtbl
=
{
{
WBCPC
_QueryInterface
,
ConnectionPointContainer
_QueryInterface
,
WBCPC
_AddRef
,
ConnectionPointContainer
_AddRef
,
WBCPC
_Release
,
ConnectionPointContainer
_Release
,
WBCPC
_EnumConnectionPoints
,
ConnectionPointContainer
_EnumConnectionPoints
,
WBCPC
_FindConnectionPoint
ConnectionPointContainer
_FindConnectionPoint
};
};
IConnectionPointContainerImpl
SHDOCVW_ConnectionPointContainer
=
{
&
WBCPC_Vtbl
};
/**********************************************************************
/**********************************************************************
* Implement the IConnectionPoint interface
* Implement the IConnectionPoint interface
...
@@ -207,3 +198,8 @@ static const IConnectionPointVtbl WBCP_Vtbl =
...
@@ -207,3 +198,8 @@ static const IConnectionPointVtbl WBCP_Vtbl =
};
};
static
IConnectionPointImpl
SHDOCVW_ConnectionPoint
=
{
&
WBCP_Vtbl
};
static
IConnectionPointImpl
SHDOCVW_ConnectionPoint
=
{
&
WBCP_Vtbl
};
void
WebBrowser_Events_Init
(
WebBrowser
*
This
)
{
This
->
lpConnectionPointContainerVtbl
=
&
ConnectionPointContainerVtbl
;
}
dlls/shdocvw/shdocvw.h
View file @
b241d517
...
@@ -61,6 +61,7 @@ typedef struct {
...
@@ -61,6 +61,7 @@ typedef struct {
const
IPersistStreamInitVtbl
*
lpPersistStreamInitVtbl
;
const
IPersistStreamInitVtbl
*
lpPersistStreamInitVtbl
;
const
IProvideClassInfo2Vtbl
*
lpProvideClassInfoVtbl
;
const
IProvideClassInfo2Vtbl
*
lpProvideClassInfoVtbl
;
const
IQuickActivateVtbl
*
lpQuickActivateVtbl
;
const
IQuickActivateVtbl
*
lpQuickActivateVtbl
;
const
IConnectionPointContainerVtbl
*
lpConnectionPointContainerVtbl
;
LONG
ref
;
LONG
ref
;
}
WebBrowser
;
}
WebBrowser
;
...
@@ -73,28 +74,17 @@ typedef struct {
...
@@ -73,28 +74,17 @@ typedef struct {
#define PERSTRINIT(x) ((IPersistStreamInit*) &(x)->lpPersistStreamInitVtbl)
#define PERSTRINIT(x) ((IPersistStreamInit*) &(x)->lpPersistStreamInitVtbl)
#define CLASSINFO(x) ((IProvideClassInfo2*) &(x)->lpProvideClassInfoVtbl)
#define CLASSINFO(x) ((IProvideClassInfo2*) &(x)->lpProvideClassInfoVtbl)
#define QUICKACT(x) ((IQuickActivate*) &(x)->lpQuickActivateVtbl)
#define QUICKACT(x) ((IQuickActivate*) &(x)->lpQuickActivateVtbl)
#define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
void
WebBrowser_OleObject_Init
(
WebBrowser
*
);
void
WebBrowser_OleObject_Init
(
WebBrowser
*
);
void
WebBrowser_Persist_Init
(
WebBrowser
*
);
void
WebBrowser_Persist_Init
(
WebBrowser
*
);
void
WebBrowser_ClassInfo_Init
(
WebBrowser
*
);
void
WebBrowser_ClassInfo_Init
(
WebBrowser
*
);
void
WebBrowser_Misc_Init
(
WebBrowser
*
);
void
WebBrowser_Misc_Init
(
WebBrowser
*
);
void
WebBrowser_Events_Init
(
WebBrowser
*
);
HRESULT
WebBrowser_Create
(
IUnknown
*
,
REFIID
,
void
**
);
HRESULT
WebBrowser_Create
(
IUnknown
*
,
REFIID
,
void
**
);
/**********************************************************************
/**********************************************************************
* IConnectionPointContainer declaration for SHDOCVW.DLL
*/
typedef
struct
{
/* IUnknown fields */
const
IConnectionPointContainerVtbl
*
lpVtbl
;
LONG
ref
;
}
IConnectionPointContainerImpl
;
extern
IConnectionPointContainerImpl
SHDOCVW_ConnectionPointContainer
;
/**********************************************************************
* IConnectionPoint declaration for SHDOCVW.DLL
* IConnectionPoint declaration for SHDOCVW.DLL
*/
*/
typedef
struct
typedef
struct
...
...
dlls/shdocvw/webbrowser.c
View file @
b241d517
...
@@ -78,8 +78,8 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser *iface, REFIID riid,
...
@@ -78,8 +78,8 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser *iface, REFIID riid,
TRACE
(
"(%p)->(IID_IQuickActivate %p)
\n
"
,
This
,
ppv
);
TRACE
(
"(%p)->(IID_IQuickActivate %p)
\n
"
,
This
,
ppv
);
*
ppv
=
QUICKACT
(
This
);
*
ppv
=
QUICKACT
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IConnectionPointContainer
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_IConnectionPointContainer
,
riid
))
{
FIXM
E
(
"(%p)->(IID_IConnectionPointContainer %p)
\n
"
,
This
,
ppv
);
TRAC
E
(
"(%p)->(IID_IConnectionPointContainer %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
SHDOCVW_ConnectionPointContainer
;
*
ppv
=
CONPTCONT
(
This
)
;
}
}
if
(
*
ppv
)
{
if
(
*
ppv
)
{
...
@@ -388,6 +388,7 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
...
@@ -388,6 +388,7 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
WebBrowser_Persist_Init
(
ret
);
WebBrowser_Persist_Init
(
ret
);
WebBrowser_ClassInfo_Init
(
ret
);
WebBrowser_ClassInfo_Init
(
ret
);
WebBrowser_Misc_Init
(
ret
);
WebBrowser_Misc_Init
(
ret
);
WebBrowser_Events_Init
(
ret
);
hres
=
IWebBrowser_QueryInterface
(
WEBBROWSER
(
ret
),
riid
,
ppv
);
hres
=
IWebBrowser_QueryInterface
(
WEBBROWSER
(
ret
),
riid
,
ppv
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
...
...
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