msi/tests: Fixed a typo.
[wine.git] / dlls / mshtml / htmldoc.c
blob38144101d800ebba35135618db66482bf4678686
1 /*
2 * Copyright 2005 Jacek Caban
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "config.h"
21 #include <stdarg.h>
22 #include <stdio.h>
24 #define COBJMACROS
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "ole2.h"
31 #include "wine/debug.h"
33 #include "mshtml_private.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
37 #define HTMLDOC_THIS(iface) DEFINE_THIS(HTMLDocument, HTMLDocument2, iface)
39 static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID riid, void **ppvObject)
41 HTMLDocument *This = HTMLDOC_THIS(iface);
43 *ppvObject = NULL;
44 if(IsEqualGUID(&IID_IUnknown, riid)) {
45 TRACE("(%p)->(IID_IUnknown, %p)\n", This, ppvObject);
46 *ppvObject = HTMLDOC(This);
47 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
48 TRACE("(%p)->(IID_IDispatch, %p)\n", This, ppvObject);
49 *ppvObject = HTMLDOC(This);
50 }else if(IsEqualGUID(&IID_IHTMLDocument, riid)) {
51 TRACE("(%p)->(IID_IHTMLDocument, %p)\n", This, ppvObject);
52 *ppvObject = HTMLDOC(This);
53 }else if(IsEqualGUID(&IID_IHTMLDocument2, riid)) {
54 TRACE("(%p)->(IID_IHTMLDocument2, %p)\n", This, ppvObject);
55 *ppvObject = HTMLDOC(This);
56 }else if(IsEqualGUID(&IID_IHTMLDocument3, riid)) {
57 TRACE("(%p)->(IID_IHTMLDocument3, %p)\n", This, ppvObject);
58 *ppvObject = HTMLDOC3(This);
59 }else if(IsEqualGUID(&IID_IPersist, riid)) {
60 TRACE("(%p)->(IID_IPersist, %p)\n", This, ppvObject);
61 *ppvObject = PERSIST(This);
62 }else if(IsEqualGUID(&IID_IPersistMoniker, riid)) {
63 TRACE("(%p)->(IID_IPersistMoniker, %p)\n", This, ppvObject);
64 *ppvObject = PERSISTMON(This);
65 }else if(IsEqualGUID(&IID_IPersistFile, riid)) {
66 TRACE("(%p)->(IID_IPersistFile, %p)\n", This, ppvObject);
67 *ppvObject = PERSISTFILE(This);
68 }else if(IsEqualGUID(&IID_IMonikerProp, riid)) {
69 TRACE("(%p)->(IID_IMonikerProp, %p)\n", This, ppvObject);
70 *ppvObject = MONPROP(This);
71 }else if(IsEqualGUID(&IID_IOleObject, riid)) {
72 TRACE("(%p)->(IID_IOleObject, %p)\n", This, ppvObject);
73 *ppvObject = OLEOBJ(This);
74 }else if(IsEqualGUID(&IID_IOleDocument, riid)) {
75 TRACE("(%p)->(IID_IOleDocument, %p)\n", This, ppvObject);
76 *ppvObject = OLEDOC(This);
77 }else if(IsEqualGUID(&IID_IOleDocumentView, riid)) {
78 TRACE("(%p)->(IID_IOleDocumentView, %p)\n", This, ppvObject);
79 *ppvObject = DOCVIEW(This);
80 }else if(IsEqualGUID(&IID_IOleInPlaceActiveObject, riid)) {
81 TRACE("(%p)->(IID_IOleInPlaceActiveObject, %p)\n", This, ppvObject);
82 *ppvObject = ACTOBJ(This);
83 }else if(IsEqualGUID(&IID_IViewObject, riid)) {
84 TRACE("(%p)->(IID_IViewObject, %p)\n", This, ppvObject);
85 *ppvObject = VIEWOBJ(This);
86 }else if(IsEqualGUID(&IID_IViewObject2, riid)) {
87 TRACE("(%p)->(IID_IViewObject2, %p)\n", This, ppvObject);
88 *ppvObject = VIEWOBJ2(This);
89 }else if(IsEqualGUID(&IID_IOleWindow, riid)) {
90 TRACE("(%p)->(IID_IOleWindow, %p)\n", This, ppvObject);
91 *ppvObject = OLEWIN(This);
92 }else if(IsEqualGUID(&IID_IOleInPlaceObject, riid)) {
93 TRACE("(%p)->(IID_IOleInPlaceObject, %p)\n", This, ppvObject);
94 *ppvObject = INPLACEOBJ(This);
95 }else if(IsEqualGUID(&IID_IOleInPlaceObjectWindowless, riid)) {
96 TRACE("(%p)->(IID_IOleInPlaceObjectWindowless, %p)\n", This, ppvObject);
97 *ppvObject = INPLACEWIN(This);
98 }else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
99 TRACE("(%p)->(IID_IServiceProvider, %p)\n", This, ppvObject);
100 *ppvObject = SERVPROV(This);
101 }else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) {
102 TRACE("(%p)->(IID_IOleCommandTarget, %p)\n", This, ppvObject);
103 *ppvObject = CMDTARGET(This);
104 }else if(IsEqualGUID(&IID_IOleControl, riid)) {
105 TRACE("(%p)->(IID_IOleControl, %p)\n", This, ppvObject);
106 *ppvObject = CONTROL(This);
107 }else if(IsEqualGUID(&IID_IHlinkTarget, riid)) {
108 TRACE("(%p)->(IID_IHlinkTarget, %p)\n", This, ppvObject);
109 *ppvObject = HLNKTARGET(This);
110 }else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
111 TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppvObject);
112 *ppvObject = CONPTCONT(This);
113 }else if(IsEqualGUID(&IID_IPersistStreamInit, riid)) {
114 TRACE("(%p)->(IID_IPersistStreamInit %p)\n", This, ppvObject);
115 *ppvObject = PERSTRINIT(This);
116 }else if(IsEqualGUID(&CLSID_CMarkup, riid)) {
117 FIXME("(%p)->(CLSID_CMarkup %p)\n", This, ppvObject);
118 return E_NOINTERFACE;
121 if(*ppvObject) {
122 IHTMLDocument2_AddRef(iface);
123 return S_OK;
126 FIXME("(%p)->(%s %p) interface not supported\n", This, debugstr_guid(riid), ppvObject);
127 return E_NOINTERFACE;
130 static ULONG WINAPI HTMLDocument_AddRef(IHTMLDocument2 *iface)
132 HTMLDocument *This = HTMLDOC_THIS(iface);
133 ULONG ref = InterlockedIncrement(&This->ref);
134 TRACE("(%p) ref = %lu\n", This, ref);
135 return ref;
138 static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
140 HTMLDocument *This = HTMLDOC_THIS(iface);
141 ULONG ref = InterlockedDecrement(&This->ref);
143 TRACE("(%p) ref = %lu\n", This, ref);
145 if(!ref) {
146 if(This->client)
147 IOleObject_SetClientSite(OLEOBJ(This), NULL);
148 if(This->in_place_active)
149 IOleInPlaceObjectWindowless_InPlaceDeactivate(INPLACEWIN(This));
150 if(This->ipsite)
151 IOleDocumentView_SetInPlaceSite(DOCVIEW(This), NULL);
153 if(This->tooltips_hwnd)
154 DestroyWindow(This->tooltips_hwnd);
155 if(This->hwnd)
156 DestroyWindow(This->hwnd);
158 release_nodes(This);
160 if(This->nscontainer)
161 NSContainer_Release(This->nscontainer);
163 HeapFree(GetProcessHeap(), 0, This);
165 UNLOCK_MODULE();
168 return ref;
171 static HRESULT WINAPI HTMLDocument_GetTypeInfoCount(IHTMLDocument2 *iface, UINT *pctinfo)
173 FIXME("(%p)->(%p)\n", iface, pctinfo);
174 return E_NOTIMPL;
177 static HRESULT WINAPI HTMLDocument_GetTypeInfo(IHTMLDocument2 *iface, UINT iTInfo,
178 LCID lcid, ITypeInfo **ppTInfo)
180 FIXME("(%p)->(%u %lu %p)\n", iface, iTInfo, lcid, ppTInfo);
181 return E_NOTIMPL;
184 static HRESULT WINAPI HTMLDocument_GetIDsOfNames(IHTMLDocument2 *iface, REFIID riid,
185 LPOLESTR *rgszNames, UINT cNames,
186 LCID lcid, DISPID *rgDispId)
188 FIXME("(%p)->(%s %p %u %lu %p)\n", iface, debugstr_guid(riid), rgszNames, cNames,
189 lcid, rgDispId);
190 return E_NOTIMPL;
193 static HRESULT WINAPI HTMLDocument_Invoke(IHTMLDocument2 *iface, DISPID dispIdMember,
194 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
195 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
197 FIXME("(%p)->(%ld %s %ld %d %p %p %p %p)\n", iface, dispIdMember, debugstr_guid(riid),
198 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
199 return E_NOTIMPL;
202 static HRESULT WINAPI HTMLDocument_get_Script(IHTMLDocument2 *iface, IDispatch **p)
204 FIXME("(%p)->(%p)\n", iface, p);
205 return E_NOTIMPL;
208 static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCollection **p)
210 FIXME("(%p)->(%p)\n", iface, p);
211 return E_NOTIMPL;
214 static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement **p)
216 HTMLDocument *This = HTMLDOC_THIS(iface);
217 nsIDOMDocument *nsdoc;
218 nsIDOMHTMLDocument *nshtmldoc;
219 nsIDOMHTMLElement *nsbody = NULL;
220 HTMLDOMNode *node;
221 nsresult nsres;
223 TRACE("(%p)->(%p)\n", This, p);
225 *p = NULL;
227 if(!This->nscontainer)
228 return S_OK;
230 nsres = nsIWebNavigation_GetDocument(This->nscontainer->navigation, &nsdoc);
231 if(NS_FAILED(nsres)) {
232 ERR("GetDocument failed: %08lx\n", nsres);
233 return S_OK;
236 if(NS_FAILED(nsres) || !nsdoc)
237 return S_OK;
239 nsIDOMDocument_QueryInterface(nsdoc, &IID_nsIDOMHTMLDocument, (void**)&nshtmldoc);
240 nsIDOMDocument_Release(nsdoc);
242 nsres = nsIDOMHTMLDocument_GetBody(nshtmldoc, &nsbody);
243 nsIDOMHTMLDocument_Release(nshtmldoc);
245 if(NS_FAILED(nsres) || !nsbody) {
246 TRACE("Could not get body: %08lx\n", nsres);
247 return S_OK;
250 node = get_node(This, (nsIDOMNode*)nsbody);
251 nsIDOMHTMLElement_Release(nsbody);
253 IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)p);
255 TRACE("*p = %p\n", *p);
256 return S_OK;
259 static HRESULT WINAPI HTMLDocument_get_activeElement(IHTMLDocument2 *iface, IHTMLElement **p)
261 FIXME("(%p)->(%p)\n", iface, p);
262 return E_NOTIMPL;
265 static HRESULT WINAPI HTMLDocument_get_images(IHTMLDocument2 *iface, IHTMLElementCollection **p)
267 FIXME("(%p)->(%p)\n", iface, p);
268 return E_NOTIMPL;
271 static HRESULT WINAPI HTMLDocument_get_applets(IHTMLDocument2 *iface, IHTMLElementCollection **p)
273 FIXME("(%p)->(%p)\n", iface, p);
274 return E_NOTIMPL;
277 static HRESULT WINAPI HTMLDocument_get_links(IHTMLDocument2 *iface, IHTMLElementCollection **p)
279 FIXME("(%p)->(%p)\n", iface, p);
280 return E_NOTIMPL;
283 static HRESULT WINAPI HTMLDocument_get_forms(IHTMLDocument2 *iface, IHTMLElementCollection **p)
285 FIXME("(%p)->(%p)\n", iface, p);
286 return E_NOTIMPL;
289 static HRESULT WINAPI HTMLDocument_get_anchors(IHTMLDocument2 *iface, IHTMLElementCollection **p)
291 FIXME("(%p)->(%p)\n", iface, p);
292 return E_NOTIMPL;
295 static HRESULT WINAPI HTMLDocument_put_title(IHTMLDocument2 *iface, BSTR v)
297 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
298 return E_NOTIMPL;
301 static HRESULT WINAPI HTMLDocument_get_title(IHTMLDocument2 *iface, BSTR *p)
303 FIXME("(%p)->(%p)\n", iface, p);
304 return E_NOTIMPL;
307 static HRESULT WINAPI HTMLDocument_get_scripts(IHTMLDocument2 *iface, IHTMLElementCollection **p)
309 FIXME("(%p)->(%p)\n", iface, p);
310 return E_NOTIMPL;
313 static HRESULT WINAPI HTMLDocument_put_designMode(IHTMLDocument2 *iface, BSTR v)
315 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
316 return E_NOTIMPL;
319 static HRESULT WINAPI HTMLDocument_get_designMode(IHTMLDocument2 *iface, BSTR *p)
321 FIXME("(%p)->(%p)\n", iface, p);
322 return E_NOTIMPL;
325 static HRESULT WINAPI HTMLDocument_get_selection(IHTMLDocument2 *iface, IHTMLSelectionObject **p)
327 FIXME("(%p)->(%p)\n", iface, p);
328 return E_NOTIMPL;
331 static HRESULT WINAPI HTMLDocument_get_readyState(IHTMLDocument2 *iface, BSTR *p)
333 FIXME("(%p)->(%p)\n", iface, p);
334 return E_NOTIMPL;
337 static HRESULT WINAPI HTMLDocument_get_frames(IHTMLDocument2 *iface, IHTMLFramesCollection2 **p)
339 FIXME("(%p)->(%p)\n", iface, p);
340 return E_NOTIMPL;
343 static HRESULT WINAPI HTMLDocument_get_embeds(IHTMLDocument2 *iface, IHTMLElementCollection **p)
345 FIXME("(%p)->(%p)\n", iface, p);
346 return E_NOTIMPL;
349 static HRESULT WINAPI HTMLDocument_get_plugins(IHTMLDocument2 *iface, IHTMLElementCollection **p)
351 FIXME("(%p)->(%p)\n", iface, p);
352 return E_NOTIMPL;
355 static HRESULT WINAPI HTMLDocument_put_alinkColor(IHTMLDocument2 *iface, VARIANT v)
357 FIXME("(%p)\n", iface);
358 return E_NOTIMPL;
361 static HRESULT WINAPI HTMLDocument_get_alinkColor(IHTMLDocument2 *iface, VARIANT *p)
363 FIXME("(%p)->(%p)\n", iface, p);
364 return E_NOTIMPL;
367 static HRESULT WINAPI HTMLDocument_put_bgColor(IHTMLDocument2 *iface, VARIANT v)
369 FIXME("(%p)\n", iface);
370 return E_NOTIMPL;
373 static HRESULT WINAPI HTMLDocument_get_bgColor(IHTMLDocument2 *iface, VARIANT *p)
375 FIXME("(%p)->(%p)\n", iface, p);
376 return E_NOTIMPL;
379 static HRESULT WINAPI HTMLDocument_put_fgColor(IHTMLDocument2 *iface, VARIANT v)
381 FIXME("(%p)\n", iface);
382 return E_NOTIMPL;
385 static HRESULT WINAPI HTMLDocument_get_fgColor(IHTMLDocument2 *iface, VARIANT *p)
387 FIXME("(%p)->(%p)\n", iface, p);
388 return E_NOTIMPL;
391 static HRESULT WINAPI HTMLDocument_put_linkColor(IHTMLDocument2 *iface, VARIANT v)
393 FIXME("(%p)->()\n", iface);
394 return E_NOTIMPL;
397 static HRESULT WINAPI HTMLDocument_get_linkColor(IHTMLDocument2 *iface, VARIANT *p)
399 FIXME("(%p)->(%p)\n", iface, p);
400 return E_NOTIMPL;
403 static HRESULT WINAPI HTMLDocument_put_vlinkColor(IHTMLDocument2 *iface, VARIANT v)
405 FIXME("(%p)\n", iface);
406 return E_NOTIMPL;
409 static HRESULT WINAPI HTMLDocument_get_vlinkColor(IHTMLDocument2 *iface, VARIANT *p)
411 FIXME("(%p)->(%p)\n", iface, p);
412 return E_NOTIMPL;
415 static HRESULT WINAPI HTMLDocument_get_referrer(IHTMLDocument2 *iface, BSTR *p)
417 FIXME("(%p)->(%p)\n", iface, p);
418 return E_NOTIMPL;
421 static HRESULT WINAPI HTMLDocument_get_location(IHTMLDocument2 *iface, IHTMLLocation **p)
423 FIXME("(%p)->(%p)\n", iface, p);
424 return E_NOTIMPL;
427 static HRESULT WINAPI HTMLDocument_get_lastModified(IHTMLDocument2 *iface, BSTR *p)
429 FIXME("(%p)->(%p)\n", iface, p);
430 return E_NOTIMPL;
433 static HRESULT WINAPI HTMLDocument_put_URL(IHTMLDocument2 *iface, BSTR v)
435 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
436 return E_NOTIMPL;
439 static HRESULT WINAPI HTMLDocument_get_URL(IHTMLDocument2 *iface, BSTR *p)
441 FIXME("(%p)->(%p)\n", iface, p);
442 return E_NOTIMPL;
445 static HRESULT WINAPI HTMLDocument_put_domain(IHTMLDocument2 *iface, BSTR v)
447 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
448 return E_NOTIMPL;
451 static HRESULT WINAPI HTMLDocument_get_domain(IHTMLDocument2 *iface, BSTR *p)
453 FIXME("(%p)->(%p)\n", iface, p);
454 return E_NOTIMPL;
457 static HRESULT WINAPI HTMLDocument_put_cookie(IHTMLDocument2 *iface, BSTR v)
459 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
460 return E_NOTIMPL;
463 static HRESULT WINAPI HTMLDocument_get_cookie(IHTMLDocument2 *iface, BSTR *p)
465 FIXME("(%p)->(%p)\n", iface, p);
466 return E_NOTIMPL;
469 static HRESULT WINAPI HTMLDocument_put_expando(IHTMLDocument2 *iface, VARIANT_BOOL v)
471 FIXME("(%p)->(%x)\n", iface, v);
472 return E_NOTIMPL;
475 static HRESULT WINAPI HTMLDocument_get_expando(IHTMLDocument2 *iface, VARIANT_BOOL *p)
477 FIXME("(%p)->(%p)\n", iface, p);
478 return E_NOTIMPL;
481 static HRESULT WINAPI HTMLDocument_put_charset(IHTMLDocument2 *iface, BSTR v)
483 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
484 return E_NOTIMPL;
487 static HRESULT WINAPI HTMLDocument_get_charset(IHTMLDocument2 *iface, BSTR *p)
489 FIXME("(%p)->(%p)\n", iface, p);
490 return E_NOTIMPL;
493 static HRESULT WINAPI HTMLDocument_put_defaultCharset(IHTMLDocument2 *iface, BSTR v)
495 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
496 return E_NOTIMPL;
499 static HRESULT WINAPI HTMLDocument_get_defaultCharset(IHTMLDocument2 *iface, BSTR *p)
501 FIXME("(%p)->(%p)\n", iface, p);
502 return E_NOTIMPL;
505 static HRESULT WINAPI HTMLDocument_get_mimeType(IHTMLDocument2 *iface, BSTR *p)
507 FIXME("(%p)->(%p)\n", iface, p);
508 return E_NOTIMPL;
511 static HRESULT WINAPI HTMLDocument_get_fileSize(IHTMLDocument2 *iface, BSTR *p)
513 FIXME("(%p)->(%p)\n", iface, p);
514 return E_NOTIMPL;
517 static HRESULT WINAPI HTMLDocument_get_fileCreatedDate(IHTMLDocument2 *iface, BSTR *p)
519 FIXME("(%p)->(%p)\n", iface, p);
520 return E_NOTIMPL;
523 static HRESULT WINAPI HTMLDocument_get_fileModifiedDate(IHTMLDocument2 *iface, BSTR *p)
525 FIXME("(%p)->(%p)\n", iface, p);
526 return E_NOTIMPL;
529 static HRESULT WINAPI HTMLDocument_get_fileUpdatedDate(IHTMLDocument2 *iface, BSTR *p)
531 FIXME("(%p)->(%p)\n", iface, p);
532 return E_NOTIMPL;
535 static HRESULT WINAPI HTMLDocument_get_security(IHTMLDocument2 *iface, BSTR *p)
537 FIXME("(%p)->(%p)\n", iface, p);
538 return E_NOTIMPL;
541 static HRESULT WINAPI HTMLDocument_get_protocol(IHTMLDocument2 *iface, BSTR *p)
543 FIXME("(%p)->(%p)\n", iface, p);
544 return E_NOTIMPL;
547 static HRESULT WINAPI HTMLDocument_get_nameProp(IHTMLDocument2 *iface, BSTR *p)
549 FIXME("(%p)->(%p)\n", iface, p);
550 return E_NOTIMPL;
553 static HRESULT WINAPI HTMLDocument_write(IHTMLDocument2 *iface, SAFEARRAY *psarray)
555 FIXME("(%p)->(%p)\n", iface, psarray);
556 return E_NOTIMPL;
559 static HRESULT WINAPI HTMLDocument_writeln(IHTMLDocument2 *iface, SAFEARRAY *psarray)
561 FIXME("(%p)->(%p)\n", iface, psarray);
562 return E_NOTIMPL;
565 static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT name,
566 VARIANT features, VARIANT replace, IDispatch **pomWindowResult)
568 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(url), pomWindowResult);
569 return E_NOTIMPL;
572 static HRESULT WINAPI HTMLDocument_close(IHTMLDocument2 *iface)
574 FIXME("(%p)\n", iface);
575 return E_NOTIMPL;
578 static HRESULT WINAPI HTMLDocument_clear(IHTMLDocument2 *iface)
580 FIXME("(%p)\n", iface);
581 return E_NOTIMPL;
584 static HRESULT WINAPI HTMLDocument_queryCommandSupported(IHTMLDocument2 *iface, BSTR cmdID,
585 VARIANT_BOOL *pfRet)
587 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
588 return E_NOTIMPL;
591 static HRESULT WINAPI HTMLDocument_queryCommandEnabled(IHTMLDocument2 *iface, BSTR cmdID,
592 VARIANT_BOOL *pfRet)
594 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
595 return E_NOTIMPL;
598 static HRESULT WINAPI HTMLDocument_queryCommandState(IHTMLDocument2 *iface, BSTR cmdID,
599 VARIANT_BOOL *pfRet)
601 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
602 return E_NOTIMPL;
605 static HRESULT WINAPI HTMLDocument_queryCommandIndeterm(IHTMLDocument2 *iface, BSTR cmdID,
606 VARIANT_BOOL *pfRet)
608 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
609 return E_NOTIMPL;
612 static HRESULT WINAPI HTMLDocument_queryCommandText(IHTMLDocument2 *iface, BSTR cmdID,
613 BSTR *pfRet)
615 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
616 return E_NOTIMPL;
619 static HRESULT WINAPI HTMLDocument_queryCommandValue(IHTMLDocument2 *iface, BSTR cmdID,
620 VARIANT *pfRet)
622 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
623 return E_NOTIMPL;
626 static HRESULT WINAPI HTMLDocument_execCommand(IHTMLDocument2 *iface, BSTR cmdID,
627 VARIANT_BOOL showUI, VARIANT value, VARIANT_BOOL *pfRet)
629 FIXME("(%p)->(%s %x %p)\n", iface, debugstr_w(cmdID), showUI, pfRet);
630 return E_NOTIMPL;
633 static HRESULT WINAPI HTMLDocument_execCommandShowHelp(IHTMLDocument2 *iface, BSTR cmdID,
634 VARIANT_BOOL *pfRet)
636 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
637 return E_NOTIMPL;
640 static HRESULT WINAPI HTMLDocument_createElement(IHTMLDocument2 *iface, BSTR eTag,
641 IHTMLElement **newElem)
643 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(eTag), newElem);
644 return E_NOTIMPL;
647 static HRESULT WINAPI HTMLDocument_put_onhelp(IHTMLDocument2 *iface, VARIANT v)
649 FIXME("(%p)\n", iface);
650 return E_NOTIMPL;
653 static HRESULT WINAPI HTMLDocument_get_onhelp(IHTMLDocument2 *iface, VARIANT *p)
655 FIXME("(%p)->(%p)\n", iface, p);
656 return E_NOTIMPL;
659 static HRESULT WINAPI HTMLDocument_put_onclick(IHTMLDocument2 *iface, VARIANT v)
661 FIXME("(%p)\n", iface);
662 return E_NOTIMPL;
665 static HRESULT WINAPI HTMLDocument_get_onclick(IHTMLDocument2 *iface, VARIANT *p)
667 FIXME("(%p)->(%p)\n", iface, p);
668 return E_NOTIMPL;
671 static HRESULT WINAPI HTMLDocument_put_ondblclick(IHTMLDocument2 *iface, VARIANT v)
673 FIXME("(%p)\n", iface);
674 return E_NOTIMPL;
677 static HRESULT WINAPI HTMLDocument_get_ondblclick(IHTMLDocument2 *iface, VARIANT *p)
679 FIXME("(%p)->(%p)\n", iface, p);
680 return E_NOTIMPL;
683 static HRESULT WINAPI HTMLDocument_put_onkeyup(IHTMLDocument2 *iface, VARIANT v)
685 FIXME("(%p)\n", iface);
686 return E_NOTIMPL;
689 static HRESULT WINAPI HTMLDocument_get_onkeyup(IHTMLDocument2 *iface, VARIANT *p)
691 FIXME("(%p)->(%p)\n", iface, p);
692 return E_NOTIMPL;
695 static HRESULT WINAPI HTMLDocument_put_onkeydown(IHTMLDocument2 *iface, VARIANT v)
697 FIXME("(%p)\n", iface);
698 return E_NOTIMPL;
701 static HRESULT WINAPI HTMLDocument_get_onkeydown(IHTMLDocument2 *iface, VARIANT *p)
703 FIXME("(%p)->(%p)\n", iface, p);
704 return E_NOTIMPL;
707 static HRESULT WINAPI HTMLDocument_put_onkeypress(IHTMLDocument2 *iface, VARIANT v)
709 FIXME("(%p)\n", iface);
710 return E_NOTIMPL;
713 static HRESULT WINAPI HTMLDocument_get_onkeypress(IHTMLDocument2 *iface, VARIANT *p)
715 FIXME("(%p)->(%p)\n", iface, p);
716 return E_NOTIMPL;
719 static HRESULT WINAPI HTMLDocument_put_onmouseup(IHTMLDocument2 *iface, VARIANT v)
721 FIXME("(%p)\n", iface);
722 return E_NOTIMPL;
725 static HRESULT WINAPI HTMLDocument_get_onmouseup(IHTMLDocument2 *iface, VARIANT *p)
727 FIXME("(%p)->(%p)\n", iface, p);
728 return E_NOTIMPL;
731 static HRESULT WINAPI HTMLDocument_put_onmousedown(IHTMLDocument2 *iface, VARIANT v)
733 FIXME("(%p)\n", iface);
734 return E_NOTIMPL;
737 static HRESULT WINAPI HTMLDocument_get_onmousedown(IHTMLDocument2 *iface, VARIANT *p)
739 FIXME("(%p)->(%p)\n", iface, p);
740 return E_NOTIMPL;
743 static HRESULT WINAPI HTMLDocument_put_onmousemove(IHTMLDocument2 *iface, VARIANT v)
745 FIXME("(%p)\n", iface);
746 return E_NOTIMPL;
749 static HRESULT WINAPI HTMLDocument_get_onmousemove(IHTMLDocument2 *iface, VARIANT *p)
751 FIXME("(%p)->(%p)\n", iface, p);
752 return E_NOTIMPL;
755 static HRESULT WINAPI HTMLDocument_put_onmouseout(IHTMLDocument2 *iface, VARIANT v)
757 FIXME("(%p)\n", iface);
758 return E_NOTIMPL;
761 static HRESULT WINAPI HTMLDocument_get_onmouseout(IHTMLDocument2 *iface, VARIANT *p)
763 FIXME("(%p)->(%p)\n", iface, p);
764 return E_NOTIMPL;
767 static HRESULT WINAPI HTMLDocument_put_onmouseover(IHTMLDocument2 *iface, VARIANT v)
769 FIXME("(%p)\n", iface);
770 return E_NOTIMPL;
773 static HRESULT WINAPI HTMLDocument_get_onmouseover(IHTMLDocument2 *iface, VARIANT *p)
775 FIXME("(%p)->(%p)\n", iface, p);
776 return E_NOTIMPL;
779 static HRESULT WINAPI HTMLDocument_put_onreadystatechange(IHTMLDocument2 *iface, VARIANT v)
781 FIXME("(%p)\n", iface);
782 return E_NOTIMPL;
785 static HRESULT WINAPI HTMLDocument_get_onreadystatechange(IHTMLDocument2 *iface, VARIANT *p)
787 FIXME("(%p)->(%p)\n", iface, p);
788 return E_NOTIMPL;
791 static HRESULT WINAPI HTMLDocument_put_onafterupdate(IHTMLDocument2 *iface, VARIANT v)
793 FIXME("(%p)\n", iface);
794 return E_NOTIMPL;
797 static HRESULT WINAPI HTMLDocument_get_onafterupdate(IHTMLDocument2 *iface, VARIANT *p)
799 FIXME("(%p)->(%p)\n", iface, p);
800 return E_NOTIMPL;
803 static HRESULT WINAPI HTMLDocument_put_onrowexit(IHTMLDocument2 *iface, VARIANT v)
805 FIXME("(%p)\n", iface);
806 return E_NOTIMPL;
809 static HRESULT WINAPI HTMLDocument_get_onrowexit(IHTMLDocument2 *iface, VARIANT *p)
811 FIXME("(%p)->(%p)\n", iface, p);
812 return E_NOTIMPL;
815 static HRESULT WINAPI HTMLDocument_put_onrowenter(IHTMLDocument2 *iface, VARIANT v)
817 FIXME("(%p)\n", iface);
818 return E_NOTIMPL;
821 static HRESULT WINAPI HTMLDocument_get_onrowenter(IHTMLDocument2 *iface, VARIANT *p)
823 FIXME("(%p)->(%p)\n", iface, p);
824 return E_NOTIMPL;
827 static HRESULT WINAPI HTMLDocument_put_ondragstart(IHTMLDocument2 *iface, VARIANT v)
829 FIXME("(%p)\n", iface);
830 return E_NOTIMPL;
833 static HRESULT WINAPI HTMLDocument_get_ondragstart(IHTMLDocument2 *iface, VARIANT *p)
835 FIXME("(%p)->(%p)\n", iface, p);
836 return E_NOTIMPL;
839 static HRESULT WINAPI HTMLDocument_put_onselectstart(IHTMLDocument2 *iface, VARIANT v)
841 FIXME("(%p)\n", iface);
842 return E_NOTIMPL;
845 static HRESULT WINAPI HTMLDocument_get_onselectstart(IHTMLDocument2 *iface, VARIANT *p)
847 FIXME("(%p)->(%p)\n", iface, p);
848 return E_NOTIMPL;
851 static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, long x, long y,
852 IHTMLElement **elementHit)
854 FIXME("(%p)->(%ld %ld %p)\n", iface, x, y, elementHit);
855 return E_NOTIMPL;
858 static HRESULT WINAPI HTMLDocument_get_parentWindow(IHTMLDocument2 *iface, IHTMLWindow2 **p)
860 FIXME("(%p)->(%p)\n", iface, p);
861 return E_NOTIMPL;
864 static HRESULT WINAPI HTMLDocument_get_styleSheets(IHTMLDocument2 *iface,
865 IHTMLStyleSheetsCollection **p)
867 FIXME("(%p)->(%p)\n", iface, p);
868 return E_NOTIMPL;
871 static HRESULT WINAPI HTMLDocument_put_onbeforeupdate(IHTMLDocument2 *iface, VARIANT v)
873 FIXME("(%p)\n", iface);
874 return E_NOTIMPL;
877 static HRESULT WINAPI HTMLDocument_get_onbeforeupdate(IHTMLDocument2 *iface, VARIANT *p)
879 FIXME("(%p)->(%p)\n", iface, p);
880 return E_NOTIMPL;
883 static HRESULT WINAPI HTMLDocument_put_onerrorupdate(IHTMLDocument2 *iface, VARIANT v)
885 FIXME("(%p)\n", iface);
886 return E_NOTIMPL;
889 static HRESULT WINAPI HTMLDocument_get_onerrorupdate(IHTMLDocument2 *iface, VARIANT *p)
891 FIXME("(%p)->(%p)\n", iface, p);
892 return E_NOTIMPL;
895 static HRESULT WINAPI HTMLDocument_toString(IHTMLDocument2 *iface, BSTR *String)
897 FIXME("(%p)->(%p)\n", iface, String);
898 return E_NOTIMPL;
901 static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR bstrHref,
902 long lIndex, IHTMLStyleSheet **ppnewStyleSheet)
904 FIXME("(%p)->(%s %ld %p)\n", iface, debugstr_w(bstrHref), lIndex, ppnewStyleSheet);
905 return E_NOTIMPL;
908 static const IHTMLDocument2Vtbl HTMLDocumentVtbl = {
909 HTMLDocument_QueryInterface,
910 HTMLDocument_AddRef,
911 HTMLDocument_Release,
912 HTMLDocument_GetTypeInfoCount,
913 HTMLDocument_GetTypeInfo,
914 HTMLDocument_GetIDsOfNames,
915 HTMLDocument_Invoke,
916 HTMLDocument_get_Script,
917 HTMLDocument_get_all,
918 HTMLDocument_get_body,
919 HTMLDocument_get_activeElement,
920 HTMLDocument_get_images,
921 HTMLDocument_get_applets,
922 HTMLDocument_get_links,
923 HTMLDocument_get_forms,
924 HTMLDocument_get_anchors,
925 HTMLDocument_put_title,
926 HTMLDocument_get_title,
927 HTMLDocument_get_scripts,
928 HTMLDocument_put_designMode,
929 HTMLDocument_get_designMode,
930 HTMLDocument_get_selection,
931 HTMLDocument_get_readyState,
932 HTMLDocument_get_frames,
933 HTMLDocument_get_embeds,
934 HTMLDocument_get_plugins,
935 HTMLDocument_put_alinkColor,
936 HTMLDocument_get_alinkColor,
937 HTMLDocument_put_bgColor,
938 HTMLDocument_get_bgColor,
939 HTMLDocument_put_fgColor,
940 HTMLDocument_get_fgColor,
941 HTMLDocument_put_linkColor,
942 HTMLDocument_get_linkColor,
943 HTMLDocument_put_vlinkColor,
944 HTMLDocument_get_vlinkColor,
945 HTMLDocument_get_referrer,
946 HTMLDocument_get_location,
947 HTMLDocument_get_lastModified,
948 HTMLDocument_put_URL,
949 HTMLDocument_get_URL,
950 HTMLDocument_put_domain,
951 HTMLDocument_get_domain,
952 HTMLDocument_put_cookie,
953 HTMLDocument_get_cookie,
954 HTMLDocument_put_expando,
955 HTMLDocument_get_expando,
956 HTMLDocument_put_charset,
957 HTMLDocument_get_charset,
958 HTMLDocument_put_defaultCharset,
959 HTMLDocument_get_defaultCharset,
960 HTMLDocument_get_mimeType,
961 HTMLDocument_get_fileSize,
962 HTMLDocument_get_fileCreatedDate,
963 HTMLDocument_get_fileModifiedDate,
964 HTMLDocument_get_fileUpdatedDate,
965 HTMLDocument_get_security,
966 HTMLDocument_get_protocol,
967 HTMLDocument_get_nameProp,
968 HTMLDocument_write,
969 HTMLDocument_writeln,
970 HTMLDocument_open,
971 HTMLDocument_close,
972 HTMLDocument_clear,
973 HTMLDocument_queryCommandSupported,
974 HTMLDocument_queryCommandEnabled,
975 HTMLDocument_queryCommandState,
976 HTMLDocument_queryCommandIndeterm,
977 HTMLDocument_queryCommandText,
978 HTMLDocument_queryCommandValue,
979 HTMLDocument_execCommand,
980 HTMLDocument_execCommandShowHelp,
981 HTMLDocument_createElement,
982 HTMLDocument_put_onhelp,
983 HTMLDocument_get_onhelp,
984 HTMLDocument_put_onclick,
985 HTMLDocument_get_onclick,
986 HTMLDocument_put_ondblclick,
987 HTMLDocument_get_ondblclick,
988 HTMLDocument_put_onkeyup,
989 HTMLDocument_get_onkeyup,
990 HTMLDocument_put_onkeydown,
991 HTMLDocument_get_onkeydown,
992 HTMLDocument_put_onkeypress,
993 HTMLDocument_get_onkeypress,
994 HTMLDocument_put_onmouseup,
995 HTMLDocument_get_onmouseup,
996 HTMLDocument_put_onmousedown,
997 HTMLDocument_get_onmousedown,
998 HTMLDocument_put_onmousemove,
999 HTMLDocument_get_onmousemove,
1000 HTMLDocument_put_onmouseout,
1001 HTMLDocument_get_onmouseout,
1002 HTMLDocument_put_onmouseover,
1003 HTMLDocument_get_onmouseover,
1004 HTMLDocument_put_onreadystatechange,
1005 HTMLDocument_get_onreadystatechange,
1006 HTMLDocument_put_onafterupdate,
1007 HTMLDocument_get_onafterupdate,
1008 HTMLDocument_put_onrowexit,
1009 HTMLDocument_get_onrowexit,
1010 HTMLDocument_put_onrowenter,
1011 HTMLDocument_get_onrowenter,
1012 HTMLDocument_put_ondragstart,
1013 HTMLDocument_get_ondragstart,
1014 HTMLDocument_put_onselectstart,
1015 HTMLDocument_get_onselectstart,
1016 HTMLDocument_elementFromPoint,
1017 HTMLDocument_get_parentWindow,
1018 HTMLDocument_get_styleSheets,
1019 HTMLDocument_put_onbeforeupdate,
1020 HTMLDocument_get_onbeforeupdate,
1021 HTMLDocument_put_onerrorupdate,
1022 HTMLDocument_get_onerrorupdate,
1023 HTMLDocument_toString,
1024 HTMLDocument_createStyleSheet
1027 HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
1029 HTMLDocument *ret;
1030 HRESULT hres;
1032 TRACE("(%p %s %p)\n", pUnkOuter, debugstr_guid(riid), ppvObject);
1034 ret = HeapAlloc(GetProcessHeap(), 0, sizeof(HTMLDocument));
1035 ret->lpHTMLDocument2Vtbl = &HTMLDocumentVtbl;
1036 ret->ref = 0;
1037 ret->nscontainer = NULL;
1038 ret->nodes = NULL;
1040 hres = IHTMLDocument_QueryInterface(HTMLDOC(ret), riid, ppvObject);
1041 if(FAILED(hres)) {
1042 HeapFree(GetProcessHeap(), 0, ret);
1043 return hres;
1046 LOCK_MODULE();
1048 HTMLDocument_HTMLDocument3_Init(ret);
1049 HTMLDocument_Persist_Init(ret);
1050 HTMLDocument_OleObj_Init(ret);
1051 HTMLDocument_View_Init(ret);
1052 HTMLDocument_Window_Init(ret);
1053 HTMLDocument_Service_Init(ret);
1054 HTMLDocument_Hlink_Init(ret);
1055 HTMLDocument_ConnectionPoints_Init(ret);
1057 ret->nscontainer = NSContainer_Create(ret, NULL);
1059 return hres;