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
09d9f429
Commit
09d9f429
authored
Sep 08, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make IProvideClassInfo2 interface heap based.
parent
613cf578
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
120 deletions
+41
-120
classinfo.c
dlls/shdocvw/classinfo.c
+33
-91
shdocvw.h
dlls/shdocvw/shdocvw.h
+3
-25
webbrowser.c
dlls/shdocvw/webbrowser.c
+5
-4
No files found.
dlls/shdocvw/classinfo.c
View file @
09d9f429
/*
* Implementation of IProvideClassInfo interfaces for
IE Web
Browser control
* Implementation of IProvideClassInfo interfaces for
Web
Browser control
*
* Copyright 2001 John R. Sheets (for CodeWeavers)
*
...
...
@@ -29,96 +29,35 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
shdocvw
);
/**********************************************************************
* Implement the IProvideClassInfo interface
*
* FIXME: Should we just pass in the IProvideClassInfo2 methods rather
* reimplementing them here?
* Implement the IProvideClassInfo2 interface
*/
static
HRESULT
WINAPI
WBPCI_QueryInterface
(
LPPROVIDECLASSINFO
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
#define CLASSINFO_THIS(iface) DEFINE_THIS(WebBrowser, ProvideClassInfo, iface)
static
ULONG
WINAPI
WBPCI_AddRef
(
LPPROVIDECLASSINFO
iface
)
static
HRESULT
WINAPI
ProvideClassInfo_QueryInterface
(
IProvideClassInfo2
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
SHDOCVW_LockModule
();
return
2
;
/* non-heap based object */
WebBrowser
*
This
=
CLASSINFO_THIS
(
iface
);
return
IWebBrowser_QueryInterface
(
WEBBROWSER
(
This
),
riid
,
ppobj
);
}
static
ULONG
WINAPI
WBPCI_Release
(
LPPROVIDECLASSINFO
iface
)
static
ULONG
WINAPI
ProvideClassInfo_AddRef
(
IProvideClassInfo2
*
iface
)
{
SHDOCVW_UnlockModule
();
return
1
;
/* non-heap based object */
WebBrowser
*
This
=
CLASSINFO_THIS
(
iface
);
return
IWebBrowser_AddRef
(
WEBBROWSER
(
This
));
}
/* Return an ITypeInfo interface to retrieve type library info about
* this control.
*/
static
HRESULT
WINAPI
WBPCI_GetClassInfo
(
LPPROVIDECLASSINFO
iface
,
LPTYPEINFO
*
ppTI
)
static
ULONG
WINAPI
ProvideClassInfo_Release
(
IProvideClassInfo2
*
iface
)
{
FIXME
(
"stub: LPTYPEINFO = %p
\n
"
,
*
ppTI
);
return
S_OK
;
WebBrowser
*
This
=
CLASSINFO_THIS
(
iface
);
return
IWebBrowser_Release
(
WEBBROWSER
(
This
))
;
}
/**********************************************************************
* IProvideClassInfo virtual function table for IE Web Browser component
*/
static
const
IProvideClassInfoVtbl
WBPCI_Vtbl
=
{
WBPCI_QueryInterface
,
WBPCI_AddRef
,
WBPCI_Release
,
WBPCI_GetClassInfo
};
IProvideClassInfoImpl
SHDOCVW_ProvideClassInfo
=
{
&
WBPCI_Vtbl
};
/**********************************************************************
* Implement the IProvideClassInfo2 interface (inherits from
* IProvideClassInfo).
*/
static
HRESULT
WINAPI
WBPCI2_QueryInterface
(
LPPROVIDECLASSINFO2
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
static
HRESULT
WINAPI
ProvideClassInfo_GetClassInfo
(
IProvideClassInfo2
*
iface
,
LPTYPEINFO
*
ppTI
)
{
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
WBPCI2_AddRef
(
LPPROVIDECLASSINFO2
iface
)
{
SHDOCVW_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
WBPCI2_Release
(
LPPROVIDECLASSINFO2
iface
)
{
SHDOCVW_UnlockModule
();
return
1
;
/* non-heap based object */
}
/* Return an ITypeInfo interface to retrieve type library info about
* this control.
*/
static
HRESULT
WINAPI
WBPCI2_GetClassInfo
(
LPPROVIDECLASSINFO2
iface
,
LPTYPEINFO
*
ppTI
)
{
FIXME
(
"stub: LPTYPEINFO = %p
\n
"
,
*
ppTI
);
return
S_OK
;
WebBrowser
*
This
=
CLASSINFO_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppTI
);
return
E_NOTIMPL
;
}
/* Get the IID for generic default event callbacks. This IID will
...
...
@@ -126,10 +65,12 @@ static HRESULT WINAPI WBPCI2_GetClassInfo(LPPROVIDECLASSINFO2 iface, LPTYPEINFO
* an event sink (callback implementation in the OLE control site)
* to this control.
*/
static
HRESULT
WINAPI
WBPCI2_GetGUID
(
LPPROVIDECLASSINFO2
iface
,
DWORD
dwGuidKind
,
GUID
*
pGUID
)
static
HRESULT
WINAPI
ProvideClassInfo_GetGUID
(
IProvideClassInfo2
*
iface
,
DWORD
dwGuidKind
,
GUID
*
pGUID
)
{
FIXME
(
"stub: dwGuidKind = %ld, pGUID = %s
\n
"
,
dwGuidKind
,
debugstr_guid
(
pGUID
));
WebBrowser
*
This
=
CLASSINFO_THIS
(
iface
);
FIXME
(
"(%p)->(%ld %p)
\n
"
,
This
,
dwGuidKind
,
pGUID
);
if
(
dwGuidKind
!=
GUIDKIND_DEFAULT_SOURCE_DISP_IID
)
{
...
...
@@ -150,17 +91,18 @@ static HRESULT WINAPI WBPCI2_GetGUID(LPPROVIDECLASSINFO2 iface,
return
S_OK
;
}
/**********************************************************************
* IProvideClassInfo virtual function table for IE Web Browser component
*/
#undef CLASSINFO_THIS
static
const
IProvideClassInfo2Vtbl
WBPCI2_
Vtbl
=
static
const
IProvideClassInfo2Vtbl
ProvideClassInfo
Vtbl
=
{
WBPCI2
_QueryInterface
,
WBPCI2
_AddRef
,
WBPCI2
_Release
,
WBPCI2
_GetClassInfo
,
WBPCI2
_GetGUID
ProvideClassInfo
_QueryInterface
,
ProvideClassInfo
_AddRef
,
ProvideClassInfo
_Release
,
ProvideClassInfo
_GetClassInfo
,
ProvideClassInfo
_GetGUID
};
IProvideClassInfo2Impl
SHDOCVW_ProvideClassInfo2
=
{
&
WBPCI2_Vtbl
};
void
WebBrowser_ClassInfo_Init
(
WebBrowser
*
This
)
{
This
->
lpProvideClassInfoVtbl
=
&
ProvideClassInfoVtbl
;
}
dlls/shdocvw/shdocvw.h
View file @
09d9f429
...
...
@@ -59,6 +59,7 @@ typedef struct {
const
IOleControlVtbl
*
lpOleControlVtbl
;
const
IPersistStorageVtbl
*
lpPersistStorageVtbl
;
const
IPersistStreamInitVtbl
*
lpPersistStreamInitVtbl
;
const
IProvideClassInfo2Vtbl
*
lpProvideClassInfoVtbl
;
LONG
ref
;
}
WebBrowser
;
...
...
@@ -69,38 +70,15 @@ typedef struct {
#define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
#define PERSTORAGE(x) ((IPersistStorage*) &(x)->lpPersistStorageVtbl)
#define PERSTRINIT(x) ((IPersistStreamInit*) &(x)->lpPersistStreamInitVtbl)
#define CLASSINFO(x) ((IProvideClassInfo2*) &(x)->lpProvideClassInfoVtbl)
void
WebBrowser_OleObject_Init
(
WebBrowser
*
);
void
WebBrowser_Persist_Init
(
WebBrowser
*
);
void
WebBrowser_ClassInfo_Init
(
WebBrowser
*
);
HRESULT
WebBrowser_Create
(
IUnknown
*
,
REFIID
,
void
**
);
/**********************************************************************
* IProvideClassInfo declaration for SHDOCVW.DLL
*/
typedef
struct
{
/* IUnknown fields */
const
IProvideClassInfoVtbl
*
lpVtbl
;
LONG
ref
;
}
IProvideClassInfoImpl
;
extern
IProvideClassInfoImpl
SHDOCVW_ProvideClassInfo
;
/**********************************************************************
* IProvideClassInfo2 declaration for SHDOCVW.DLL
*/
typedef
struct
{
/* IUnknown fields */
const
IProvideClassInfo2Vtbl
*
lpVtbl
;
LONG
ref
;
}
IProvideClassInfo2Impl
;
extern
IProvideClassInfo2Impl
SHDOCVW_ProvideClassInfo2
;
/**********************************************************************
* IQuickActivate declaration for SHDOCVW.DLL
*/
typedef
struct
...
...
dlls/shdocvw/webbrowser.c
View file @
09d9f429
...
...
@@ -69,11 +69,11 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser *iface, REFIID riid,
TRACE
(
"(%p)->(IID_IPersistStreamInit %p)
\n
"
,
This
,
ppv
);
*
ppv
=
PERSTRINIT
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo
,
riid
))
{
FIXM
E
(
"(%p)->(IID_IProvideClassInfo %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
SHDOCVW_ProvideClassInfo
;
TRAC
E
(
"(%p)->(IID_IProvideClassInfo %p)
\n
"
,
This
,
ppv
);
*
ppv
=
CLASSINFO
(
This
)
;
}
else
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo2
,
riid
))
{
FIXM
E
(
"(%p)->(IID_IProvideClassInfo2 %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
SHDOCVW_ProvideClassInfo2
;
TRAC
E
(
"(%p)->(IID_IProvideClassInfo2 %p)
\n
"
,
This
,
ppv
);
*
ppv
=
CLASSINFO
(
This
)
;
}
else
if
(
IsEqualGUID
(
&
IID_IQuickActivate
,
riid
))
{
FIXME
(
"(%p)->(IID_IQuickActivate %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
SHDOCVW_QuickActivate
;
...
...
@@ -386,6 +386,7 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
WebBrowser_OleObject_Init
(
ret
);
WebBrowser_Persist_Init
(
ret
);
WebBrowser_ClassInfo_Init
(
ret
);
hres
=
IWebBrowser_QueryInterface
(
WEBBROWSER
(
ret
),
riid
,
ppv
);
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