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)
* Copyright 2001 John R. Sheets (for CodeWeavers)
*
*
...
@@ -29,96 +29,35 @@
...
@@ -29,96 +29,35 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
shdocvw
);
WINE_DEFAULT_DEBUG_CHANNEL
(
shdocvw
);
/**********************************************************************
/**********************************************************************
* Implement the IProvideClassInfo interface
* Implement the IProvideClassInfo2 interface
*
* FIXME: Should we just pass in the IProvideClassInfo2 methods rather
* reimplementing them here?
*/
*/
static
HRESULT
WINAPI
WBPCI_QueryInterface
(
LPPROVIDECLASSINFO
iface
,
#define CLASSINFO_THIS(iface) DEFINE_THIS(WebBrowser, ProvideClassInfo, 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
;
}
static
ULONG
WINAPI
WBPCI_AddRef
(
LPPROVIDECLASSINFO
iface
)
static
HRESULT
WINAPI
ProvideClassInfo_QueryInterface
(
IProvideClassInfo2
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
{
SHDOCVW_LockModule
();
WebBrowser
*
This
=
CLASSINFO_THIS
(
iface
);
return
IWebBrowser_QueryInterface
(
WEBBROWSER
(
This
),
riid
,
ppobj
);
return
2
;
/* non-heap based object */
}
}
static
ULONG
WINAPI
WBPCI_Release
(
LPPROVIDECLASSINFO
iface
)
static
ULONG
WINAPI
ProvideClassInfo_AddRef
(
IProvideClassInfo2
*
iface
)
{
{
SHDOCVW_UnlockModule
();
WebBrowser
*
This
=
CLASSINFO_THIS
(
iface
);
return
IWebBrowser_AddRef
(
WEBBROWSER
(
This
));
return
1
;
/* non-heap based object */
}
}
/* Return an ITypeInfo interface to retrieve type library info about
static
ULONG
WINAPI
ProvideClassInfo_Release
(
IProvideClassInfo2
*
iface
)
* this control.
*/
static
HRESULT
WINAPI
WBPCI_GetClassInfo
(
LPPROVIDECLASSINFO
iface
,
LPTYPEINFO
*
ppTI
)
{
{
FIXME
(
"stub: LPTYPEINFO = %p
\n
"
,
*
ppTI
);
WebBrowser
*
This
=
CLASSINFO_THIS
(
iface
);
return
S_OK
;
return
IWebBrowser_Release
(
WEBBROWSER
(
This
))
;
}
}
/**********************************************************************
static
HRESULT
WINAPI
ProvideClassInfo_GetClassInfo
(
IProvideClassInfo2
*
iface
,
LPTYPEINFO
*
ppTI
)
* 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
)
{
{
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
WebBrowser
*
This
=
CLASSINFO_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppTI
);
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOTIMPL
;
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
;
}
}
/* Get the IID for generic default event callbacks. This IID will
/* Get the IID for generic default event callbacks. This IID will
...
@@ -126,10 +65,12 @@ static HRESULT WINAPI WBPCI2_GetClassInfo(LPPROVIDECLASSINFO2 iface, LPTYPEINFO
...
@@ -126,10 +65,12 @@ static HRESULT WINAPI WBPCI2_GetClassInfo(LPPROVIDECLASSINFO2 iface, LPTYPEINFO
* an event sink (callback implementation in the OLE control site)
* an event sink (callback implementation in the OLE control site)
* to this control.
* to this control.
*/
*/
static
HRESULT
WINAPI
WBPCI2_GetGUID
(
LPPROVIDECLASSINFO2
iface
,
static
HRESULT
WINAPI
ProvideClassInfo_GetGUID
(
IProvideClassInfo2
*
iface
,
DWORD
dwGuidKind
,
GUID
*
pGUID
)
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
)
if
(
dwGuidKind
!=
GUIDKIND_DEFAULT_SOURCE_DISP_IID
)
{
{
...
@@ -150,17 +91,18 @@ static HRESULT WINAPI WBPCI2_GetGUID(LPPROVIDECLASSINFO2 iface,
...
@@ -150,17 +91,18 @@ static HRESULT WINAPI WBPCI2_GetGUID(LPPROVIDECLASSINFO2 iface,
return
S_OK
;
return
S_OK
;
}
}
/**********************************************************************
#undef CLASSINFO_THIS
* IProvideClassInfo virtual function table for IE Web Browser component
*/
static
const
IProvideClassInfo2Vtbl
WBPCI2_
Vtbl
=
static
const
IProvideClassInfo2Vtbl
ProvideClassInfo
Vtbl
=
{
{
WBPCI2
_QueryInterface
,
ProvideClassInfo
_QueryInterface
,
WBPCI2
_AddRef
,
ProvideClassInfo
_AddRef
,
WBPCI2
_Release
,
ProvideClassInfo
_Release
,
WBPCI2
_GetClassInfo
,
ProvideClassInfo
_GetClassInfo
,
WBPCI2
_GetGUID
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 {
...
@@ -59,6 +59,7 @@ typedef struct {
const
IOleControlVtbl
*
lpOleControlVtbl
;
const
IOleControlVtbl
*
lpOleControlVtbl
;
const
IPersistStorageVtbl
*
lpPersistStorageVtbl
;
const
IPersistStorageVtbl
*
lpPersistStorageVtbl
;
const
IPersistStreamInitVtbl
*
lpPersistStreamInitVtbl
;
const
IPersistStreamInitVtbl
*
lpPersistStreamInitVtbl
;
const
IProvideClassInfo2Vtbl
*
lpProvideClassInfoVtbl
;
LONG
ref
;
LONG
ref
;
}
WebBrowser
;
}
WebBrowser
;
...
@@ -69,38 +70,15 @@ typedef struct {
...
@@ -69,38 +70,15 @@ typedef struct {
#define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
#define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
#define PERSTORAGE(x) ((IPersistStorage*) &(x)->lpPersistStorageVtbl)
#define PERSTORAGE(x) ((IPersistStorage*) &(x)->lpPersistStorageVtbl)
#define PERSTRINIT(x) ((IPersistStreamInit*) &(x)->lpPersistStreamInitVtbl)
#define PERSTRINIT(x) ((IPersistStreamInit*) &(x)->lpPersistStreamInitVtbl)
#define CLASSINFO(x) ((IProvideClassInfo2*) &(x)->lpProvideClassInfoVtbl)
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
*
);
HRESULT
WebBrowser_Create
(
IUnknown
*
,
REFIID
,
void
**
);
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
* IQuickActivate declaration for SHDOCVW.DLL
*/
*/
typedef
struct
typedef
struct
...
...
dlls/shdocvw/webbrowser.c
View file @
09d9f429
...
@@ -69,11 +69,11 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser *iface, REFIID riid,
...
@@ -69,11 +69,11 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser *iface, REFIID riid,
TRACE
(
"(%p)->(IID_IPersistStreamInit %p)
\n
"
,
This
,
ppv
);
TRACE
(
"(%p)->(IID_IPersistStreamInit %p)
\n
"
,
This
,
ppv
);
*
ppv
=
PERSTRINIT
(
This
);
*
ppv
=
PERSTRINIT
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo
,
riid
))
{
FIXM
E
(
"(%p)->(IID_IProvideClassInfo %p)
\n
"
,
This
,
ppv
);
TRAC
E
(
"(%p)->(IID_IProvideClassInfo %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
SHDOCVW_ProvideClassInfo
;
*
ppv
=
CLASSINFO
(
This
)
;
}
else
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo2
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo2
,
riid
))
{
FIXM
E
(
"(%p)->(IID_IProvideClassInfo2 %p)
\n
"
,
This
,
ppv
);
TRAC
E
(
"(%p)->(IID_IProvideClassInfo2 %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
SHDOCVW_ProvideClassInfo2
;
*
ppv
=
CLASSINFO
(
This
)
;
}
else
if
(
IsEqualGUID
(
&
IID_IQuickActivate
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_IQuickActivate
,
riid
))
{
FIXME
(
"(%p)->(IID_IQuickActivate %p)
\n
"
,
This
,
ppv
);
FIXME
(
"(%p)->(IID_IQuickActivate %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
SHDOCVW_QuickActivate
;
*
ppv
=
&
SHDOCVW_QuickActivate
;
...
@@ -386,6 +386,7 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
...
@@ -386,6 +386,7 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
WebBrowser_OleObject_Init
(
ret
);
WebBrowser_OleObject_Init
(
ret
);
WebBrowser_Persist_Init
(
ret
);
WebBrowser_Persist_Init
(
ret
);
WebBrowser_ClassInfo_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