ReactOS  0.4.13-dev-249-gcba1a2f
main.c File Reference
#include "mshtml_private.h"
#include <advpub.h>
#include <rpcproxy.h>
#include <mlang.h>
#include <initguid.h>
Include dependency graph for main.c:

Go to the source code of this file.

Classes

class  ClassFactory
 

Macros

#define INF_SET_ID(id)
 
#define INF_SET_CLSID(clsid)   INF_SET_ID(CLSID_ ## clsid)
 
#define X(x)   if(IsEqualGUID(iid, &x)) return #x
 
#define XIID(x)   X(IID_##x);
 
#define XDIID(x)   X(DIID_##x);
 

Typedefs

typedef HRESULT(* CreateInstanceFunc) (IUnknown *, REFIID, void **)
 

Functions

UINT cp_from_charset_string (BSTR charset)
 
static void thread_detach (void)
 
static void free_strings (void)
 
static void process_detach (void)
 
void set_statustext (HTMLDocumentObj *doc, INT id, LPCWSTR arg)
 
HRESULT do_query_service (IUnknown *unk, REFGUID guid_service, REFIID riid, void **ppv)
 
HINSTANCE get_shdoclc (void)
 
HDC get_display_dc (void)
 
BOOL WINAPI DllMain (HINSTANCE hInstDLL, DWORD fdwReason, LPVOID reserved)
 
static ClassFactoryimpl_from_IClassFactory (IClassFactory *iface)
 
static HRESULT WINAPI ClassFactory_QueryInterface (IClassFactory *iface, REFGUID riid, void **ppvObject)
 
static ULONG WINAPI ClassFactory_AddRef (IClassFactory *iface)
 
static ULONG WINAPI ClassFactory_Release (IClassFactory *iface)
 
