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
6f075693
Commit
6f075693
authored
Sep 07, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 07, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make IOleControl and IOleInPlaceObject interface heap based.
parent
087de7d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
110 additions
and
128 deletions
+110
-128
oleobject.c
dlls/shdocvw/oleobject.c
+91
-92
shdocvw.h
dlls/shdocvw/shdocvw.h
+8
-28
webbrowser.c
dlls/shdocvw/webbrowser.c
+11
-8
No files found.
dlls/shdocvw/oleobject.c
View file @
6f075693
...
...
@@ -260,32 +260,33 @@ static const IOleObjectVtbl OleObjectVtbl =
* Implement the IOleInPlaceObject interface
*/
static
HRESULT
WINAPI
WBOIPO_QueryInterface
(
LPOLEINPLACEOBJECT
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
#define INPLACEOBJ_THIS(iface) DEFINE_THIS(WebBrowser, OleInPlaceObject, iface)
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
static
HRESULT
WINAPI
OleInPlaceObject_QueryInterface
(
IOleInPlaceObject
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
WebBrowser
*
This
=
INPLACEOBJ_THIS
(
iface
);
return
IWebBrowser_QueryInterface
(
WEBBROWSER
(
This
),
riid
,
ppobj
);
}
static
ULONG
WINAPI
WBOIPO_AddRef
(
LPOLEINPLACEOBJECT
iface
)
static
ULONG
WINAPI
OleInPlaceObject_AddRef
(
IOleInPlaceObject
*
iface
)
{
SHDOCVW_LockModule
();
return
2
;
/* non-heap based object */
WebBrowser
*
This
=
INPLACEOBJ_THIS
(
iface
);
return
IWebBrowser_AddRef
(
WEBBROWSER
(
This
));
}
static
ULONG
WINAPI
WBOIPO_Release
(
LPOLEINPLACEOBJECT
iface
)
static
ULONG
WINAPI
OleInPlaceObject_Release
(
IOleInPlaceObject
*
iface
)
{
SHDOCVW_UnlockModule
();
return
1
;
/* non-heap based object */
WebBrowser
*
This
=
INPLACEOBJ_THIS
(
iface
);
return
IWebBrowser_Release
(
WEBBROWSER
(
This
));
}
static
HRESULT
WINAPI
WBOIPO_GetWindow
(
LPOLEINPLACEOBJECT
iface
,
HWND
*
phwnd
)
static
HRESULT
WINAPI
OleInPlaceObject_GetWindow
(
IOleInPlaceObject
*
iface
,
HWND
*
phwnd
)
{
WebBrowser
*
This
=
INPLACEOBJ_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
phwnd
);
#if 0
/* Create a fake window to fool MFC into believing that we actually
* have an implemented browser control. Avoids the assertion.
...
...
@@ -300,132 +301,130 @@ static HRESULT WINAPI WBOIPO_GetWindow(LPOLEINPLACEOBJECT iface, HWND* phwnd)
TRACE ("Returning hwnd = %d\n", hwnd);
#endif
FIXME
(
"stub HWND* = %p
\n
"
,
phwnd
);
return
S_OK
;
}
static
HRESULT
WINAPI
WBOIPO_ContextSensitiveHelp
(
LPOLEINPLACEOBJECT
iface
,
BOOL
fEnterMode
)
static
HRESULT
WINAPI
OleInPlaceObject_ContextSensitiveHelp
(
IOleInPlaceObject
*
iface
,
BOOL
fEnterMode
)
{
FIXME
(
"stub fEnterMode = %d
\n
"
,
fEnterMode
);
return
S_OK
;
WebBrowser
*
This
=
INPLACEOBJ_THIS
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
fEnterMode
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WBOIPO_InPlaceDeactivate
(
LPOLEINPLACEOBJECT
iface
)
static
HRESULT
WINAPI
OleInPlaceObject_InPlaceDeactivate
(
IOleInPlaceObject
*
iface
)
{
FIXME
(
"stub
\n
"
);
return
S_OK
;
WebBrowser
*
This
=
INPLACEOBJ_THIS
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WBOIPO_UIDeactivate
(
LPOLEINPLACEOBJECT
iface
)
static
HRESULT
WINAPI
OleInPlaceObject_UIDeactivate
(
IOleInPlaceObject
*
iface
)
{
FIXME
(
"stub
\n
"
);
return
S_OK
;
WebBrowser
*
This
=
INPLACEOBJ_THIS
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WBOIPO_SetObjectRects
(
LPOLEINPLACEOBJECT
iface
,
LPCRECT
lprcPosRect
,
LPCRECT
lprcClipRect
)
static
HRESULT
WINAPI
OleInPlaceObject_SetObjectRects
(
IOleInPlaceObject
*
iface
,
LPCRECT
lprcPosRect
,
LPCRECT
lprcClipRect
)
{
FIXME
(
"stub PosRect = %p, ClipRect = %p
\n
"
,
lprcPosRect
,
lprcClipRect
);
return
S_OK
;
WebBrowser
*
This
=
INPLACEOBJ_THIS
(
iface
);
FIXME
(
"(%p)->(%p %p)
\n
"
,
This
,
lprcPosRect
,
lprcClipRect
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WBOIPO_ReactivateAndUndo
(
LPOLEINPLACEOBJECT
iface
)
static
HRESULT
WINAPI
OleInPlaceObject_ReactivateAndUndo
(
IOleInPlaceObject
*
iface
)
{
FIXME
(
"stub
\n
"
);
return
S_OK
;
WebBrowser
*
This
=
INPLACEOBJ_THIS
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
/**********************************************************************
* IOleInPlaceObject virtual function table for IE Web Browser component
*/
#undef INPLACEOBJ_THIS
static
const
IOleInPlaceObjectVtbl
WBOIPO_
Vtbl
=
{
WBOIPO
_QueryInterface
,
WBOIPO
_AddRef
,
WBOIPO
_Release
,
WBOIPO
_GetWindow
,
WBOIPO
_ContextSensitiveHelp
,
WBOIPO
_InPlaceDeactivate
,
WBOIPO
_UIDeactivate
,
WBOIPO
_SetObjectRects
,
WBOIPO
_ReactivateAndUndo
static
const
IOleInPlaceObjectVtbl
OleInPlaceObject
Vtbl
=
{
OleInPlaceObject
_QueryInterface
,
OleInPlaceObject
_AddRef
,
OleInPlaceObject
_Release
,
OleInPlaceObject
_GetWindow
,
OleInPlaceObject
_ContextSensitiveHelp
,
OleInPlaceObject
_InPlaceDeactivate
,
OleInPlaceObject
_UIDeactivate
,
OleInPlaceObject
_SetObjectRects
,
OleInPlaceObject
_ReactivateAndUndo
};
IOleInPlaceObjectImpl
SHDOCVW_OleInPlaceObject
=
{
&
WBOIPO_Vtbl
};
/**********************************************************************
* Implement the IOleControl interface
*/
static
HRESULT
WINAPI
WBOC_QueryInterface
(
LPOLECONTROL
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
#define CONTROL_THIS(iface) DEFINE_THIS(WebBrowser, OleControl, iface)
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
static
HRESULT
WINAPI
OleControl_QueryInterface
(
IOleControl
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
WebBrowser
*
This
=
CONTROL_THIS
(
iface
);
return
IWebBrowser_QueryInterface
(
WEBBROWSER
(
This
),
riid
,
ppobj
);
}
static
ULONG
WINAPI
WBOC_AddRef
(
LPOLECONTROL
iface
)
static
ULONG
WINAPI
OleControl_AddRef
(
IOleControl
*
iface
)
{
SHDOCVW_LockModule
();
return
2
;
/* non-heap based object */
WebBrowser
*
This
=
CONTROL_THIS
(
iface
);
return
IWebBrowser_AddRef
(
WEBBROWSER
(
This
));
}
static
ULONG
WINAPI
WBOC_Release
(
LPOLECONTROL
iface
)
static
ULONG
WINAPI
OleControl_Release
(
IOleControl
*
iface
)
{
SHDOCVW_UnlockModule
();
return
1
;
/* non-heap based object */
WebBrowser
*
This
=
CONTROL_THIS
(
iface
);
return
IWebBrowser_Release
(
WEBBROWSER
(
This
));
}
static
HRESULT
WINAPI
WBOC_GetControlInfo
(
LPOLECONTROL
iface
,
LPCONTROLINFO
pCI
)
static
HRESULT
WINAPI
OleControl_GetControlInfo
(
IOleControl
*
iface
,
LPCONTROLINFO
pCI
)
{
FIXME
(
"stub: LPCONTROLINFO = %p
\n
"
,
pCI
);
return
S_OK
;
WebBrowser
*
This
=
CONTROL_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pCI
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WBOC_OnMnemonic
(
LPOLECONTROL
iface
,
struct
tagMSG
*
pMsg
)
static
HRESULT
WINAPI
OleControl_OnMnemonic
(
IOleControl
*
iface
,
struct
tagMSG
*
pMsg
)
{
FIXME
(
"stub: MSG* = %p
\n
"
,
pMsg
);
return
S_OK
;
WebBrowser
*
This
=
CONTROL_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pMsg
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WBOC_OnAmbientPropertyChange
(
LPOLECONTROL
iface
,
DISPID
dispID
)
static
HRESULT
WINAPI
OleControl_OnAmbientPropertyChange
(
IOleControl
*
iface
,
DISPID
dispID
)
{
FIXME
(
"stub: DISPID = %ld
\n
"
,
dispID
);
return
S_OK
;
WebBrowser
*
This
=
CONTROL_THIS
(
iface
);
FIXME
(
"(%p)->(%ld)
\n
"
,
This
,
dispID
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WBOC_FreezeEvents
(
LPOLECONTROL
iface
,
BOOL
bFreeze
)
static
HRESULT
WINAPI
OleControl_FreezeEvents
(
IOleControl
*
iface
,
BOOL
bFreeze
)
{
FIXME
(
"stub: bFreeze = %d
\n
"
,
bFreeze
);
return
S_OK
;
WebBrowser
*
This
=
CONTROL_THIS
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
bFreeze
);
return
E_NOTIMPL
;
}
/**********************************************************************
* IOleControl virtual function table for IE Web Browser component
*/
#undef CONTROL_THIS
static
const
IOleControlVtbl
WBOC_
Vtbl
=
static
const
IOleControlVtbl
OleControl
Vtbl
=
{
WBOC
_QueryInterface
,
WBOC
_AddRef
,
WBOC
_Release
,
WBOC
_GetControlInfo
,
WBOC
_OnMnemonic
,
WBOC
_OnAmbientPropertyChange
,
WBOC
_FreezeEvents
OleControl
_QueryInterface
,
OleControl
_AddRef
,
OleControl
_Release
,
OleControl
_GetControlInfo
,
OleControl
_OnMnemonic
,
OleControl
_OnAmbientPropertyChange
,
OleControl
_FreezeEvents
};
IOleControlImpl
SHDOCVW_OleControl
=
{
&
WBOC_Vtbl
};
void
WebBrowser_OleObject_Init
(
WebBrowser
*
This
)
{
This
->
lpOleObjectVtbl
=
&
OleObjectVtbl
;
This
->
lpOleObjectVtbl
=
&
OleObjectVtbl
;
This
->
lpOleInPlaceObjectVtbl
=
&
OleInPlaceObjectVtbl
;
This
->
lpOleControlVtbl
=
&
OleControlVtbl
;
}
dlls/shdocvw/shdocvw.h
View file @
6f075693
...
...
@@ -53,14 +53,18 @@ extern IClassFactoryImpl SHDOCVW_ClassFactory;
* WebBrowser declaration for SHDOCVW.DLL
*/
typedef
struct
{
const
IWebBrowserVtbl
*
lpWebBrowserVtbl
;
const
IOleObjectVtbl
*
lpOleObjectVtbl
;
const
IWebBrowserVtbl
*
lpWebBrowserVtbl
;
const
IOleObjectVtbl
*
lpOleObjectVtbl
;
const
IOleInPlaceObjectVtbl
*
lpOleInPlaceObjectVtbl
;
const
IOleControlVtbl
*
lpOleControlVtbl
;
LONG
ref
;
}
WebBrowser
;
#define WEBBROWSER(x) ((IWebBrowser*) &(x)->lpWebBrowserVtbl)
#define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl)
#define WEBBROWSER(x) ((IWebBrowser*) &(x)->lpWebBrowserVtbl)
#define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl)
#define INPLACEOBJ(x) ((IOleInPlaceObject*) &(x)->lpOleInPlaceObjectVtbl)
#define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
void
WebBrowser_OleObject_Init
(
WebBrowser
*
);
...
...
@@ -154,30 +158,6 @@ typedef struct
LONG
ref
;
}
IConnectionPointImpl
;
/**********************************************************************
* IOleInPlaceObject declaration for SHDOCVW.DLL
*/
typedef
struct
{
/* IUnknown fields */
const
IOleInPlaceObjectVtbl
*
lpVtbl
;
DWORD
ref
;
}
IOleInPlaceObjectImpl
;
extern
IOleInPlaceObjectImpl
SHDOCVW_OleInPlaceObject
;
/**********************************************************************
* IOleControl declaration for SHDOCVW.DLL
*/
typedef
struct
{
/* IUnknown fields */
const
IOleControlVtbl
*
lpVtbl
;
DWORD
ref
;
}
IOleControlImpl
;
extern
IOleControlImpl
SHDOCVW_OleControl
;
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
/**********************************************************************
...
...
dlls/shdocvw/webbrowser.c
View file @
6f075693
...
...
@@ -42,14 +42,23 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser *iface, REFIID riid,
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
WEBBROWSER
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
FIXM
E
(
"(%p)->(IID_IDispatch %p)
\n
"
,
This
,
ppv
);
TRAC
E
(
"(%p)->(IID_IDispatch %p)
\n
"
,
This
,
ppv
);
*
ppv
=
WEBBROWSER
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IWebBrowser
,
riid
))
{
TRACE
(
"(%p)->(IID_IWebBrowser %p)
\n
"
,
This
,
ppv
);
*
ppv
=
WEBBROWSER
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IOleObject
,
riid
))
{
FIXM
E
(
"(%p)->(IID_IOleObject %p)
\n
"
,
This
,
ppv
);
TRAC
E
(
"(%p)->(IID_IOleObject %p)
\n
"
,
This
,
ppv
);
*
ppv
=
OLEOBJ
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IOleWindow
,
riid
))
{
TRACE
(
"(%p)->(IID_IOleWindow %p)
\n
"
,
This
,
ppv
);
*
ppv
=
INPLACEOBJ
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IOleInPlaceObject
,
riid
))
{
TRACE
(
"(%p)->(IID_IOleInPlaceObject %p)
\n
"
,
This
,
ppv
);
*
ppv
=
INPLACEOBJ
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IOleControl
,
riid
))
{
FIXME
(
"(%p)->(IID_IOleControl %p)
\n
"
,
This
,
ppv
);
*
ppv
=
CONTROL
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IPersistStorage
,
riid
))
{
FIXME
(
"(%p)->(IID_IPersistStorage %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
SHDOCVW_PersistStorage
;
...
...
@@ -68,12 +77,6 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser *iface, REFIID riid,
}
else
if
(
IsEqualGUID
(
&
IID_IConnectionPointContainer
,
riid
))
{
FIXME
(
"(%p)->(IID_IConnectionPointContainer %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
SHDOCVW_ConnectionPointContainer
;
}
else
if
(
IsEqualGUID
(
&
IID_IOleInPlaceObject
,
riid
))
{
FIXME
(
"(%p)->(IID_IOleInPlaceObject %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
SHDOCVW_OleInPlaceObject
;
}
else
if
(
IsEqualGUID
(
&
IID_IOleControl
,
riid
))
{
FIXME
(
"(%p)->(IID_IOleControl %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
SHDOCVW_OleControl
;
}
if
(
*
ppv
)
{
...
...
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