mshtml: Store current IHTMLEventObj in DOMEvent and create it in fire_event_obj if...
[wine.git] / dlls / mshtml / main.c
blobaf716d16806c3b9e21605eb46798f20abd06779a
1 /*
2 * MSHTML Class Factory
4 * Copyright 2002 Lionel Ulmer
5 * Copyright 2003 Mike McCormack
6 * Copyright 2005 Jacek Caban
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include <stdarg.h>
24 #include <stdio.h>
26 #define COBJMACROS
28 #include "windef.h"
29 #include "winbase.h"
30 #include "winuser.h"
31 #include "winreg.h"
32 #include "ole2.h"
33 #include "advpub.h"
34 #include "shlwapi.h"
35 #include "optary.h"
36 #include "rpcproxy.h"
37 #include "shlguid.h"
38 #include "mlang.h"
40 #include "wine/debug.h"
42 #define INIT_GUID
43 #include "mshtml_private.h"
44 #include "resource.h"
45 #include "pluginhost.h"
46 #include "mscoree.h"
48 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
50 HINSTANCE hInst;
51 DWORD mshtml_tls = TLS_OUT_OF_INDEXES;
53 static HINSTANCE shdoclc = NULL;
54 static HDC display_dc;
55 static WCHAR *status_strings[IDS_STATUS_LAST-IDS_STATUS_FIRST+1];
56 static IMultiLanguage2 *mlang;
58 static BOOL ensure_mlang(void)
60 IMultiLanguage2 *new_mlang;
61 HRESULT hres;
63 if(mlang)
64 return TRUE;
66 hres = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
67 &IID_IMultiLanguage2, (void**)&new_mlang);
68 if(FAILED(hres)) {
69 ERR("Could not create CMultiLanguage instance\n");
70 return FALSE;
73 if(InterlockedCompareExchangePointer((void**)&mlang, new_mlang, NULL))
74 IMultiLanguage2_Release(new_mlang);
76 return TRUE;
79 UINT cp_from_charset_string(BSTR charset)
81 MIMECSETINFO info;
82 HRESULT hres;
84 if(!ensure_mlang())
85 return CP_UTF8;
87 hres = IMultiLanguage2_GetCharsetInfo(mlang, charset, &info);
88 if(FAILED(hres)) {
89 FIXME("GetCharsetInfo failed: %08x\n", hres);
90 return CP_UTF8;
93 return info.uiInternetEncoding;
96 BSTR charset_string_from_cp(UINT cp)
98 MIMECPINFO info;
99 HRESULT hres;
101 if(!ensure_mlang())
102 return SysAllocString(NULL);
104 hres = IMultiLanguage2_GetCodePageInfo(mlang, cp, GetUserDefaultUILanguage(), &info);
105 if(FAILED(hres)) {
106 ERR("GetCodePageInfo failed: %08x\n", hres);
107 return SysAllocString(NULL);
110 return SysAllocString(info.wszWebCharset);
113 static void thread_detach(void)
115 thread_data_t *thread_data;
117 thread_data = get_thread_data(FALSE);
118 if(!thread_data)
119 return;
121 if(thread_data->thread_hwnd)
122 DestroyWindow(thread_data->thread_hwnd);
124 heap_free(thread_data);
127 static void free_strings(void)
129 unsigned int i;
130 for(i = 0; i < sizeof(status_strings)/sizeof(*status_strings); i++)
131 heap_free(status_strings[i]);
134 static void process_detach(void)
136 close_gecko();
137 release_typelib();
139 if(shdoclc)
140 FreeLibrary(shdoclc);
141 if(mshtml_tls != TLS_OUT_OF_INDEXES)
142 TlsFree(mshtml_tls);
143 if(display_dc)
144 DeleteObject(display_dc);
145 if(mlang)
146 IMultiLanguage2_Release(mlang);
148 free_strings();
151 void set_statustext(HTMLDocumentObj* doc, INT id, LPCWSTR arg)
153 int index = id - IDS_STATUS_FIRST;
154 WCHAR *p = status_strings[index];
155 DWORD len;
157 if(!doc->frame)
158 return;
160 if(!p) {
161 len = 255;
162 p = heap_alloc(len * sizeof(WCHAR));
163 len = LoadStringW(hInst, id, p, len) + 1;
164 p = heap_realloc(p, len * sizeof(WCHAR));
165 if(InterlockedCompareExchangePointer((void**)&status_strings[index], p, NULL)) {
166 heap_free(p);
167 p = status_strings[index];
171 if(arg) {
172 WCHAR *buf;
174 len = lstrlenW(p) + lstrlenW(arg) - 1;
175 buf = heap_alloc(len * sizeof(WCHAR));
177 snprintfW(buf, len, p, arg);
179 p = buf;
182 IOleInPlaceFrame_SetStatusText(doc->frame, p);
184 if(arg)
185 heap_free(p);
188 HRESULT do_query_service(IUnknown *unk, REFGUID guid_service, REFIID riid, void **ppv)
190 IServiceProvider *sp;
191 HRESULT hres;
193 hres = IUnknown_QueryInterface(unk, &IID_IServiceProvider, (void**)&sp);
194 if(FAILED(hres))
195 return hres;
197 hres = IServiceProvider_QueryService(sp, guid_service, riid, ppv);
198 IServiceProvider_Release(sp);
199 return hres;
202 HINSTANCE get_shdoclc(void)
204 static const WCHAR wszShdoclc[] =
205 {'s','h','d','o','c','l','c','.','d','l','l',0};
207 if(shdoclc)
208 return shdoclc;
210 return shdoclc = LoadLibraryExW(wszShdoclc, NULL, LOAD_LIBRARY_AS_DATAFILE);
213 HDC get_display_dc(void)
215 static const WCHAR displayW[] = {'D','I','S','P','L','A','Y',0};
217 if(!display_dc) {
218 HDC hdc;
220 hdc = CreateICW(displayW, NULL, NULL, NULL);
221 if(InterlockedCompareExchangePointer((void**)&display_dc, hdc, NULL))
222 DeleteObject(hdc);
225 return display_dc;
228 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID reserved)
230 switch(fdwReason) {
231 case DLL_PROCESS_ATTACH:
232 hInst = hInstDLL;
233 break;
234 case DLL_PROCESS_DETACH:
235 if (reserved) break;
236 process_detach();
237 break;
238 case DLL_THREAD_DETACH:
239 thread_detach();
240 break;
242 return TRUE;
245 /***********************************************************
246 * ClassFactory implementation
248 typedef HRESULT (*CreateInstanceFunc)(IUnknown*,REFIID,void**);
249 typedef struct {
250 IClassFactory IClassFactory_iface;
251 LONG ref;
252 CreateInstanceFunc fnCreateInstance;
253 } ClassFactory;
255 static inline ClassFactory *impl_from_IClassFactory(IClassFactory *iface)
257 return CONTAINING_RECORD(iface, ClassFactory, IClassFactory_iface);
260 static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFGUID riid, void **ppvObject)
262 if(IsEqualGUID(&IID_IClassFactory, riid) || IsEqualGUID(&IID_IUnknown, riid)) {
263 IClassFactory_AddRef(iface);
264 *ppvObject = iface;
265 return S_OK;
268 WARN("not supported iid %s\n", debugstr_mshtml_guid(riid));
269 *ppvObject = NULL;
270 return E_NOINTERFACE;
273 static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
275 ClassFactory *This = impl_from_IClassFactory(iface);
276 ULONG ref = InterlockedIncrement(&This->ref);
277 TRACE("(%p) ref = %u\n", This, ref);
278 return ref;
281 static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
283 ClassFactory *This = impl_from_IClassFactory(iface);
284 ULONG ref = InterlockedDecrement(&This->ref);
286 TRACE("(%p) ref = %u\n", This, ref);
288 if(!ref) {
289 heap_free(This);
292 return ref;
295 static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter,
296 REFIID riid, void **ppvObject)
298 ClassFactory *This = impl_from_IClassFactory(iface);
299 return This->fnCreateInstance(pUnkOuter, riid, ppvObject);
302 static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
304 TRACE("(%p)->(%x)\n", iface, dolock);
306 /* We never unload the DLL. See DllCanUnloadNow(). */
307 return S_OK;
310 static const IClassFactoryVtbl HTMLClassFactoryVtbl = {
311 ClassFactory_QueryInterface,
312 ClassFactory_AddRef,
313 ClassFactory_Release,
314 ClassFactory_CreateInstance,
315 ClassFactory_LockServer
318 static HRESULT ClassFactory_Create(REFIID riid, void **ppv, CreateInstanceFunc fnCreateInstance)
320 ClassFactory *ret = heap_alloc(sizeof(ClassFactory));
321 HRESULT hres;
323 ret->IClassFactory_iface.lpVtbl = &HTMLClassFactoryVtbl;
324 ret->ref = 0;
325 ret->fnCreateInstance = fnCreateInstance;
327 hres = IClassFactory_QueryInterface(&ret->IClassFactory_iface, riid, ppv);
328 if(FAILED(hres)) {
329 heap_free(ret);
330 *ppv = NULL;
332 return hres;
335 /******************************************************************
336 * DllGetClassObject (MSHTML.@)
338 HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
340 if(IsEqualGUID(&CLSID_HTMLDocument, rclsid)) {
341 TRACE("(CLSID_HTMLDocument %s %p)\n", debugstr_mshtml_guid(riid), ppv);
342 return ClassFactory_Create(riid, ppv, HTMLDocument_Create);
343 }else if(IsEqualGUID(&CLSID_MHTMLDocument, rclsid)) {
344 TRACE("(CLSID_MHTMLDocument %s %p)\n", debugstr_mshtml_guid(riid), ppv);
345 return ClassFactory_Create(riid, ppv, MHTMLDocument_Create);
346 }else if(IsEqualGUID(&CLSID_AboutProtocol, rclsid)) {
347 TRACE("(CLSID_AboutProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv);
348 return ProtocolFactory_Create(rclsid, riid, ppv);
349 }else if(IsEqualGUID(&CLSID_JSProtocol, rclsid)) {
350 TRACE("(CLSID_JSProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv);
351 return ProtocolFactory_Create(rclsid, riid, ppv);
352 }else if(IsEqualGUID(&CLSID_MailtoProtocol, rclsid)) {
353 TRACE("(CLSID_MailtoProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv);
354 return ProtocolFactory_Create(rclsid, riid, ppv);
355 }else if(IsEqualGUID(&CLSID_ResProtocol, rclsid)) {
356 TRACE("(CLSID_ResProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv);
357 return ProtocolFactory_Create(rclsid, riid, ppv);
358 }else if(IsEqualGUID(&CLSID_SysimageProtocol, rclsid)) {
359 TRACE("(CLSID_SysimageProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv);
360 return ProtocolFactory_Create(rclsid, riid, ppv);
361 }else if(IsEqualGUID(&CLSID_HTMLLoadOptions, rclsid)) {
362 TRACE("(CLSID_HTMLLoadOptions %s %p)\n", debugstr_mshtml_guid(riid), ppv);
363 return ClassFactory_Create(riid, ppv, HTMLLoadOptions_Create);
366 FIXME("Unknown class %s\n", debugstr_guid(rclsid));
367 return CLASS_E_CLASSNOTAVAILABLE;
370 /******************************************************************
371 * DllCanUnloadNow (MSHTML.@)
373 HRESULT WINAPI DllCanUnloadNow(void)
375 TRACE("()\n");
376 /* The cost of keeping this DLL in memory is small. */
377 return S_FALSE;
380 /***********************************************************************
381 * RunHTMLApplication (MSHTML.@)
383 * Appears to have the same prototype as WinMain.
385 HRESULT WINAPI RunHTMLApplication( HINSTANCE hinst, HINSTANCE hPrevInst,
386 LPSTR szCmdLine, INT nCmdShow )
388 FIXME("%p %p %s %d\n", hinst, hPrevInst, debugstr_a(szCmdLine), nCmdShow );
389 return S_OK;
392 /***********************************************************************
393 * RNIGetCompatibleVersion (MSHTML.@)
395 DWORD WINAPI RNIGetCompatibleVersion(void)
397 TRACE("()\n");
398 return 0x20000;
401 /***********************************************************************
402 * DllInstall (MSHTML.@)
404 HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
406 FIXME("stub %d %s: returning S_OK\n", bInstall, debugstr_w(cmdline));
407 return S_OK;
410 /***********************************************************************
411 * ShowHTMLDialog (MSHTML.@)
413 HRESULT WINAPI ShowHTMLDialog(HWND hwndParent, IMoniker *pMk, VARIANT *pvarArgIn,
414 WCHAR *pchOptions, VARIANT *pvarArgOut)
416 FIXME("(%p %p %p %s %p)\n", hwndParent, pMk, pvarArgIn, debugstr_w(pchOptions), pvarArgOut);
417 return E_NOTIMPL;
420 /***********************************************************************
421 * PrintHTML (MSHTML.@)
423 void WINAPI PrintHTML(HWND hwnd, HINSTANCE handle, LPCSTR cmdline, INT show)
425 FIXME("(%p %p %s %x)\n", hwnd, handle, debugstr_a(cmdline), show);
428 DEFINE_GUID(CLSID_CBackgroundPropertyPage, 0x3050F232, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
429 DEFINE_GUID(CLSID_CCDAnchorPropertyPage, 0x3050F1FC, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
430 DEFINE_GUID(CLSID_CCDGenericPropertyPage, 0x3050F17F, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
431 DEFINE_GUID(CLSID_CDwnBindInfo, 0x3050F3C2, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
432 DEFINE_GUID(CLSID_CHiFiUses, 0x5AAF51B3, 0xB1F0, 0x11D1, 0xB6,0xAB, 0x00,0xA0,0xC9,0x08,0x33,0xE9);
433 DEFINE_GUID(CLSID_CHtmlComponentConstructor, 0x3050F4F8, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
434 DEFINE_GUID(CLSID_CInlineStylePropertyPage, 0x3050F296, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
435 DEFINE_GUID(CLSID_CPeerHandler, 0x5AAF51B2, 0xB1F0, 0x11D1, 0xB6,0xAB, 0x00,0xA0,0xC9,0x08,0x33,0xE9);
436 DEFINE_GUID(CLSID_CRecalcEngine, 0x3050F499, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
437 DEFINE_GUID(CLSID_CSvrOMUses, 0x3050F4F0, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
438 DEFINE_GUID(CLSID_CrSource, 0x65014010, 0x9F62, 0x11D1, 0xA6,0x51, 0x00,0x60,0x08,0x11,0xD5,0xCE);
439 DEFINE_GUID(CLSID_ExternalFrameworkSite, 0x3050F163, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
440 DEFINE_GUID(CLSID_HTADocument, 0x3050F5C8, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
441 DEFINE_GUID(CLSID_HTMLPluginDocument, 0x25336921, 0x03F9, 0x11CF, 0x8F,0xD0, 0x00,0xAA,0x00,0x68,0x6F,0x13);
442 DEFINE_GUID(CLSID_HTMLPopup, 0x3050F667, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
443 DEFINE_GUID(CLSID_HTMLPopupDoc, 0x3050F67D, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
444 DEFINE_GUID(CLSID_HTMLServerDoc, 0x3050F4E7, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
445 DEFINE_GUID(CLSID_IImageDecodeFilter, 0x607FD4E8, 0x0A03, 0x11D1, 0xAB,0x1D, 0x00,0xC0,0x4F,0xC9,0xB3,0x04);
446 DEFINE_GUID(CLSID_IImgCtx, 0x3050F3D6, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
447 DEFINE_GUID(CLSID_IntDitherer, 0x05F6FE1A, 0xECEF, 0x11D0, 0xAA,0xE7, 0x00,0xC0,0x4F,0xC9,0xB3,0x04);
448 DEFINE_GUID(CLSID_TridentAPI, 0x429AF92C, 0xA51F, 0x11D2, 0x86,0x1E, 0x00,0xC0,0x4F,0xA3,0x5C,0x89);
450 #define INF_SET_ID(id) \
451 do \
453 static CHAR name[] = #id; \
455 pse[i].pszName = name; \
456 clsids[i++] = &id; \
457 } while (0)
459 #define INF_SET_CLSID(clsid) INF_SET_ID(CLSID_ ## clsid)
461 static HRESULT register_server(BOOL do_register)
463 HRESULT hres;
464 HMODULE hAdvpack;
465 HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
466 STRTABLEA strtable;
467 STRENTRYA pse[35];
468 static CLSID const *clsids[35];
469 unsigned int i = 0;
471 static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
473 TRACE("(%x)\n", do_register);
475 INF_SET_CLSID(AboutProtocol);
476 INF_SET_CLSID(CAnchorBrowsePropertyPage);
477 INF_SET_CLSID(CBackgroundPropertyPage);
478 INF_SET_CLSID(CCDAnchorPropertyPage);
479 INF_SET_CLSID(CCDGenericPropertyPage);
480 INF_SET_CLSID(CDocBrowsePropertyPage);
481 INF_SET_CLSID(CDwnBindInfo);
482 INF_SET_CLSID(CHiFiUses);
483 INF_SET_CLSID(CHtmlComponentConstructor);
484 INF_SET_CLSID(CImageBrowsePropertyPage);
485 INF_SET_CLSID(CInlineStylePropertyPage);
486 INF_SET_CLSID(CPeerHandler);
487 INF_SET_CLSID(CRecalcEngine);
488 INF_SET_CLSID(CSvrOMUses);
489 INF_SET_CLSID(CrSource);
490 INF_SET_CLSID(ExternalFrameworkSite);
491 INF_SET_CLSID(HTADocument);
492 INF_SET_CLSID(HTMLDocument);
493 INF_SET_CLSID(HTMLLoadOptions);
494 INF_SET_CLSID(HTMLPluginDocument);
495 INF_SET_CLSID(HTMLPopup);
496 INF_SET_CLSID(HTMLPopupDoc);
497 INF_SET_CLSID(HTMLServerDoc);
498 INF_SET_CLSID(HTMLWindowProxy);
499 INF_SET_CLSID(IImageDecodeFilter);
500 INF_SET_CLSID(IImgCtx);
501 INF_SET_CLSID(IntDitherer);
502 INF_SET_CLSID(JSProtocol);
503 INF_SET_CLSID(MHTMLDocument);
504 INF_SET_CLSID(MailtoProtocol);
505 INF_SET_CLSID(ResProtocol);
506 INF_SET_CLSID(Scriptlet);
507 INF_SET_CLSID(SysimageProtocol);
508 INF_SET_CLSID(TridentAPI);
509 INF_SET_ID(LIBID_MSHTML);
511 for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++) {
512 pse[i].pszValue = heap_alloc(39);
513 sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
514 clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0],
515 clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4],
516 clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]);
519 strtable.cEntries = sizeof(pse)/sizeof(pse[0]);
520 strtable.pse = pse;
522 hAdvpack = LoadLibraryW(wszAdvpack);
523 pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall");
525 hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable);
527 FreeLibrary(hAdvpack);
529 for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++)
530 heap_free(pse[i].pszValue);
532 if(FAILED(hres))
533 ERR("RegInstall failed: %08x\n", hres);
535 return hres;
538 #undef INF_SET_CLSID
539 #undef INF_SET_ID
541 /***********************************************************************
542 * DllRegisterServer (MSHTML.@)
544 HRESULT WINAPI DllRegisterServer(void)
546 HRESULT hres;
548 hres = __wine_register_resources( hInst );
549 if(SUCCEEDED(hres))
550 hres = register_server(TRUE);
551 if(SUCCEEDED(hres))
552 load_gecko();
554 return hres;
557 /***********************************************************************
558 * DllUnregisterServer (MSHTML.@)
560 HRESULT WINAPI DllUnregisterServer(void)
562 HRESULT hres = __wine_unregister_resources( hInst );
563 if(SUCCEEDED(hres)) hres = register_server(FALSE);
564 return hres;
567 const char *debugstr_mshtml_guid(const GUID *iid)
569 #define X(x) if(IsEqualGUID(iid, &x)) return #x
570 X(DIID_HTMLDocumentEvents);
571 X(DIID_HTMLDocumentEvents2);
572 X(DIID_HTMLTableEvents);
573 X(DIID_HTMLTextContainerEvents);
574 X(IID_HTMLPluginContainer);
575 X(IID_IConnectionPoint);
576 X(IID_IConnectionPointContainer);
577 X(IID_ICustomDoc);
578 X(IID_IDispatch);
579 X(IID_IDispatchEx);
580 X(IID_IDispatchJS);
581 X(IID_UndocumentedScriptIface);
582 X(IID_IEnumConnections);
583 X(IID_IEnumVARIANT);
584 X(IID_IHlinkTarget);
585 X(IID_IHTMLDocument6);
586 X(IID_IHTMLDocument7);
587 X(IID_IHTMLEditServices);
588 X(IID_IHTMLFramesCollection2);
589 X(IID_IHTMLPrivateWindow);
590 X(IID_IHtmlLoadOptions);
591 X(IID_IInternetHostSecurityManager);
592 X(IID_IManagedObject);
593 X(IID_IMarshal);
594 X(IID_IMonikerProp);
595 X(IID_IObjectIdentity);
596 X(IID_IObjectSafety);
597 X(IID_IObjectWithSite);
598 X(IID_IOleContainer);
599 X(IID_IOleCommandTarget);
600 X(IID_IOleControl);
601 X(IID_IOleDocument);
602 X(IID_IOleDocumentView);
603 X(IID_IOleInPlaceActiveObject);
604 X(IID_IOleInPlaceFrame);
605 X(IID_IOleInPlaceObject);
606 X(IID_IOleInPlaceObjectWindowless);
607 X(IID_IOleInPlaceUIWindow);
608 X(IID_IOleObject);
609 X(IID_IOleWindow);
610 X(IID_IOptionArray);
611 X(IID_IPersist);
612 X(IID_IPersistFile);
613 X(IID_IPersistHistory);
614 X(IID_IPersistMoniker);
615 X(IID_IPersistStreamInit);
616 X(IID_IPropertyNotifySink);
617 X(IID_IProvideClassInfo);
618 X(IID_IProvideClassInfo2);
619 X(IID_IProvideMultipleClassInfo);
620 X(IID_IServiceProvider);
621 X(IID_ISupportErrorInfo);
622 X(IID_ITargetContainer);
623 X(IID_ITravelLogClient);
624 X(IID_IUnknown);
625 X(IID_IViewObject);
626 X(IID_IViewObject2);
627 X(IID_IViewObjectEx);
628 X(IID_nsCycleCollectionISupports);
629 X(IID_nsXPCOMCycleCollectionParticipant);
630 #define XIID(x) X(IID_##x);
631 #define XDIID(x) X(DIID_##x);
632 TID_LIST
633 #undef XIID
634 #undef XDIID
635 #undef X
637 return debugstr_guid(iid);