static HRESULT WINAPI ClassFactory_CreateInstance (IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
 
static HRESULT WINAPI ClassFactory_LockServer (IClassFactory *iface, BOOL dolock)
 
static HRESULT ClassFactory_Create (REFIID riid, void **ppv, CreateInstanceFunc fnCreateInstance)
 
HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
HRESULT WINAPI DllCanUnloadNow (void)
 
HRESULT WINAPI RunHTMLApplication (HINSTANCE hinst, HINSTANCE hPrevInst, LPSTR szCmdLine, INT nCmdShow)
 
DWORD WINAPI RNIGetCompatibleVersion (void)
 
HRESULT WINAPI DllInstall (BOOL bInstall, LPCWSTR cmdline)
 
HRESULT WINAPI ShowHTMLDialog (HWND hwndParent, IMoniker *pMk, VARIANT *pvarArgIn, WCHAR *pchOptions, VARIANT *pvarArgOut)
 
void WINAPI PrintHTML (HWND hwnd, HINSTANCE handle, LPCSTR cmdline, INT show)
 
 DEFINE_GUID (CLSID_CBackgroundPropertyPage, 0x3050F232, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_CCDAnchorPropertyPage, 0x3050F1FC, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_CCDGenericPropertyPage, 0x3050F17F, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_CDwnBindInfo, 0x3050F3C2, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_CHiFiUses, 0x5AAF51B3, 0xB1F0, 0x11D1, 0xB6, 0xAB, 0x00, 0xA0, 0xC9, 0x08, 0x33, 0xE9)
 
 DEFINE_GUID (CLSID_CHtmlComponentConstructor, 0x3050F4F8, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_CInlineStylePropertyPage, 0x3050F296, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_CPeerHandler, 0x5AAF51B2, 0xB1F0, 0x11D1, 0xB6, 0xAB, 0x00, 0xA0, 0xC9, 0x08, 0x33, 0xE9)
 
 DEFINE_GUID (CLSID_CRecalcEngine, 0x3050F499, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_CSvrOMUses, 0x3050F4F0, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_CrSource, 0x65014010, 0x9F62, 0x11D1, 0xA6, 0x51, 0x00, 0x60, 0x08, 0x11, 0xD5, 0xCE)
 
 DEFINE_GUID (CLSID_ExternalFrameworkSite, 0x3050F163, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_HTADocument, 0x3050F5C8, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_HTMLPluginDocument, 0x25336921, 0x03F9, 0x11CF, 0x8F, 0xD0, 0x00, 0xAA, 0x00, 0x68, 0x6F, 0x13)
 
 DEFINE_GUID (CLSID_HTMLPopup, 0x3050F667, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_HTMLPopupDoc, 0x3050F67D, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_HTMLServerDoc, 0x3050F4E7, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_IImageDecodeFilter, 0x607FD4E8, 0x0A03, 0x11D1, 0xAB, 0x1D, 0x00, 0xC0, 0x4F, 0xC9, 0xB3, 0x04)
 
 DEFINE_GUID (CLSID_IImgCtx, 0x3050F3D6, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_IntDitherer, 0x05F6FE1A, 0xECEF, 0x11D0, 0xAA, 0xE7, 0x00, 0xC0, 0x4F, 0xC9, 0xB3, 0x04)
 
 DEFINE_GUID (CLSID_MHTMLDocument, 0x3050F3D9, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_TridentAPI, 0x429AF92C, 0xA51F, 0x11D2, 0x86, 0x1E, 0x00, 0xC0, 0x4F, 0xA3, 0x5C, 0x89)
 
static HRESULT register_server (BOOL do_register)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 
const chardebugstr_mshtml_guid (const GUID *iid)
 

Variables

HINSTANCE hInst
 
DWORD mshtml_tls = TLS_OUT_OF_INDEXES
 
static HINSTANCE shdoclc = NULL
 
static HDC display_dc
 
static WCHARstatus_strings [IDS_STATUS_LAST-IDS_STATUS_FIRST+1]
 
static IMultiLanguage2 * mlang
 
static const IClassFactoryVtbl HTMLClassFactoryVtbl
 

Macro Definition Documentation

◆ INF_SET_CLSID

#define INF_SET_CLSID (   clsid)    INF_SET_ID(CLSID_ ## clsid)

Definition at line 410 of file main.c.

◆ INF_SET_ID

#define INF_SET_ID (   id)
Value:
do \
{ \
static CHAR name[] = #id; \
\
pse[i].pszName = name; \
clsids[i++] = &id; \
} while (0)
char CHAR
Definition: xmlstorage.h:175
const char * name
Definition: main.c:224
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
int id
Definition: main.c:4909
Definition: name.c:36

Definition at line 401 of file main.c.

◆ X

#define X (   x)    if(IsEqualGUID(iid, &x)) return #x

◆ XDIID

#define XDIID (   x)    X(DIID_##x);

◆ XIID

#define XIID (   x)    X(IID_##x);

Typedef Documentation

◆ CreateInstanceFunc

typedef HRESULT(* CreateInstanceFunc) (IUnknown *, REFIID, void **)

Definition at line 201 of file main.c.

Function Documentation

◆ ClassFactory_AddRef()

static ULONG WINAPI ClassFactory_AddRef ( IClassFactory iface)
static

Definition at line 226 of file main.c.

227 {
230  TRACE("(%p) ref = %u\n", This, ref);
231  return ref;
232 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static ClassFactory * impl_from_IClassFactory(IClassFactory *iface)
Definition: main.c:208
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ ClassFactory_Create()

static HRESULT ClassFactory_Create ( REFIID  riid,
void **  ppv,
CreateInstanceFunc  fnCreateInstance 
)
static

Definition at line 271 of file main.c.

272 {
274  HRESULT hres;
275 
276  ret->IClassFactory_iface.lpVtbl = &HTMLClassFactoryVtbl;
277  ret->ref = 0;
278  ret->fnCreateInstance = fnCreateInstance;
279 
280  hres = IClassFactory_QueryInterface(&ret->IClassFactory_iface, riid, ppv);
281  if(FAILED(hres)) {
282  heap_free(ret);
283  *ppv = NULL;
284  }
285  return hres;
286 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
smooth NULL
Definition: ftsmooth.c:416
static const IClassFactoryVtbl HTMLClassFactoryVtbl
Definition: main.c:263
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
HRESULT(* fnCreateInstance)(LPVOID *ppObj)
Definition: main.c:40
int ret
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by DllGetClassObject().

◆ ClassFactory_CreateInstance()

static HRESULT WINAPI ClassFactory_CreateInstance ( IClassFactory iface,
IUnknown pUnkOuter,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 248 of file main.c.

250 {
252  return This->fnCreateInstance(pUnkOuter, riid, ppvObject);
253 }
REFIID riid
Definition: precomp.h:44
static ClassFactory * impl_from_IClassFactory(IClassFactory *iface)
Definition: main.c:208
REFIID LPVOID * ppvObject
Definition: precomp.h:44

◆ ClassFactory_LockServer()

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

Definition at line 255 of file main.c.

256 {
257  TRACE("(%p)->(%x)\n", iface, dolock);
258 
259  /* We never unload the DLL. See DllCanUnloadNow(). */
260  return S_OK;
261 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ ClassFactory_QueryInterface()

static HRESULT WINAPI ClassFactory_QueryInterface ( IClassFactory iface,
REFGUID  riid,
void **  ppvObject 
)
static

Definition at line 213 of file main.c.

214 {
216  IClassFactory_AddRef(iface);
217  *ppvObject = iface;
218  return S_OK;
219  }
220 
221  WARN("not supported iid %s\n", debugstr_mshtml_guid(riid));
222  *ppvObject = NULL;
223  return E_NOINTERFACE;
224 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:535
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#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 234 of file main.c.

235 {
238 
239  TRACE("(%p) ref = %u\n", This, ref);
240 
241  if(!ref) {
242  heap_free(This);
243  }
244 
245  return ref;
246 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static ClassFactory * impl_from_IClassFactory(IClassFactory *iface)
Definition: main.c:208
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ cp_from_charset_string()

UINT cp_from_charset_string ( BSTR  charset)

Definition at line 38 of file main.c.

39 {
40  MIMECSETINFO info;
41  HRESULT hres;
42 
43  if(!mlang) {
44  IMultiLanguage2 *new_mlang;
45 
46  hres = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
47  &IID_IMultiLanguage2, (void**)&new_mlang);
48  if(FAILED(hres)) {
49  ERR("Could not create CMultiLanguage instance\n");
50  return CP_UTF8;
51  }
52 
53  if(InterlockedCompareExchangePointer((void**)&mlang, new_mlang, NULL))
54  IMultiLanguage2_Release(new_mlang);
55  }
56 
57  hres = IMultiLanguage2_GetCharsetInfo(mlang, charset, &info);
58  if(FAILED(hres)) {
59  FIXME("GetCharsetInfo failed: %08x\n", hres);
60  return CP_UTF8;
61  }
62 
63  return info.uiInternetEncoding;
64 }
CFF_Charset charset
Definition: cffcmap.c:138
struct _test_info info[]
Definition: SetCursorPos.c:19
#define CP_UTF8
Definition: nls.h:20
#define FIXME(fmt,...)
Definition: debug.h:110
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static IMultiLanguage2 * mlang
Definition: main.c:36
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define ERR(fmt,...)
Definition: debug.h:109

Referenced by get_document_charset(), and nsIOService_NewURI().

◆ debugstr_mshtml_guid()

const char* debugstr_mshtml_guid ( const GUID iid)

Definition at line 535 of file main.c.

536 {
537 #define X(x) if(IsEqualGUID(iid, &x)) return #x
538  X(DIID_HTMLDocumentEvents);
539  X(DIID_HTMLDocumentEvents2);
540  X(DIID_HTMLTableEvents);
541  X(DIID_HTMLTextContainerEvents);
542  X(IID_HTMLPluginContainer);
545  X(IID_ICustomDoc);
546  X(IID_IDispatch);
547  X(IID_IDispatchEx);
548  X(IID_IDispatchJS);
549  X(IID_UndocumentedScriptIface);
551  X(IID_IEnumVARIANT);
552  X(IID_IHlinkTarget);
553  X(IID_IHTMLDocument6);
554  X(IID_IHTMLDocument7);
555  X(IID_IHTMLEditServices);
556  X(IID_IHTMLFramesCollection2);
557  X(IID_IHTMLPrivateWindow);
558  X(IID_IHtmlLoadOptions);
559  X(IID_IInternetHostSecurityManager);
560  X(IID_IMonikerProp);
561  X(IID_IObjectIdentity);
562  X(IID_IObjectSafety);
565  X(IID_IOleCommandTarget);
567  X(IID_IOleDocument);
568  X(IID_IOleDocumentView);
572  X(IID_IOleInPlaceObjectWindowless);
574  X(IID_IOleObject);
575  X(IID_IOleWindow);
576  X(IID_IOptionArray);
577  X(IID_IPersist);
579  X(IID_IPersistHistory);
580  X(IID_IPersistMoniker);
584  X(IID_IServiceProvider);
585  X(IID_ISupportErrorInfo);
586  X(IID_ITargetContainer);
587  X(IID_ITravelLogClient);
588  X(IID_IUnknown);
591  X(IID_IViewObjectEx);
592  X(IID_nsCycleCollectionISupports);
593  X(IID_nsXPCOMCycleCollectionParticipant);
594 #define XIID(x) X(IID_##x);
595 #define XDIID(x) X(DIID_##x);
596  TID_LIST
597 #undef XIID
598 #undef XDIID
599 #undef X
600 
601  return debugstr_guid(iid);
602 }
const GUID IID_IOleInPlaceFrame
const GUID IID_IViewObject
const GUID IID_IPersist
Definition: proxy.cpp:14
const GUID IID_IConnectionPointContainer
#define X(x)
const GUID IID_IEnumConnections
const GUID IID_IProvideClassInfo
#define debugstr_guid
Definition: kernel32.h:35
#define TID_LIST
Definition: ieframe.h:306
const GUID IID_IOleInPlaceObject
const GUID IID_IOleObject
const GUID IID_IOleContainer
const GUID IID_IUnknown
const IID IID_IObjectWithSite
const GUID IID_IDispatch
const GUID IID_IOleControl
const GUID IID_IPersistStreamInit
const GUID IID_IConnectionPoint
const GUID IID_IViewObject2
const GUID IID_IPropertyNotifySink
const GUID IID_IPersistFile
const GUID IID_IOleWindow
const GUID IID_IOleInPlaceUIWindow
const GUID IID_IOleInPlaceActiveObject

Referenced by ClassFactory_QueryInterface(), ConnectionPoint_QueryInterface(), ConnectionPointContainer_FindConnectionPoint(), CustomDoc_QueryInterface(), DllGetClassObject(), editsvcs_QueryInterface(), EnumConnections_QueryInterface(), Function_QueryInterface(), get_typeinfo(), HTMLAttributeCollection_QueryInterface(), HTMLCurrentStyle_QueryInterface(), HTMLDocument_Create(), HTMLDocumentNode_QI(), HTMLDOMAttribute_QueryInterface(), HTMLDOMChildrenCollection_QueryInterface(), HTMLDOMChildrenCollectionEnum_QueryInterface(), HTMLDOMImplementation_QueryInterface(), HTMLDOMNode_QI(), HTMLDOMTextNode_QI(), HTMLElementCollection_QueryInterface(), HTMLElementCollectionEnum_QueryInterface(), HTMLEmbedElement_QI(), HTMLEventObj_QueryInterface(), HTMLFiltersCollection_QueryInterface(), HTMLHeadElement_QI(), HTMLImageElementFactory_QueryInterface(), HTMLLoadOptions_Create(), HtmlLoadOptions_QueryInterface(), HTMLLocation_QueryInterface(), HTMLMimeTypesCollection_QueryInterface(), HTMLObjectElement_QI(), HTMLOptionElementFactory_QueryInterface(), HTMLPluginsCollection_QueryInterface(), HTMLRect_QueryInterface(), HTMLScreen_QueryInterface(), HTMLSelectionObject_QueryInterface(), HTMLStorage_QueryInterface(), HTMLStyle_QueryInterface(), HTMLStyleSheet_QueryInterface(), HTMLStyleSheetRulesCollection_QueryInterface(), HTMLStyleSheetsCollection_QueryInterface(), HTMLTitleElement_QI(), HTMLTxtRange_QueryInterface(), HTMLWindow2_QueryInterface(), HTMLWindowSP_QueryService(), HTMLXMLHttpRequest_QueryInterface(), HTMLXMLHttpRequestFactory_QueryInterface(), InPlaceFrame_QueryInterface(), InPlaceUIWindow_QueryInterface(), OmHistory_QueryInterface(), OmNavigator_QueryInterface(), SupportErrorInfo_InterfaceSupportsErrorInfo(), typeinfo_invoke(), and wrapper_QueryInterface().

◆ DEFINE_GUID() [1/22]

DEFINE_GUID ( CLSID_CBackgroundPropertyPage  ,
0x3050F232  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [2/22]

DEFINE_GUID ( CLSID_CCDAnchorPropertyPage  ,
0x3050F1FC  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [3/22]

DEFINE_GUID ( CLSID_CCDGenericPropertyPage  ,
0x3050F17F  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [4/22]

DEFINE_GUID ( CLSID_CDwnBindInfo  ,
0x3050F3C2  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [5/22]

DEFINE_GUID ( CLSID_CHiFiUses  ,
0x5AAF51B3  ,
0xB1F0  ,
0x11D1  ,
0xB6  ,
0xAB  ,
0x00  ,
0xA0  ,
0xC9  ,
0x08  ,
0x33  ,
0xE9   
)

◆ DEFINE_GUID() [6/22]

DEFINE_GUID ( CLSID_CHtmlComponentConstructor  ,
0x3050F4F8  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [7/22]

DEFINE_GUID ( CLSID_CInlineStylePropertyPage  ,
0x3050F296  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [8/22]

DEFINE_GUID ( CLSID_CPeerHandler  ,
0x5AAF51B2  ,
0xB1F0  ,
0x11D1  ,
0xB6  ,
0xAB  ,
0x00  ,
0xA0  ,
0xC9  ,
0x08  ,
0x33  ,
0xE9   
)

◆ DEFINE_GUID() [9/22]

DEFINE_GUID ( CLSID_CRecalcEngine  ,
0x3050F499  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [10/22]

DEFINE_GUID ( CLSID_CSvrOMUses  ,
0x3050F4F0  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [11/22]

DEFINE_GUID ( CLSID_CrSource  ,
0x65014010  ,
0x9F62  ,
0x11D1  ,
0xA6  ,
0x51  ,
0x00  ,
0x60  ,
0x08  ,
0x11  ,
0xD5  ,
0xCE   
)

◆ DEFINE_GUID() [12/22]

DEFINE_GUID ( CLSID_ExternalFrameworkSite  ,
0x3050F163  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [13/22]

DEFINE_GUID ( CLSID_HTADocument  ,
0x3050F5C8  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [14/22]

DEFINE_GUID ( CLSID_HTMLPluginDocument  ,
0x25336921  ,
0x03F9  ,
0x11CF  ,
0x8F  ,
0xD0  ,
0x00  ,
0xAA  ,
0x00  ,
0x68  ,
0x6F  ,
0x13   
)

◆ DEFINE_GUID() [15/22]

DEFINE_GUID ( CLSID_HTMLPopup  ,
0x3050F667  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [16/22]

DEFINE_GUID ( CLSID_HTMLPopupDoc  ,
0x3050F67D  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [17/22]

DEFINE_GUID ( CLSID_HTMLServerDoc  ,
0x3050F4E7  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [18/22]

DEFINE_GUID ( CLSID_IImageDecodeFilter  ,
0x607FD4E8  ,
0x0A03  ,
0x11D1  ,
0xAB  ,
0x1D  ,
0x00  ,
0xC0  ,
0x4F  ,
0xC9  ,
0xB3  ,
0x04   
)

◆ DEFINE_GUID() [19/22]

DEFINE_GUID ( CLSID_IImgCtx  ,
0x3050F3D6  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [20/22]

DEFINE_GUID ( CLSID_IntDitherer  ,
0x05F6FE1A  ,
0xECEF  ,
0x11D0  ,
0xAA  ,
0xE7  ,
0x00  ,
0xC0  ,
0x4F  ,
0xC9  ,
0xB3  ,
0x04   
)

◆ DEFINE_GUID() [21/22]

DEFINE_GUID ( CLSID_MHTMLDocument  ,
0x3050F3D9  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [22/22]

DEFINE_GUID ( CLSID_TridentAPI  ,
0x429AF92C  ,
0xA51F  ,
0x11D2  ,
0x86  ,
0x1E  ,
0x00  ,
0xC0  ,
0x4F  ,
0xA3  ,
0x5C  ,
0x89   
)

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 323 of file main.c.

324 {
325  TRACE("()\n");
326  /* The cost of keeping this DLL in memory is small. */
327  return S_FALSE;
328 }
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4

◆ DllGetClassObject()

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

Definition at line 291 of file main.c.

292 {
293  if(IsEqualGUID(&CLSID_HTMLDocument, rclsid)) {
294  TRACE("(CLSID_HTMLDocument %s %p)\n", debugstr_mshtml_guid(riid), ppv);
296  }else if(IsEqualGUID(&CLSID_AboutProtocol, rclsid)) {
297  TRACE("(CLSID_AboutProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv);
298  return ProtocolFactory_Create(rclsid, riid, ppv);
299  }else if(IsEqualGUID(&CLSID_JSProtocol, rclsid)) {
300  TRACE("(CLSID_JSProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv);
301  return ProtocolFactory_Create(rclsid, riid, ppv);
302  }else if(IsEqualGUID(&CLSID_MailtoProtocol, rclsid)) {
303  TRACE("(CLSID_MailtoProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv);
304  return ProtocolFactory_Create(rclsid, riid, ppv);
305  }else if(IsEqualGUID(&CLSID_ResProtocol, rclsid)) {
306  TRACE("(CLSID_ResProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv);
307  return ProtocolFactory_Create(rclsid, riid, ppv);
308  }else if(IsEqualGUID(&CLSID_SysimageProtocol, rclsid)) {
309  TRACE("(CLSID_SysimageProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv);
310  return ProtocolFactory_Create(rclsid, riid, ppv);
311  }else if(IsEqualGUID(&CLSID_HTMLLoadOptions, rclsid)) {
312  TRACE("(CLSID_HTMLLoadOptions %s %p)\n", debugstr_mshtml_guid(riid), ppv);
314  }
315 
316  FIXME("Unknown class %s\n", debugstr_guid(rclsid));
318 }
CLSID CLSID_AboutProtocol
REFIID riid
Definition: precomp.h:44
HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
Definition: htmldoc.c:4817
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:535
#define FIXME(fmt,...)
Definition: debug.h:110
HRESULT ProtocolFactory_Create(REFCLSID, REFIID, void **) DECLSPEC_HIDDEN
Definition: protocol.c:1038
static HRESULT ClassFactory_Create(REFIID riid, void **ppv, CreateInstanceFunc fnCreateInstance)
Definition: main.c:271
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
HRESULT HTMLLoadOptions_Create(IUnknown *pUnkOuter, REFIID riid, void **ppv)
Definition: loadopts.c:173

◆ DllInstall()

HRESULT WINAPI DllInstall ( BOOL  bInstall,
LPCWSTR  cmdline 
)

Definition at line 354 of file main.c.

355 {
356  FIXME("stub %d %s: returning S_OK\n", bInstall, debugstr_w(cmdline));
357  return S_OK;
358 }
TCHAR * cmdline
Definition: stretchblt.cpp:32
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59

◆ DllMain()

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

Definition at line 181 of file main.c.

182 {
183  switch(fdwReason) {
184  case DLL_PROCESS_ATTACH:
185  hInst = hInstDLL;
186  break;
187  case DLL_PROCESS_DETACH:
188  if (reserved) break;
189  process_detach();
190  break;
191  case DLL_THREAD_DETACH:
192  thread_detach();
193  break;
194  }
195  return TRUE;
196 }
#define TRUE
Definition: types.h:120
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
#define DLL_THREAD_DETACH
Definition: compat.h:122
HINSTANCE hInst
Definition: main.c:29
r reserved
Definition: btrfs.c:2673
#define DLL_PROCESS_DETACH
Definition: compat.h:119
static void thread_detach(void)
Definition: main.c:66
static void process_detach(void)
Definition: main.c:87

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 512 of file main.c.

513 {
514  HRESULT hres;
515 
517  if(SUCCEEDED(hres))
519  if(SUCCEEDED(hres))
520  load_gecko();
521 
522  return hres;
523 }
#define TRUE
Definition: types.h:120
BOOL load_gecko(void) DECLSPEC_HIDDEN
Definition: nsembed.c:742
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98
HINSTANCE hInst
Definition: main.c:29
static HRESULT register_server(BOOL do_register)
Definition: main.c:412
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 528 of file main.c.

529 {
532  return hres;
533 }
HINSTANCE hInst
Definition: main.c:29
static HRESULT register_server(BOOL do_register)
Definition: main.c:412
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ do_query_service()

HRESULT do_query_service ( IUnknown unk,
REFGUID  guid_service,
REFIID  riid,
void **  ppv 
)

Definition at line 141 of file main.c.

142 {
144  HRESULT hres;
145 
146  hres = IUnknown_QueryInterface(unk, &IID_IServiceProvider, (void**)&sp);
147  if(FAILED(hres))
148  return hres;
149 
150  hres = IServiceProvider_QueryService(sp, guid_service, riid, ppv);
151  IServiceProvider_Release(sp);
152  return hres;
153 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR sp[]
Definition: suminfo.c:288

Referenced by hlink_frame_navigate(), HTMLWindow2_open(), navigate_new_window(), OleObject_SetClientSite(), and ServiceProvider_QueryService().

◆ free_strings()

static void free_strings ( void  )
static

Definition at line 80 of file main.c.

81 {
82  unsigned int i;
83  for(i = 0; i < sizeof(status_strings)/sizeof(*status_strings); i++)
85 }
static WCHAR * status_strings[IDS_STATUS_LAST-IDS_STATUS_FIRST+1]
Definition: 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
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by process_detach().

◆ get_display_dc()

HDC get_display_dc ( void  )

Definition at line 166 of file main.c.

167 {
168  static const WCHAR displayW[] = {'D','I','S','P','L','A','Y',0};
169 
170  if(!display_dc) {
171  HDC hdc;
172 
175  DeleteObject(hdc);
176  }
177 
178  return display_dc;
179 }
static HDC
Definition: imagelist.c:92
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
static HDC display_dc
Definition: main.c:34
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR displayW[]
Definition: icm.c:30
HDC hdc
Definition: main.c:9
HDC WINAPI CreateICW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ const DEVMODEW *)

Referenced by HTMLScreen_get_colorDepth(), HTMLScreen_get_height(), and HTMLScreen_get_width().

◆ get_shdoclc()

HINSTANCE get_shdoclc ( void  )

Definition at line 155 of file main.c.

156 {
157  static const WCHAR wszShdoclc[] =
158  {'s','h','d','o','c','l','c','.','d','l','l',0};
159 
160  if(shdoclc)
161  return shdoclc;
162 
163  return shdoclc = LoadLibraryExW(wszShdoclc, NULL, LOAD_LIBRARY_AS_DATAFILE);
164 }
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
Definition: loader.c:286
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define LOAD_LIBRARY_AS_DATAFILE
Definition: winbase.h:338
static HINSTANCE shdoclc
Definition: main.c:33

Referenced by HTMLWindow2_alert(), HTMLWindow2_confirm(), prompt_dlgproc(), set_default_templates(), and show_context_menu().

◆ impl_from_IClassFactory()

static ClassFactory* impl_from_IClassFactory ( IClassFactory iface)
inlinestatic

Definition at line 208 of file main.c.

209 {
210  return CONTAINING_RECORD(iface, ClassFactory, IClassFactory_iface);
211 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by ClassFactory_AddRef(), ClassFactory_CreateInstance(), and ClassFactory_Release().

◆ PrintHTML()

void WINAPI PrintHTML ( HWND  hwnd,
HINSTANCE  handle,
LPCSTR  cmdline,
INT  show 
)

Definition at line 373 of file main.c.

374 {
375  FIXME("(%p %p %s %x)\n", hwnd, handle, debugstr_a(cmdline), show);
376 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
TCHAR * cmdline
Definition: stretchblt.cpp:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_a
Definition: kernel32.h:31

◆ process_detach()

static void process_detach ( void  )
static

Definition at line 87 of file main.c.

88 {
89  close_gecko();
91 
92  if(shdoclc)
96  if(display_dc)
98  if(mlang)
99  IMultiLanguage2_Release(mlang);
100 
101  free_strings();
102 }
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
void close_gecko(void) DECLSPEC_HIDDEN
Definition: nsembed.c:1076
static HDC display_dc
Definition: main.c:34
#define FreeLibrary(x)
Definition: compat.h:405
BOOL WINAPI TlsFree(IN DWORD Index)
Definition: thread.c:1116
static void free_strings(void)
Definition: main.c:80
void release_typelib(void)
Definition: apps.c:155
static IMultiLanguage2 * mlang
Definition: main.c:36
#define TLS_OUT_OF_INDEXES
Definition: winbase.h:530
DWORD mshtml_tls
Definition: main.c:31
static HINSTANCE shdoclc
Definition: main.c:33

Referenced by DllMain().

◆ register_server()

static HRESULT register_server ( BOOL  do_register)
static

Definition at line 412 of file main.c.

413 {
414  HRESULT hres;
415  HMODULE hAdvpack;
416  HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
417  STRTABLEA strtable;
418  STRENTRYA pse[35];
419  static CLSID const *clsids[35];
420  unsigned int i = 0;
421 
422  static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
423 
424  TRACE("(%x)\n", do_register);
425 
427  INF_SET_CLSID(CAnchorBrowsePropertyPage);
429  INF_SET_CLSID(CCDAnchorPropertyPage);
431  INF_SET_CLSID(CDocBrowsePropertyPage);
434  INF_SET_CLSID(CHtmlComponentConstructor);
436  INF_SET_CLSID(CInlineStylePropertyPage);
438  INF_SET_CLSID(CRecalcEngine);
439  INF_SET_CLSID(CSvrOMUses);
441  INF_SET_CLSID(ExternalFrameworkSite);
446  INF_SET_CLSID(HTMLPopup);
448  INF_SET_CLSID(HTMLServerDoc);
450  INF_SET_CLSID(IImageDecodeFilter);
453  INF_SET_CLSID(JSProtocol);
454  INF_SET_CLSID(MHTMLDocument);
457  INF_SET_CLSID(Scriptlet);
459  INF_SET_CLSID(TridentAPI);
460  INF_SET_ID(LIBID_MSHTML);
461 
462  for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++) {
463  pse[i].pszValue = heap_alloc(39);
464  sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
465  clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0],
466  clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4],
467  clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]);
468  }
469 
470  strtable.cEntries = sizeof(pse)/sizeof(pse[0]);
471  strtable.pse = pse;
472 
473  hAdvpack = LoadLibraryW(wszAdvpack);
474  pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall");
475 
476  hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable);
477 
478  FreeLibrary(hAdvpack);
479 
480  for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++)
481  heap_free(pse[i].pszValue);
482 
483  if(FAILED(hres)) {
484  ERR("RegInstall failed: %08x\n", hres);
485  return hres;
486  }
487 
488  if(do_register) {
489  ITypeLib *typelib;
490 
491  static const WCHAR wszMSHTML[] = {'m','s','h','t','m','l','.','t','l','b',0};
492 
493  hres = LoadTypeLibEx(wszMSHTML, REGKIND_REGISTER, &typelib);
494  if(SUCCEEDED(hres))
495  ITypeLib_Release(typelib);
496  }else {
497  hres = UnRegisterTypeLib(&LIBID_MSHTML, 4, 0, LOCALE_SYSTEM_DEFAULT, SYS_WIN32);
498  }
499 
500  if(FAILED(hres))
501  ERR("typelib registration failed: %08x\n", hres);
502 
503  return hres;
504 }
#define HRESULT
Definition: msvc.h:9
DWORD cEntries
Definition: advpub.h:97
static ITypeLib * typelib
Definition: apps.c:105
#define INF_SET_CLSID(clsid)
Definition: main.c:410
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define sprintf(buf, format,...)
Definition: sprintf.c:55
HINSTANCE hInst
Definition: main.c:29
LPSTR pszValue
Definition: advpub.h:83
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 LoadLibraryW(x)
Definition: compat.h:404
const char * LPCSTR
Definition: xmlstorage.h:183
STRENTRYA * pse
Definition: advpub.h:98
#define TRACE(s)
Definition: solgame.cpp:4
#define FreeLibrary(x)
Definition: compat.h:405
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define WINAPI
Definition: msvc.h:8
#define LOCALE_SYSTEM_DEFAULT
HRESULT WINAPI UnRegisterTypeLib(REFGUID libid, WORD wVerMajor, WORD wVerMinor, LCID lcid, SYSKIND syskind)
Definition: typelib.c:882
HRESULT WINAPI LoadTypeLibEx(LPCOLESTR szFile, REGKIND regkind, ITypeLib **pptLib)
Definition: typelib.c:476
#define ERR(fmt,...)
Definition: debug.h:109
#define INF_SET_ID(id)
Definition: main.c:401
#define GetProcAddress(x, y)
Definition: compat.h:410
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by DllRegisterServer(), and DllUnregisterServer().

◆ RNIGetCompatibleVersion()

DWORD WINAPI RNIGetCompatibleVersion ( void  )

Definition at line 345 of file main.c.

346 {
347  TRACE("()\n");
348  return 0x20000;
349 }
#define TRACE(s)
Definition: solgame.cpp:4

◆ RunHTMLApplication()

HRESULT WINAPI RunHTMLApplication ( HINSTANCE  hinst,
HINSTANCE  hPrevInst,
LPSTR  szCmdLine,
INT  nCmdShow 
)

Definition at line 335 of file main.c.

337 {
338  FIXME("%p %p %s %d\n", hinst, hPrevInst, debugstr_a(szCmdLine), nCmdShow );
339  return 0;
340 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_a
Definition: kernel32.h:31
static HINSTANCE hinst
Definition: edit.c:551

◆ set_statustext()

void set_statustext ( HTMLDocumentObj doc,
INT  id,
LPCWSTR  arg 
)

Definition at line 104 of file main.c.

105 {
106  int index = id - IDS_STATUS_FIRST;
108  DWORD len;
109 
110  if(!doc->frame)
111  return;
112 
113  if(!p) {
114  len = 255;
115  p = heap_alloc(len * sizeof(WCHAR));
116  len = LoadStringW(hInst, id, p, len) + 1;
117  p = heap_realloc(p, len * sizeof(WCHAR));
119  heap_free(p);
121  }
122  }
123 
124  if(arg) {
125  WCHAR *buf;
126 
127  len = lstrlenW(p) + lstrlenW(arg) - 1;
128  buf = heap_alloc(len * sizeof(WCHAR));
129 
130  snprintfW(buf, len, p, arg);
131 
132  p = buf;
133  }
134 
135  IOleInPlaceFrame_SetStatusText(doc->frame, p);
136 
137  if(arg)
138  heap_free(p);
139 }
static WCHAR * status_strings[IDS_STATUS_LAST-IDS_STATUS_FIRST+1]
Definition: main.c:35
#define snprintfW
Definition: unicode.h:60
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define lstrlenW
Definition: compat.h:407
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
HINSTANCE hInst
Definition: main.c:29
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
IOleInPlaceFrame * frame
#define index(s, c)
Definition: various.h:29
GLenum GLsizei len
Definition: glext.h:6722
GLfloat GLfloat p
Definition: glext.h:8902
#define IDS_STATUS_FIRST
Definition: resource.h:23
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by handle_load(), and set_downloading_proc().

◆ ShowHTMLDialog()

HRESULT WINAPI ShowHTMLDialog ( HWND  hwndParent,
IMoniker pMk,
VARIANT pvarArgIn,
WCHAR pchOptions,
VARIANT pvarArgOut 
)

Definition at line 363 of file main.c.

365 {
366  FIXME("(%p %p %p %s %p)\n", hwndParent, pMk, pvarArgIn, debugstr_w(pchOptions), pvarArgOut);
367  return E_NOTIMPL;
368 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
static HWND hwndParent
Definition: cryptui.c:300
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ thread_detach()

static void thread_detach ( void  )
static

Definition at line 66 of file main.c.

67 {
69 
71  if(!thread_data)
72  return;
73 
74  if(thread_data->thread_hwnd)
75  DestroyWindow(thread_data->thread_hwnd);
76 
78 }
BOOL WINAPI DestroyWindow(_In_ HWND)
thread_data_t * get_thread_data(BOOL) DECLSPEC_HIDDEN
Definition: task.c:352
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by DllMain().

Variable Documentation

◆ display_dc

HDC display_dc
static

Definition at line 34 of file main.c.

Referenced by get_display_dc(), getwinmetafilebits(), and process_detach().

◆ hInst

HINSTANCE hInst

Definition at line 30 of file main.c.

◆ HTMLClassFactoryVtbl

const IClassFactoryVtbl HTMLClassFactoryVtbl
static
Initial value:
= {
}
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: main.c:226
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
Definition: main.c:248
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
Definition: main.c:255
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFGUID riid, void **ppvObject)
Definition: main.c:213
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: main.c:234

Definition at line 263 of file main.c.

Referenced by ClassFactory_Create().

◆ mlang

IMultiLanguage2* mlang
static

◆ mshtml_tls

DWORD mshtml_tls = TLS_OUT_OF_INDEXES

Definition at line 31 of file main.c.

Referenced by get_thread_data(), and process_detach().

◆ shdoclc

HINSTANCE shdoclc = NULL
static

Definition at line 33 of file main.c.

Referenced by get_shdoclc(), and process_detach().

◆ status_strings

WCHAR* status_strings[IDS_STATUS_LAST-IDS_STATUS_FIRST+1]
static

Definition at line 35 of file main.c.

Referenced by free_strings(), and set_statustext().