ReactOS  0.4.14-dev-52-g6116262
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 TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ 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 
106  if(IsEqualGUID(&IID_IUnknown, riid)) {
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 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
const GUID IID_IClassFactory

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 258 of file ieframe_main.c.

259 {
260  TRACE("()\n");
261  return module_ref ? S_FALSE : S_OK;
262 }
LONG module_ref
Definition: ieframe_main.c:31
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ DllGetClassObject()

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

Definition at line 209 of file ieframe_main.c.

210 {
211  if(IsEqualGUID(&CLSID_WebBrowser, rclsid)) {
212  TRACE("(CLSID_WebBrowser %s %p)\n", debugstr_guid(riid), ppv);
213  return IClassFactory_QueryInterface(&WebBrowserFactory, riid, ppv);
214  }
215 
216  if(IsEqualGUID(&CLSID_WebBrowser_V1, rclsid)) {
217  TRACE("(CLSID_WebBrowser_V1 %s %p)\n", debugstr_guid(riid), ppv);
218  return IClassFactory_QueryInterface(&WebBrowserV1Factory, riid, ppv);
219  }
220 
221  if(IsEqualGUID(rclsid, &CLSID_InternetShortcut)) {
222  TRACE("(CLSID_InternetShortcut %s %p)\n", debugstr_guid(riid), ppv);
223  return IClassFactory_QueryInterface(&InternetShortcutFactory, riid, ppv);
224  }
225 
226  if(IsEqualGUID(&CLSID_CUrlHistory, rclsid)) {
227  TRACE("(CLSID_CUrlHistory %s %p)\n", debugstr_guid(riid), ppv);
228  return IClassFactory_QueryInterface(&CUrlHistoryFactory, riid, ppv);
229  }
230 
231  FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
233 }
REFIID riid
Definition: precomp.h:44
static IClassFactory WebBrowserFactory
Definition: ieframe_main.c:149
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static IClassFactory WebBrowserV1Factory
Definition: ieframe_main.c:159
static IClassFactory CUrlHistoryFactory
Definition: ieframe_main.c:179
static IClassFactory InternetShortcutFactory
Definition: ieframe_main.c:169
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ 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  {
190  case DLL_WINE_PREATTACH:
191  return FALSE; /* prefer native version */
192  case DLL_PROCESS_ATTACH:
193  ieframe_instance = hInstDLL;
196  break;
197  case DLL_PROCESS_DETACH:
198  if (lpv) break;
200  release_typelib();
201  }
202 
203  return TRUE;
204 }
#define TRUE
Definition: types.h:120
static void release_typelib(void)
Definition: ieframe_main.c:87
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
void register_iewindow_class(void) DECLSPEC_HIDDEN
Definition: iexplore.c:713
void unregister_iewindow_class(void) DECLSPEC_HIDDEN
Definition: iexplore.c:735
#define DLL_PROCESS_DETACH
Definition: compat.h:119
#define TRACE(s)
Definition: solgame.cpp:4

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 267 of file ieframe_main.c.

268 {
269  TRACE("()\n");
271 }
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
#define TRACE(s)
Definition: solgame.cpp:4

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 276 of file ieframe_main.c.

277 {
278  TRACE("()\n");
280 }
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
#define TRACE(s)
Definition: solgame.cpp:4
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 {
63  HRESULT hres;
64 
65  if(!typelib)
66  hres = load_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 }
static REFIID tid_ids[]
Definition: ieframe_main.c:37
static ITypeLib * typelib
Definition: ieframe_main.c:34
static ITypeInfo * typeinfos[LAST_tid]
Definition: ieframe_main.c:35
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static HRESULT load_typelib(void)
Definition: ieframe_main.c:45
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
static TfClientId tid

◆ IEGetWriteableHKCU()

HRESULT WINAPI IEGetWriteableHKCU ( HKEY pkey)

Definition at line 285 of file ieframe_main.c.

286 {
287  FIXME("(%p) stub\n", pkey);
288  return E_NOTIMPL;
289 }
#define FIXME(fmt,...)
Definition: debug.h:110
#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 {
47  HRESULT hres;
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 }
static ITypeLib * typelib
Definition: ieframe_main.c:34
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define LOCALE_SYSTEM_DEFAULT
#define ERR(fmt,...)
Definition: debug.h:109
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:534

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 }
static ITypeLib * typelib
Definition: ieframe_main.c:34
static ITypeInfo * typeinfos[LAST_tid]
Definition: ieframe_main.c:35
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
#define ARRAY_SIZE(a)
Definition: main.h:24

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:
= {
}
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: ieframe_main.c:102
HRESULT WINAPI CUrlHistory_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: urlhist.c:126
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: ieframe_main.c:129
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: ieframe_main.c:123
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: ieframe_main.c:135

Definition at line 171 of file ieframe_main.c.

◆ ieframe_instance

◆ InternetExplorerFactory

IClassFactory InternetExplorerFactory = { &InternetExplorerFactoryVtbl }

Definition at line 243 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
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: ieframe_main.c:102
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: ieframe_main.c:129
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: ieframe_main.c:123
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: ieframe_main.c:135

Definition at line 235 of file ieframe_main.c.

◆ InternetExplorerManagerFactory

IClassFactory InternetExplorerManagerFactory = { &InternetExplorerManagerFactoryVtbl }

Definition at line 253 of file ieframe_main.c.

Referenced by IEWinMain().

◆ InternetExplorerManagerFactoryVtbl

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

Definition at line 245 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:
= {
}
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: ieframe_main.c:102
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: ieframe_main.c:129
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: ieframe_main.c:123
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: ieframe_main.c:135
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:
= {
}
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: ieframe_main.c:102
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: ieframe_main.c:129
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: ieframe_main.c:123
HRESULT WINAPI WebBrowser_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: webbrowser.c:1269
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: ieframe_main.c:135

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:
= {
}
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: ieframe_main.c:102
HRESULT WINAPI WebBrowserV1_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: webbrowser.c:1264
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: ieframe_main.c:129
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: ieframe_main.c:123
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: ieframe_main.c:135

Definition at line 151 of file ieframe_main.c.