mshtml: Added stub implementation of IPersistStreamInit.
[wine/dcerpc.git] / dlls / mshtml / htmldoc.c
blobd028d8373ad6dfd97c71dd9377e0b9eb2cfd824d
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);
118 if(*ppvObject) {
119 IHTMLDocument2_AddRef(iface);
120 return S_OK;
123 FIXME("(%p)->(%s %p) interface not supported\n", This, debugstr_guid(riid), ppvObject);
124 return E_NOINTERFACE;
127 static ULONG WINAPI HTMLDocument_AddRef(IHTMLDocument2 *iface)
129 HTMLDocument *This = HTMLDOC_THIS(iface);
130 ULONG ref = InterlockedIncrement(&This->ref);
131 TRACE("(%p) ref = %lu\n", This, ref);
132 return ref;
135 static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
137 HTMLDocument *This = HTMLDOC_THIS(iface);
138 ULONG ref = InterlockedDecrement(&This->ref);
140 TRACE("(%p) ref = %lu\n", This, ref);
142 if(!ref) {
143 if(This->client)
144 IOleObject_SetClientSite(OLEOBJ(This), NULL);
145 if(This->in_place_active)
146 IOleInPlaceObjectWindowless_InPlaceDeactivate(INPLACEWIN(This));
147 if(This->ipsite)
148 IOleDocumentView_SetInPlaceSite(DOCVIEW(This), NULL);
150 if(This->tooltips_hwnd)
151 DestroyWindow(This->tooltips_hwnd);
152 if(This->hwnd)
153 DestroyWindow(This->hwnd);
155 release_nodes(This);
157 if(This->nscontainer)
158 NSContainer_Release(This->nscontainer);
160 HeapFree(GetProcessHeap(), 0, This);
162 UNLOCK_MODULE();
165 return ref;
168 static HRESULT WINAPI HTMLDocument_GetTypeInfoCount(IHTMLDocument2 *iface, UINT *pctinfo)
170 FIXME("(%p)->(%p)\n", iface, pctinfo);
171 return E_NOTIMPL;
174 static HRESULT WINAPI HTMLDocument_GetTypeInfo(IHTMLDocument2 *iface, UINT iTInfo,
175 LCID lcid, ITypeInfo **ppTInfo)
177 FIXME("(%p)->(%u %lu %p)\n", iface, iTInfo, lcid, ppTInfo);
178 return E_NOTIMPL;
181 static HRESULT WINAPI HTMLDocument_GetIDsOfNames(IHTMLDocument2 *iface, REFIID riid,
182 LPOLESTR *rgszNames, UINT cNames,
183 LCID lcid, DISPID *rgDispId)
185 FIXME("(%p)->(%s %p %u %lu %p)\n", iface, debugstr_guid(riid), rgszNames, cNames,
186 lcid, rgDispId);
187 return E_NOTIMPL;
190 static HRESULT WINAPI HTMLDocument_Invoke(IHTMLDocument2 *iface, DISPID dispIdMember,
191 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
192 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
194 FIXME("(%p)->(%ld %s %ld %d %p %p %p %p)\n", iface, dispIdMember, debugstr_guid(riid),
195 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
196 return E_NOTIMPL;
199 static HRESULT WINAPI HTMLDocument_get_Script(IHTMLDocument2 *iface, IDispatch **p)
201 FIXME("(%p)->(%p)\n", iface, p);
202 return E_NOTIMPL;
205 static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCollection **p)
207 FIXME("(%p)->(%p)\n", iface, p);
208 return E_NOTIMPL;
211 static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement **p)
213 HTMLDocument *This = HTMLDOC_THIS(iface);
214 nsIDOMDocument *nsdoc;
215 nsIDOMHTMLDocument *nshtmldoc;
216 nsIDOMHTMLElement *nsbody = NULL;
217 HTMLDOMNode *node;
218 nsresult nsres;
220 TRACE("(%p)->(%p)\n", This, p);
222 *p = NULL;
224 if(!This->nscontainer)
225 return S_OK;
227 nsres = nsIWebNavigation_GetDocument(This->nscontainer->navigation, &nsdoc);
228 if(NS_FAILED(nsres)) {
229 ERR("GetDocument failed: %08lx\n", nsres);
230 return S_OK;
233 if(NS_FAILED(nsres) || !nsdoc)
234 return S_OK;
236 nsIDOMDocument_QueryInterface(nsdoc, &IID_nsIDOMHTMLDocument, (void**)&nshtmldoc);
237 nsIDOMDocument_Release(nsdoc);
239 nsres = nsIDOMHTMLDocument_GetBody(nshtmldoc, &nsbody);
240 nsIDOMHTMLDocument_Release(nshtmldoc);
242 if(NS_FAILED(nsres) || !nsbody) {
243 TRACE("Could not get body: %08lx\n", nsres);
244 return S_OK;
247 node = get_node(This, (nsIDOMNode*)nsbody);
248 nsIDOMHTMLElement_Release(nsbody);
250 IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)p);
252 TRACE("*p = %p\n", *p);
253 return S_OK;
256 static HRESULT WINAPI HTMLDocument_get_activeElement(IHTMLDocument2 *iface, IHTMLElement **p)
258 FIXME("(%p)->(%p)\n", iface, p);
259 return E_NOTIMPL;
262 static HRESULT WINAPI HTMLDocument_get_images(IHTMLDocument2 *iface, IHTMLElementCollection **p)
264 FIXME("(%p)->(%p)\n", iface, p);
265 return E_NOTIMPL;
268 static HRESULT WINAPI HTMLDocument_get_applets(IHTMLDocument2 *iface, IHTMLElementCollection **p)
270 FIXME("(%p)->(%p)\n", iface, p);
271 return E_NOTIMPL;
274 static HRESULT WINAPI HTMLDocument_get_links(IHTMLDocument2 *iface, IHTMLElementCollection **p)
276 FIXME("(%p)->(%p)\n", iface, p);
277 return E_NOTIMPL;
280 static HRESULT WINAPI HTMLDocument_get_forms(IHTMLDocument2 *iface, IHTMLElementCollection **p)
282 FIXME("(%p)->(%p)\n", iface, p);
283 return E_NOTIMPL;
286 static HRESULT WINAPI HTMLDocument_get_anchors(IHTMLDocument2 *iface, IHTMLElementCollection **p)
288 FIXME("(%p)->(%p)\n", iface, p);
289 return E_NOTIMPL;
292 static HRESULT WINAPI HTMLDocument_put_title(IHTMLDocument2 *iface, BSTR v)
294 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
295 return E_NOTIMPL;
298 static HRESULT WINAPI HTMLDocument_get_title(IHTMLDocument2 *iface, BSTR *p)
300 FIXME("(%p)->(%p)\n", iface, p);
301 return E_NOTIMPL;
304 static HRESULT WINAPI HTMLDocument_get_scripts(IHTMLDocument2 *iface, IHTMLElementCollection **p)
306 FIXME("(%p)->(%p)\n", iface, p);
307 return E_NOTIMPL;
310 static HRESULT WINAPI HTMLDocument_put_designMode(IHTMLDocument2 *iface, BSTR v)
312 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
313 return E_NOTIMPL;
316 static HRESULT WINAPI HTMLDocument_get_designMode(IHTMLDocument2 *iface, BSTR *p)
318 FIXME("(%p)->(%p)\n", iface, p);
319 return E_NOTIMPL;
322 static HRESULT WINAPI HTMLDocument_get_selection(IHTMLDocument2 *iface, IHTMLSelectionObject **p)
324 FIXME("(%p)->(%p)\n", iface, p);
325 return E_NOTIMPL;
328 static HRESULT WINAPI HTMLDocument_get_readyState(IHTMLDocument2 *iface, BSTR *p)
330 FIXME("(%p)->(%p)\n", iface, p);
331 return E_NOTIMPL;
334 static HRESULT WINAPI HTMLDocument_get_frames(IHTMLDocument2 *iface, IHTMLFramesCollection2 **p)
336 FIXME("(%p)->(%p)\n", iface, p);
337 return E_NOTIMPL;
340 static HRESULT WINAPI HTMLDocument_get_embeds(IHTMLDocument2 *iface, IHTMLElementCollection **p)
342 FIXME("(%p)->(%p)\n", iface, p);
343 return E_NOTIMPL;
346 static HRESULT WINAPI HTMLDocument_get_plugins(IHTMLDocument2 *iface, IHTMLElementCollection **p)
348 FIXME("(%p)->(%p)\n", iface, p);
349 return E_NOTIMPL;
352 static HRESULT WINAPI HTMLDocument_put_alinkColor(IHTMLDocument2 *iface, VARIANT v)
354 FIXME("(%p)\n", iface);
355 return E_NOTIMPL;
358 static HRESULT WINAPI HTMLDocument_get_alinkColor(IHTMLDocument2 *iface, VARIANT *p)
360 FIXME("(%p)->(%p)\n", iface, p);
361 return E_NOTIMPL;
364 static HRESULT WINAPI HTMLDocument_put_bgColor(IHTMLDocument2 *iface, VARIANT v)
366 FIXME("(%p)\n", iface);
367 return E_NOTIMPL;
370 static HRESULT WINAPI HTMLDocument_get_bgColor(IHTMLDocument2 *iface, VARIANT *p)
372 FIXME("(%p)->(%p)\n", iface, p);
373 return E_NOTIMPL;
376 static HRESULT WINAPI HTMLDocument_put_fgColor(IHTMLDocument2 *iface, VARIANT v)
378 FIXME("(%p)\n", iface);
379 return E_NOTIMPL;
382 static HRESULT WINAPI HTMLDocument_get_fgColor(IHTMLDocument2 *iface, VARIANT *p)
384 FIXME("(%p)->(%p)\n", iface, p);
385 return E_NOTIMPL;
388 static HRESULT WINAPI HTMLDocument_put_linkColor(IHTMLDocument2 *iface, VARIANT v)
390 FIXME("(%p)->()\n", iface);
391 return E_NOTIMPL;
394 static HRESULT WINAPI HTMLDocument_get_linkColor(IHTMLDocument2 *iface, VARIANT *p)
396 FIXME("(%p)->(%p)\n", iface, p);
397 return E_NOTIMPL;
400 static HRESULT WINAPI HTMLDocument_put_vlinkColor(IHTMLDocument2 *iface, VARIANT v)
402 FIXME("(%p)\n", iface);
403 return E_NOTIMPL;
406 static HRESULT WINAPI HTMLDocument_get_vlinkColor(IHTMLDocument2 *iface, VARIANT *p)
408 FIXME("(%p)->(%p)\n", iface, p);
409 return E_NOTIMPL;
412 static HRESULT WINAPI HTMLDocument_get_referrer(IHTMLDocument2 *iface, BSTR *p)
414 FIXME("(%p)->(%p)\n", iface, p);
415 return E_NOTIMPL;
418 static HRESULT WINAPI HTMLDocument_get_location(IHTMLDocument2 *iface, IHTMLLocation **p)
420 FIXME("(%p)->(%p)\n", iface, p);
421 return E_NOTIMPL;
424 static HRESULT WINAPI HTMLDocument_get_lastModified(IHTMLDocument2 *iface, BSTR *p)
426 FIXME("(%p)->(%p)\n", iface, p);
427 return E_NOTIMPL;
430 static HRESULT WINAPI HTMLDocument_put_URL(IHTMLDocument2 *iface, BSTR v)
432 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
433 return E_NOTIMPL;
436 static HRESULT WINAPI HTMLDocument_get_URL(IHTMLDocument2 *iface, BSTR *p)
438 FIXME("(%p)->(%p)\n", iface, p);
439 return E_NOTIMPL;
442 static HRESULT WINAPI HTMLDocument_put_domain(IHTMLDocument2 *iface, BSTR v)
444 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
445 return E_NOTIMPL;
448 static HRESULT WINAPI HTMLDocument_get_domain(IHTMLDocument2 *iface, BSTR *p)
450 FIXME("(%p)->(%p)\n", iface, p);
451 return E_NOTIMPL;
454 static HRESULT WINAPI HTMLDocument_put_cookie(IHTMLDocument2 *iface, BSTR v)
456 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
457 return E_NOTIMPL;
460 static HRESULT WINAPI HTMLDocument_get_cookie(IHTMLDocument2 *iface, BSTR *p)
462 FIXME("(%p)->(%p)\n", iface, p);
463 return E_NOTIMPL;
466 static HRESULT WINAPI HTMLDocument_put_expando(IHTMLDocument2 *iface, VARIANT_BOOL v)
468 FIXME("(%p)->(%x)\n", iface, v);
469 return E_NOTIMPL;
472 static HRESULT WINAPI HTMLDocument_get_expando(IHTMLDocument2 *iface, VARIANT_BOOL *p)
474 FIXME("(%p)->(%p)\n", iface, p);
475 return E_NOTIMPL;
478 static HRESULT WINAPI HTMLDocument_put_charset(IHTMLDocument2 *iface, BSTR v)
480 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
481 return E_NOTIMPL;
484 static HRESULT WINAPI HTMLDocument_get_charset(IHTMLDocument2 *iface, BSTR *p)
486 FIXME("(%p)->(%p)\n", iface, p);
487 return E_NOTIMPL;
490 static HRESULT WINAPI HTMLDocument_put_defaultCharset(IHTMLDocument2 *iface, BSTR v)
492 FIXME("(%p)->(%s)\n", iface, debugstr_w(v));
493 return E_NOTIMPL;
496 static HRESULT WINAPI HTMLDocument_get_defaultCharset(IHTMLDocument2 *iface, BSTR *p)
498 FIXME("(%p)->(%p)\n", iface, p);
499 return E_NOTIMPL;
502 static HRESULT WINAPI HTMLDocument_get_mimeType(IHTMLDocument2 *iface, BSTR *p)
504 FIXME("(%p)->(%p)\n", iface, p);
505 return E_NOTIMPL;
508 static HRESULT WINAPI HTMLDocument_get_fileSize(IHTMLDocument2 *iface, BSTR *p)
510 FIXME("(%p)->(%p)\n", iface, p);
511 return E_NOTIMPL;
514 static HRESULT WINAPI HTMLDocument_get_fileCreatedDate(IHTMLDocument2 *iface, BSTR *p)
516 FIXME("(%p)->(%p)\n", iface, p);
517 return E_NOTIMPL;
520 static HRESULT WINAPI HTMLDocument_get_fileModifiedDate(IHTMLDocument2 *iface, BSTR *p)
522 FIXME("(%p)->(%p)\n", iface, p);
523 return E_NOTIMPL;
526 static HRESULT WINAPI HTMLDocument_get_fileUpdatedDate(IHTMLDocument2 *iface, BSTR *p)
528 FIXME("(%p)->(%p)\n", iface, p);
529 return E_NOTIMPL;
532 static HRESULT WINAPI HTMLDocument_get_security(IHTMLDocument2 *iface, BSTR *p)
534 FIXME("(%p)->(%p)\n", iface, p);
535 return E_NOTIMPL;
538 static HRESULT WINAPI HTMLDocument_get_protocol(IHTMLDocument2 *iface, BSTR *p)
540 FIXME("(%p)->(%p)\n", iface, p);
541 return E_NOTIMPL;
544 static HRESULT WINAPI HTMLDocument_get_nameProp(IHTMLDocument2 *iface, BSTR *p)
546 FIXME("(%p)->(%p)\n", iface, p);
547 return E_NOTIMPL;
550 static HRESULT WINAPI HTMLDocument_write(IHTMLDocument2 *iface, SAFEARRAY *psarray)
552 FIXME("(%p)->(%p)\n", iface, psarray);
553 return E_NOTIMPL;
556 static HRESULT WINAPI HTMLDocument_writeln(IHTMLDocument2 *iface, SAFEARRAY *psarray)
558 FIXME("(%p)->(%p)\n", iface, psarray);
559 return E_NOTIMPL;
562 static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT name,
563 VARIANT features, VARIANT replace, IDispatch **pomWindowResult)
565 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(url), pomWindowResult);
566 return E_NOTIMPL;
569 static HRESULT WINAPI HTMLDocument_close(IHTMLDocument2 *iface)
571 FIXME("(%p)\n", iface);
572 return E_NOTIMPL;
575 static HRESULT WINAPI HTMLDocument_clear(IHTMLDocument2 *iface)
577 FIXME("(%p)\n", iface);
578 return E_NOTIMPL;
581 static HRESULT WINAPI HTMLDocument_queryCommandSupported(IHTMLDocument2 *iface, BSTR cmdID,
582 VARIANT_BOOL *pfRet)
584 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
585 return E_NOTIMPL;
588 static HRESULT WINAPI HTMLDocument_queryCommandEnabled(IHTMLDocument2 *iface, BSTR cmdID,
589 VARIANT_BOOL *pfRet)
591 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
592 return E_NOTIMPL;
595 static HRESULT WINAPI HTMLDocument_queryCommandState(IHTMLDocument2 *iface, BSTR cmdID,
596 VARIANT_BOOL *pfRet)
598 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
599 return E_NOTIMPL;
602 static HRESULT WINAPI HTMLDocument_queryCommandIndeterm(IHTMLDocument2 *iface, BSTR cmdID,
603 VARIANT_BOOL *pfRet)
605 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
606 return E_NOTIMPL;
609 static HRESULT WINAPI HTMLDocument_queryCommandText(IHTMLDocument2 *iface, BSTR cmdID,
610 BSTR *pfRet)
612 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
613 return E_NOTIMPL;
616 static HRESULT WINAPI HTMLDocument_queryCommandValue(IHTMLDocument2 *iface, BSTR cmdID,
617 VARIANT *pfRet)
619 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
620 return E_NOTIMPL;
623 static HRESULT WINAPI HTMLDocument_execCommand(IHTMLDocument2 *iface, BSTR cmdID,
624 VARIANT_BOOL showUI, VARIANT value, VARIANT_BOOL *pfRet)
626 FIXME("(%p)->(%s %x %p)\n", iface, debugstr_w(cmdID), showUI, pfRet);
627 return E_NOTIMPL;
630 static HRESULT WINAPI HTMLDocument_execCommandShowHelp(IHTMLDocument2 *iface, BSTR cmdID,
631 VARIANT_BOOL *pfRet)
633 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(cmdID), pfRet);
634 return E_NOTIMPL;
637 static HRESULT WINAPI HTMLDocument_createElement(IHTMLDocument2 *iface, BSTR eTag,
638 IHTMLElement **newElem)
640 FIXME("(%p)->(%s %p)\n", iface, debugstr_w(eTag), newElem);
641 return E_NOTIMPL;
644 static HRESULT WINAPI HTMLDocument_put_onhelp(IHTMLDocument2 *iface, VARIANT v)
646 FIXME("(%p)\n", iface);
647 return E_NOTIMPL;
650 static HRESULT WINAPI HTMLDocument_get_onhelp(IHTMLDocument2 *iface, VARIANT *p)
652 FIXME("(%p)->(%p)\n", iface, p);
653 return E_NOTIMPL;
656 static HRESULT WINAPI HTMLDocument_put_onclick(IHTMLDocument2 *iface, VARIANT v)
658 FIXME("(%p)\n", iface);
659 return E_NOTIMPL;
662 static HRESULT WINAPI HTMLDocument_get_onclick(IHTMLDocument2 *iface, VARIANT *p)
664 FIXME("(%p)->(%p)\n", iface, p);
665 return E_NOTIMPL;
668 static HRESULT WINAPI HTMLDocument_put_ondblclick(IHTMLDocument2 *iface, VARIANT v)
670 FIXME("(%p)\n", iface);
671 return E_NOTIMPL;
674 static HRESULT WINAPI HTMLDocument_get_ondblclick(IHTMLDocument2 *iface, VARIANT *p)
676 FIXME("(%p)->(%p)\n", iface, p);
677 return E_NOTIMPL;
680 static HRESULT WINAPI HTMLDocument_put_onkeyup(IHTMLDocument2 *iface, VARIANT v)
682 FIXME("(%p)\n", iface);
683 return E_NOTIMPL;
686 static HRESULT WINAPI HTMLDocument_get_onkeyup(IHTMLDocument2 *iface, VARIANT *p)
688 FIXME("(%p)->(%p)\n", iface, p);
689 return E_NOTIMPL;
692 static HRESULT WINAPI HTMLDocument_put_onkeydown(IHTMLDocument2 *iface, VARIANT v)
694 FIXME("(%p)\n", iface);
695 return E_NOTIMPL;
698 static HRESULT WINAPI HTMLDocument_get_onkeydown(IHTMLDocument2 *iface, VARIANT *p)
700 FIXME("(%p)->(%p)\n", iface, p);
701 return E_NOTIMPL;
704 static HRESULT WINAPI HTMLDocument_put_onkeypress(IHTMLDocument2 *iface, VARIANT v)
706 FIXME("(%p)\n", iface);
707 return E_NOTIMPL;
710 static HRESULT WINAPI HTMLDocument_get_onkeypress(IHTMLDocument2 *iface, VARIANT *p)
712 FIXME("(%p)->(%p)\n", iface, p);
713 return E_NOTIMPL;
716 static HRESULT WINAPI HTMLDocument_put_onmouseup(IHTMLDocument2 *iface, VARIANT v)
718 FIXME("(%p)\n", iface);
719 return E_NOTIMPL;
722 static HRESULT WINAPI HTMLDocument_get_onmouseup(IHTMLDocument2 *iface, VARIANT *p)
724 FIXME("(%p)->(%p)\n", iface, p);
725 return E_NOTIMPL;
728 static HRESULT WINAPI HTMLDocument_put_onmousedown(IHTMLDocument2 *iface, VARIANT v)
730 FIXME("(%p)\n", iface);
731 return E_NOTIMPL;
734 static HRESULT WINAPI HTMLDocument_get_onmousedown(IHTMLDocument2 *iface, VARIANT *p)
736 FIXME("(%p)->(%p)\n", iface, p);
737 return E_NOTIMPL;
740 static HRESULT WINAPI HTMLDocument_put_onmousemove(IHTMLDocument2 *iface, VARIANT v)
742 FIXME("(%p)\n", iface);
743 return E_NOTIMPL;
746 static HRESULT WINAPI HTMLDocument_get_onmousemove(IHTMLDocument2 *iface, VARIANT *p)
748 FIXME("(%p)->(%p)\n", iface, p);
749 return E_NOTIMPL;
752 static HRESULT WINAPI HTMLDocument_put_onmouseout(IHTMLDocument2 *iface, VARIANT v)
754 FIXME("(%p)\n", iface);
755 return E_NOTIMPL;
758 static HRESULT WINAPI HTMLDocument_get_onmouseout(IHTMLDocument2 *iface, VARIANT *p)
760 FIXME("(%p)->(%p)\n", iface, p);
761 return E_NOTIMPL;
764 static HRESULT WINAPI HTMLDocument_put_onmouseover(IHTMLDocument2 *iface, VARIANT v)
766 FIXME("(%p)\n", iface);
767 return E_NOTIMPL;
770 static HRESULT WINAPI HTMLDocument_get_onmouseover(IHTMLDocument2 *iface, VARIANT *p)
772 FIXME("(%p)->(%p)\n", iface, p);
773 return E_NOTIMPL;
776 static HRESULT WINAPI HTMLDocument_put_onreadystatechange(IHTMLDocument2 *iface, VARIANT v)
778 FIXME("(%p)\n", iface);
779 return E_NOTIMPL;
782 static HRESULT WINAPI HTMLDocument_get_onreadystatechange(IHTMLDocument2 *iface, VARIANT *p)
784 FIXME("(%p)->(%p)\n", iface, p);
785 return E_NOTIMPL;
788 static HRESULT WINAPI HTMLDocument_put_onafterupdate(IHTMLDocument2 *iface, VARIANT v)
790 FIXME("(%p)\n", iface);
791 return E_NOTIMPL;
794 static HRESULT WINAPI HTMLDocument_get_onafterupdate(IHTMLDocument2 *iface, VARIANT *p)
796 FIXME("(%p)->(%p)\n", iface, p);
797 return E_NOTIMPL;
800 static HRESULT WINAPI HTMLDocument_put_onrowexit(IHTMLDocument2 *iface, VARIANT v)
802 FIXME("(%p)\n", iface);
803 return E_NOTIMPL;
806 static HRESULT WINAPI HTMLDocument_get_onrowexit(IHTMLDocument2 *iface, VARIANT *p)
808 FIXME("(%p)->(%p)\n", iface, p);
809 return E_NOTIMPL;
812 static HRESULT WINAPI HTMLDocument_put_onrowenter(IHTMLDocument2 *iface, VARIANT v)
814 FIXME("(%p)\n", iface);
815 return E_NOTIMPL;
818 static HRESULT WINAPI HTMLDocument_get_onrowenter(IHTMLDocument2 *iface, VARIANT *p)
820 FIXME("(%p)->(%p)\n", iface, p);
821 return E_NOTIMPL;
824 static HRESULT WINAPI HTMLDocument_put_ondragstart(IHTMLDocument2 *iface, VARIANT v)
826 FIXME("(%p)\n", iface);
827 return E_NOTIMPL;
830 static HRESULT WINAPI HTMLDocument_get_ondragstart(IHTMLDocument2 *iface, VARIANT *p)
832 FIXME("(%p)->(%p)\n", iface, p);
833 return E_NOTIMPL;
836 static HRESULT WINAPI HTMLDocument_put_onselectstart(IHTMLDocument2 *iface, VARIANT v)
838 FIXME("(%p)\n", iface);
839 return E_NOTIMPL;
842 static HRESULT WINAPI HTMLDocument_get_onselectstart(IHTMLDocument2 *iface, VARIANT *p)
844 FIXME("(%p)->(%p)\n", iface, p);
845 return E_NOTIMPL;
848 static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, long x, long y,
849 IHTMLElement **elementHit)
851 FIXME("(%p)->(%ld %ld %p)\n", iface, x, y, elementHit);
852 return E_NOTIMPL;
855 static HRESULT WINAPI HTMLDocument_get_parentWindow(IHTMLDocument2 *iface, IHTMLWindow2 **p)
857 FIXME("(%p)->(%p)\n", iface, p);
858 return E_NOTIMPL;
861 static HRESULT WINAPI HTMLDocument_get_styleSheets(IHTMLDocument2 *iface,
862 IHTMLStyleSheetsCollection **p)
864 FIXME("(%p)->(%p)\n", iface, p);
865 return E_NOTIMPL;
868 static HRESULT WINAPI HTMLDocument_put_onbeforeupdate(IHTMLDocument2 *iface, VARIANT v)
870 FIXME("(%p)\n", iface);
871 return E_NOTIMPL;
874 static HRESULT WINAPI HTMLDocument_get_onbeforeupdate(IHTMLDocument2 *iface, VARIANT *p)
876 FIXME("(%p)->(%p)\n", iface, p);
877 return E_NOTIMPL;
880 static HRESULT WINAPI HTMLDocument_put_onerrorupdate(IHTMLDocument2 *iface, VARIANT v)
882 FIXME("(%p)\n", iface);
883 return E_NOTIMPL;
886 static HRESULT WINAPI HTMLDocument_get_onerrorupdate(IHTMLDocument2 *iface, VARIANT *p)
888 FIXME("(%p)->(%p)\n", iface, p);
889 return E_NOTIMPL;
892 static HRESULT WINAPI HTMLDocument_toString(IHTMLDocument2 *iface, BSTR *String)
894 FIXME("(%p)->(%p)\n", iface, String);
895 return E_NOTIMPL;
898 static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR bstrHref,
899 long lIndex, IHTMLStyleSheet **ppnewStyleSheet)
901 FIXME("(%p)->(%s %ld %p)\n", iface, debugstr_w(bstrHref), lIndex, ppnewStyleSheet);
902 return E_NOTIMPL;
905 static const IHTMLDocument2Vtbl HTMLDocumentVtbl = {
906 HTMLDocument_QueryInterface,
907 HTMLDocument_AddRef,
908 HTMLDocument_Release,
909 HTMLDocument_GetTypeInfoCount,
910 HTMLDocument_GetTypeInfo,
911 HTMLDocument_GetIDsOfNames,
912 HTMLDocument_Invoke,
913 HTMLDocument_get_Script,
914 HTMLDocument_get_all,
915 HTMLDocument_get_body,
916 HTMLDocument_get_activeElement,
917 HTMLDocument_get_images,
918 HTMLDocument_get_applets,
919 HTMLDocument_get_links,
920 HTMLDocument_get_forms,
921 HTMLDocument_get_anchors,
922 HTMLDocument_put_title,
923 HTMLDocument_get_title,
924 HTMLDocument_get_scripts,
925 HTMLDocument_put_designMode,
926 HTMLDocument_get_designMode,
927 HTMLDocument_get_selection,
928 HTMLDocument_get_readyState,
929 HTMLDocument_get_frames,
930 HTMLDocument_get_embeds,
931 HTMLDocument_get_plugins,
932 HTMLDocument_put_alinkColor,
933 HTMLDocument_get_alinkColor,
934 HTMLDocument_put_bgColor,
935 HTMLDocument_get_bgColor,
936 HTMLDocument_put_fgColor,
937 HTMLDocument_get_fgColor,
938 HTMLDocument_put_linkColor,
939 HTMLDocument_get_linkColor,
940 HTMLDocument_put_vlinkColor,
941 HTMLDocument_get_vlinkColor,
942 HTMLDocument_get_referrer,
943 HTMLDocument_get_location,
944 HTMLDocument_get_lastModified,
945 HTMLDocument_put_URL,
946 HTMLDocument_get_URL,
947 HTMLDocument_put_domain,
948 HTMLDocument_get_domain,
949 HTMLDocument_put_cookie,
950 HTMLDocument_get_cookie,
951 HTMLDocument_put_expando,
952 HTMLDocument_get_expando,
953 HTMLDocument_put_charset,
954 HTMLDocument_get_charset,
955 HTMLDocument_put_defaultCharset,
956 HTMLDocument_get_defaultCharset,
957 HTMLDocument_get_mimeType,
958 HTMLDocument_get_fileSize,
959 HTMLDocument_get_fileCreatedDate,
960 HTMLDocument_get_fileModifiedDate,
961 HTMLDocument_get_fileUpdatedDate,
962 HTMLDocument_get_security,
963 HTMLDocument_get_protocol,
964 HTMLDocument_get_nameProp,
965 HTMLDocument_write,
966 HTMLDocument_writeln,
967 HTMLDocument_open,
968 HTMLDocument_close,
969 HTMLDocument_clear,
970 HTMLDocument_queryCommandSupported,
971 HTMLDocument_queryCommandEnabled,
972 HTMLDocument_queryCommandState,
973 HTMLDocument_queryCommandIndeterm,
974 HTMLDocument_queryCommandText,
975 HTMLDocument_queryCommandValue,
976 HTMLDocument_execCommand,
977 HTMLDocument_execCommandShowHelp,
978 HTMLDocument_createElement,
979 HTMLDocument_put_onhelp,
980 HTMLDocument_get_onhelp,
981 HTMLDocument_put_onclick,
982 HTMLDocument_get_onclick,
983 HTMLDocument_put_ondblclick,
984 HTMLDocument_get_ondblclick,
985 HTMLDocument_put_onkeyup,
986 HTMLDocument_get_onkeyup,
987 HTMLDocument_put_onkeydown,
988 HTMLDocument_get_onkeydown,
989 HTMLDocument_put_onkeypress,
990 HTMLDocument_get_onkeypress,
991 HTMLDocument_put_onmouseup,
992 HTMLDocument_get_onmouseup,
993 HTMLDocument_put_onmousedown,
994 HTMLDocument_get_onmousedown,
995 HTMLDocument_put_onmousemove,
996 HTMLDocument_get_onmousemove,
997 HTMLDocument_put_onmouseout,
998 HTMLDocument_get_onmouseout,
999 HTMLDocument_put_onmouseover,
1000 HTMLDocument_get_onmouseover,
1001 HTMLDocument_put_onreadystatechange,
1002 HTMLDocument_get_onreadystatechange,
1003 HTMLDocument_put_onafterupdate,
1004 HTMLDocument_get_onafterupdate,
1005 HTMLDocument_put_onrowexit,
1006 HTMLDocument_get_onrowexit,
1007 HTMLDocument_put_onrowenter,
1008 HTMLDocument_get_onrowenter,
1009 HTMLDocument_put_ondragstart,
1010 HTMLDocument_get_ondragstart,
1011 HTMLDocument_put_onselectstart,
1012 HTMLDocument_get_onselectstart,
1013 HTMLDocument_elementFromPoint,
1014 HTMLDocument_get_parentWindow,
1015 HTMLDocument_get_styleSheets,
1016 HTMLDocument_put_onbeforeupdate,
1017 HTMLDocument_get_onbeforeupdate,
1018 HTMLDocument_put_onerrorupdate,
1019 HTMLDocument_get_onerrorupdate,
1020 HTMLDocument_toString,
1021 HTMLDocument_createStyleSheet
1024 HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
1026 HTMLDocument *ret;
1027 HRESULT hres;
1029 TRACE("(%p %s %p)\n", pUnkOuter, debugstr_guid(riid), ppvObject);
1031 ret = HeapAlloc(GetProcessHeap(), 0, sizeof(HTMLDocument));
1032 ret->lpHTMLDocument2Vtbl = &HTMLDocumentVtbl;
1033 ret->ref = 0;
1034 ret->nscontainer = NULL;
1035 ret->nodes = NULL;
1037 hres = IHTMLDocument_QueryInterface(HTMLDOC(ret), riid, ppvObject);
1038 if(FAILED(hres)) {
1039 HeapFree(GetProcessHeap(), 0, ret);
1040 return hres;
1043 LOCK_MODULE();
1045 HTMLDocument_HTMLDocument3_Init(ret);
1046 HTMLDocument_Persist_Init(ret);
1047 HTMLDocument_OleObj_Init(ret);
1048 HTMLDocument_View_Init(ret);
1049 HTMLDocument_Window_Init(ret);
1050 HTMLDocument_Service_Init(ret);
1051 HTMLDocument_Hlink_Init(ret);
1052 HTMLDocument_ConnectionPoints_Init(ret);
1054 ret->nscontainer = NSContainer_Create(ret, NULL);
1056 return hres;