shdocvw: Move the private class factory declaration into factory.c.
This commit is contained in:
parent
ea343153c8
commit
c1caf43d10
|
@ -30,6 +30,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
|||
* (Based on implementation in ddraw/main.c)
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
const IClassFactoryVtbl *lpVtbl;
|
||||
HRESULT (*cf)(LPUNKNOWN, REFIID, LPVOID *);
|
||||
LONG ref;
|
||||
} IClassFactoryImpl;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* WBCF_QueryInterface (IUnknown)
|
||||
*/
|
||||
|
@ -78,7 +87,8 @@ static ULONG WINAPI WBCF_Release(LPCLASSFACTORY iface)
|
|||
static HRESULT WINAPI WBCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
return WebBrowser_Create(pOuter, riid, ppobj);
|
||||
IClassFactoryImpl *This = (IClassFactoryImpl *) iface;
|
||||
return This->cf(pOuter, riid, ppobj);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
|
@ -105,4 +115,9 @@ static const IClassFactoryVtbl WBCF_Vtbl =
|
|||
WBCF_LockServer
|
||||
};
|
||||
|
||||
IClassFactoryImpl SHDOCVW_ClassFactory = {&WBCF_Vtbl};
|
||||
static IClassFactoryImpl SHDOCVW_WBClassFactory = {&WBCF_Vtbl, WebBrowser_Create};
|
||||
|
||||
IClassFactory *get_class_factory(void)
|
||||
{
|
||||
return (IClassFactory*) &SHDOCVW_WBClassFactory;
|
||||
}
|
||||
|
|
|
@ -39,18 +39,6 @@
|
|||
#include "mshtmhst.h"
|
||||
#include "hlink.h"
|
||||
|
||||
/**********************************************************************
|
||||
* IClassFactory declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
const IClassFactoryVtbl *lpVtbl;
|
||||
LONG ref;
|
||||
} IClassFactoryImpl;
|
||||
|
||||
extern IClassFactoryImpl SHDOCVW_ClassFactory;
|
||||
|
||||
/**********************************************************************
|
||||
* Shell Instance Objects
|
||||
*/
|
||||
|
@ -188,5 +176,6 @@ extern HINSTANCE shdocvw_hinstance;
|
|||
extern void register_iewindow_class(void);
|
||||
extern void unregister_iewindow_class(void);
|
||||
extern BOOL create_ie_window(LPCWSTR url);
|
||||
extern IClassFactory *get_class_factory(void);
|
||||
|
||||
#endif /* __WINE_SHDOCVW_H */
|
||||
|
|
|
@ -475,8 +475,9 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
|||
IsEqualIID(&IID_IClassFactory, riid))
|
||||
{
|
||||
/* Pass back our shdocvw class factory */
|
||||
*ppv = (LPVOID)&SHDOCVW_ClassFactory;
|
||||
IClassFactory_AddRef((IClassFactory*)&SHDOCVW_ClassFactory);
|
||||
IClassFactory *cf = get_class_factory();
|
||||
IClassFactory_AddRef(cf);
|
||||
*ppv = cf;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue