ReactOS 0.4.15-dev-7674-gc0b4db1
ieframe_main.c File Reference
#include "ieframe.h"
#include "initguid.h"
#include "rpcproxy.h"
#include "shlguid.h"
#include "isguids.h"
#include "ieautomation.h"
#include "wine/debug.h"
Include dependency graph for ieframe_main.c:

Go to the source code of this file.

Macros

#define XIID(iface)   &IID_ ## iface,
 
#define XCLSID(class)   &CLSID_ ## class,
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ieframe)
 
static HRESULT load_typelib (void)
 
HRESULT get_typeinfo (tid_t tid, ITypeInfo **typeinfo)
 
static void release_typelib (void)
 
static HRESULT WINAPI ClassFactory_QueryInterface (IClassFactory *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ClassFactory_AddRef (IClassFactory *iface)
 
static ULONG WINAPI ClassFactory_Release (IClassFactory *iface)
 
static HRESULT WINAPI ClassFactory_LockServer (IClassFactory *iface, BOOL fLock)
 
BOOL WINAPI DllMain (HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
 
HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
HRESULT WINAPI DllCanUnloadNow (void)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 
HRESULT WINAPI IEGetWriteableHKCU (HKEY *pkey)
 

Variables

LONG module_ref = 0
 
HINSTANCE ieframe_instance
 
static ITypeLibtypelib
 
static ITypeInfotypeinfos [LAST_tid]
 
static REFIID tid_ids []
 
static const IClassFactoryVtbl WebBrowserFactoryVtbl
 
static IClassFactory WebBrowserFactory = { &WebBrowserFactoryVtbl }
 
static const IClassFactoryVtbl WebBrowserV1FactoryVtbl
 
static IClassFactory WebBrowserV1Factory = { &WebBrowserV1FactoryVtbl }
 
static const IClassFactoryVtbl InternetShortcutFactoryVtbl
 
static IClassFactory InternetShortcutFactory = { &InternetShortcutFactoryVtbl }
 
static const IClassFactoryVtbl CUrlHistoryFactoryVtbl
 
static IClassFactory CUrlHistoryFactory = { &CUrlHistoryFactoryVtbl }
 
static const IClassFactoryVtbl InternetExplorerFactoryVtbl
 
IClassFactory InternetExplorerFactory = { &InternetExplorerFactoryVtbl }
 
static const IClassFactoryVtbl InternetExplorerManagerFactoryVtbl
 
IClassFactory InternetExplorerManagerFactory = { &InternetExplorerManagerFactoryVtbl }
 

Macro Definition Documentation

◆ XCLSID

#define XCLSID (   class)    &CLSID_ ## class,

◆ XIID

#define XIID (   iface)    &IID_ ## iface,

Function Documentation

◆ ClassFactory_AddRef()

static ULONG WINAPI ClassFactory_AddRef ( IClassFactory iface)
static

Definition at line 123 of file ieframe_main.c.

124{
125 TRACE("(%p)\n", iface);
126 return 2;
127}
#define TRACE(s)
Definition: solgame.cpp:4

◆ ClassFactory_LockServer()

static HRESULT WINAPI ClassFactory_LockServer ( IClassFactory iface,
BOOL  fLock 
)
static

Definition at line 135 of file ieframe_main.c.

136{
137 TRACE("(%p)->(%x)\n", iface, fLock);
138 return S_OK;
139}
#define S_OK
Definition: intsafe.h:52

◆ ClassFactory_QueryInterface()

static HRESULT WINAPI ClassFactory_QueryInterface ( IClassFactory iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 102 of file ieframe_main.c.

103{
104 *ppv = NULL;
105
107 TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv);
108 *ppv = iface;
109 }else if(IsEqualGUID(&IID_IClassFactory, riid)) {
110 TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv);
111 *ppv = iface;
112 }
113
114 if(*ppv) {
115 IUnknown_AddRef((IUnknown*)*ppv);
116 return S_OK;
117 }
118
119 FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
120 return E_NOINTERFACE;
121}
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define FIXME(fmt,...)
Definition: debug.h:111
#define NULL
Definition: types.h:112
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ ClassFactory_Release()

static ULONG WINAPI ClassFactory_Release ( IClassFactory iface)
static

Definition at line 129 of file ieframe_main.c.

130{
131 TRACE("(%p)\n", iface);
132 return 1;
133}

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 256 of file ieframe_main.c.

257{
258 TRACE("()\n");
259 return module_ref ? S_FALSE : S_OK;
260}
LONG module_ref
Definition: ieframe_main.c:31
#define S_FALSE
Definition: winerror.h:2357

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  riid,
LPVOID ppv 
)

Definition at line 207 of file ieframe_main.c.

208{
209 if(IsEqualGUID(&CLSID_WebBrowser, rclsid)) {
210 TRACE("(CLSID_WebBrowser %s %p)\n", debugstr_guid(riid), ppv);
211 return IClassFactory_QueryInterface(&WebBrowserFactory, riid, ppv);
212 }
213
214 if(IsEqualGUID(&CLSID_WebBrowser_V1, rclsid)) {
215 TRACE("(CLSID_WebBrowser_V1 %s %p)\n", debugstr_guid(riid), ppv);
216 return IClassFactory_QueryInterface(&WebBrowserV1Factory, riid, ppv);
217 }
218
219 if(IsEqualGUID(rclsid, &CLSID_InternetShortcut)) {
220 TRACE("(CLSID_InternetShortcut %s %p)\n", debugstr_guid(riid), ppv);
221 return IClassFactory_QueryInterface(&InternetShortcutFactory, riid, ppv);
222 }
223
224 if(IsEqualGUID(&CLSID_CUrlHistory, rclsid)) {
225 TRACE("(CLSID_CUrlHistory %s %p)\n", debugstr_guid(riid), ppv);
226 return IClassFactory_QueryInterface(&CUrlHistoryFactory, riid, ppv);
227 }
228
229 FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
231}
static IClassFactory InternetShortcutFactory
Definition: ieframe_main.c:169
static IClassFactory WebBrowserFactory
Definition: ieframe_main.c:149
static IClassFactory WebBrowserV1Factory
Definition: ieframe_main.c:159
static IClassFactory CUrlHistoryFactory
Definition: ieframe_main.c:179
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hInstDLL,
DWORD  fdwReason,
LPVOID  lpv 
)

Definition at line 184 of file ieframe_main.c.

185{
186 TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpv);
187
188 switch(fdwReason)
189 {
191 ieframe_instance = hInstDLL;
194 break;
196 if (lpv) break;
199 }
200
201 return TRUE;
202}
#define TRUE
Definition: types.h:120
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
void register_iewindow_class(void) DECLSPEC_HIDDEN
Definition: iexplore.c:713
void unregister_iewindow_class(void) DECLSPEC_HIDDEN
Definition: iexplore.c:735
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
static void release_typelib(void)
Definition: ieframe_main.c:87

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 265 of file ieframe_main.c.

266{
267 TRACE("()\n");
269}
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 274 of file ieframe_main.c.

275{
276 TRACE("()\n");
278}
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110

◆ get_typeinfo()

HRESULT get_typeinfo ( tid_t  tid,
ITypeInfo **  typeinfo 
)

Definition at line 61 of file ieframe_main.c.

62{
64
65 if(!typelib)
67 if(!typelib)
68 return hres;
69
70 if(!typeinfos[tid]) {
71 ITypeInfo *ti;
72
73 hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &ti);
74 if(FAILED(hres)) {
75 ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_ids[tid]), hres);
76 return hres;
77 }
78
80 ITypeInfo_Release(ti);
81 }
82
84 return S_OK;
85}
#define ERR(fmt,...)
Definition: debug.h:110
static ITypeLib * typelib
Definition: ieframe_main.c:34
static HRESULT load_typelib(void)
Definition: ieframe_main.c:45
static REFIID tid_ids[]
Definition: ieframe_main.c:37
static ITypeInfo * typeinfos[LAST_tid]
Definition: ieframe_main.c:35
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
#define FAILED(hr)
Definition: intsafe.h:51
HRESULT hres
Definition: protocol.c:465
static TfClientId tid

◆ IEGetWriteableHKCU()

HRESULT WINAPI IEGetWriteableHKCU ( HKEY pkey)

Definition at line 283 of file ieframe_main.c.

284{
285 FIXME("(%p) stub\n", pkey);
286 return E_NOTIMPL;
287}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ load_typelib()

static HRESULT load_typelib ( void  )
static

Definition at line 45 of file ieframe_main.c.

46{
48 ITypeLib *tl;
49
50 hres = LoadRegTypeLib(&LIBID_SHDocVw, 1, 1, LOCALE_SYSTEM_DEFAULT, &tl);
51 if(FAILED(hres)) {
52 ERR("LoadRegTypeLib failed: %08x\n", hres);
53 return hres;
54 }
55
57 ITypeLib_Release(tl);
58 return hres;
59}
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:531
#define LOCALE_SYSTEM_DEFAULT

Referenced by get_typeinfo().

◆ release_typelib()

static void release_typelib ( void  )
static

Definition at line 87 of file ieframe_main.c.

88{
89 unsigned i;
90
91 if(!typelib)
92 return;
93
94 for(i=0; i < ARRAY_SIZE(typeinfos); i++) {
95 if(typeinfos[i])
96 ITypeInfo_Release(typeinfos[i]);
97 }
98
99 ITypeLib_Release(typelib);
100}
#define ARRAY_SIZE(A)
Definition: main.h:33
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Referenced by DllMain().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ieframe  )

Variable Documentation

◆ CUrlHistoryFactory

IClassFactory CUrlHistoryFactory = { &CUrlHistoryFactoryVtbl }
static

Definition at line 179 of file ieframe_main.c.

Referenced by DllGetClassObject().

◆ CUrlHistoryFactoryVtbl

const IClassFactoryVtbl CUrlHistoryFactoryVtbl
static
Initial value:
= {
}
HRESULT WINAPI CUrlHistory_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: urlhist.c:126
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: ieframe_main.c:135
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: ieframe_main.c:129
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: ieframe_main.c:102
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: ieframe_main.c:123

Definition at line 171 of file ieframe_main.c.

◆ ieframe_instance

◆ InternetExplorerFactory

IClassFactory InternetExplorerFactory = { &InternetExplorerFactoryVtbl }

Definition at line 241 of file ieframe_main.c.

Referenced by IEWinMain().

◆ InternetExplorerFactoryVtbl

const IClassFactoryVtbl InternetExplorerFactoryVtbl
static
Initial value:
= {
}
HRESULT WINAPI InternetExplorer_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: iexplore.c:837

Definition at line 233 of file ieframe_main.c.

◆ InternetExplorerManagerFactory

IClassFactory InternetExplorerManagerFactory = { &InternetExplorerManagerFactoryVtbl }

Definition at line 251 of file ieframe_main.c.

Referenced by IEWinMain().

◆ InternetExplorerManagerFactoryVtbl

const IClassFactoryVtbl InternetExplorerManagerFactoryVtbl
static
Initial value:
= {
}
HRESULT WINAPI InternetExplorerManager_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: iexplore.c:926

Definition at line 243 of file ieframe_main.c.

◆ InternetShortcutFactory

IClassFactory InternetShortcutFactory = { &InternetShortcutFactoryVtbl }
static

Definition at line 169 of file ieframe_main.c.

Referenced by DllGetClassObject().

◆ InternetShortcutFactoryVtbl

const IClassFactoryVtbl InternetShortcutFactoryVtbl
static
Initial value:
= {
}
HRESULT WINAPI InternetShortcut_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: intshcut.c:824

Definition at line 161 of file ieframe_main.c.

◆ module_ref

LONG module_ref = 0

Definition at line 31 of file ieframe_main.c.

Referenced by DllCanUnloadNow(), lock_module(), and unlock_module().

◆ tid_ids

REFIID tid_ids[]
static
Initial value:
= {
#define XIID(iface)
#define XCLSID(class)
}
#define TID_LIST
Definition: ieframe.h:306

Definition at line 37 of file ieframe_main.c.

Referenced by get_typeinfo().

◆ typeinfos

ITypeInfo* typeinfos[LAST_tid]
static

Definition at line 35 of file ieframe_main.c.

Referenced by get_typeinfo(), release_typelib(), and TLB_get_typeinfo_by_name().

◆ typelib

ITypeLib* typelib
static

Definition at line 34 of file ieframe_main.c.

Referenced by get_typeinfo(), load_typelib(), and release_typelib().

◆ WebBrowserFactory

IClassFactory WebBrowserFactory = { &WebBrowserFactoryVtbl }
static

Definition at line 149 of file ieframe_main.c.

Referenced by DllGetClassObject().

◆ WebBrowserFactoryVtbl

const IClassFactoryVtbl WebBrowserFactoryVtbl
static
Initial value:
= {
}
HRESULT WINAPI WebBrowser_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: webbrowser.c:1269

Definition at line 141 of file ieframe_main.c.

◆ WebBrowserV1Factory

IClassFactory WebBrowserV1Factory = { &WebBrowserV1FactoryVtbl }
static

Definition at line 159 of file ieframe_main.c.

Referenced by DllGetClassObject().

◆ WebBrowserV1FactoryVtbl

const IClassFactoryVtbl WebBrowserV1FactoryVtbl
static
Initial value:
= {
}
HRESULT WINAPI WebBrowserV1_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: webbrowser.c:1264

Definition at line 151 of file ieframe_main.c.