ReactOS 0.4.15-dev-7674-gc0b4db1
oleobj.c
Go to the documentation of this file.
1/*
2 * Copyright 2005 Jacek Caban
3 *
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.
8 *
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.
13 *
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
17 */
18
19#include "mshtml_private.h"
20
21#define DOCHOST_DOCCANNAVIGATE 0
22
23typedef struct {
27
29{
30 return CONTAINING_RECORD(iface, EnumUnknown, IEnumUnknown_iface);
31}
32
34{
36
38 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
39 *ppv = &This->IEnumUnknown_iface;
40 }else if(IsEqualGUID(&IID_IEnumUnknown, riid)) {
41 TRACE("(%p)->(IID_IEnumUnknown %p)\n", This, ppv);
42 *ppv = &This->IEnumUnknown_iface;
43 }else {
44 WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
45 *ppv = NULL;
46 return E_NOINTERFACE;
47 }
48
49 IUnknown_AddRef((IUnknown*)*ppv);
50 return S_OK;
51}
52
54{
57
58 TRACE("(%p) ref=%d\n", This, ref);
59
60 return ref;
61}
62
64{
67
68 TRACE("(%p) ref=%d\n", This, ref);
69
70 if(!ref)
72
73 return ref;
74}
75
76static HRESULT WINAPI EnumUnknown_Next(IEnumUnknown *iface, ULONG celt, IUnknown **rgelt, ULONG *pceltFetched)
77{
79
80 TRACE("(%p)->(%u %p %p)\n", This, celt, rgelt, pceltFetched);
81
82 /* FIXME: It's not clear if we should ever return something here */
83 if(pceltFetched)
84 *pceltFetched = 0;
85 return S_FALSE;
86}
87
89{
91 FIXME("(%p)->(%u)\n", This, celt);
92 return E_NOTIMPL;
93}
94
96{
98 FIXME("(%p)\n", This);
99 return E_NOTIMPL;
100}
101
103{
105 FIXME("(%p)->(%p)\n", This, ppenum);
106 return E_NOTIMPL;
107}
108
109static const IEnumUnknownVtbl EnumUnknownVtbl = {
117};
118
119/**********************************************************
120 * IOleObject implementation
121 */
122
124{
125 return CONTAINING_RECORD(iface, HTMLDocument, IOleObject_iface);
126}
127
129{
132}
133
135{
137 return htmldoc_addref(This);
138}
139
141{
143 return htmldoc_release(This);
144}
145
146static void update_hostinfo(HTMLDocumentObj *This, DOCHOSTUIINFO *hostinfo)
147{
148 nsIScrollable *scrollable;
149 nsresult nsres;
150
151 if(!This->nscontainer)
152 return;
153
154 nsres = nsIWebBrowser_QueryInterface(This->nscontainer->webbrowser, &IID_nsIScrollable, (void**)&scrollable);
155 if(NS_SUCCEEDED(nsres)) {
156 nsres = nsIScrollable_SetDefaultScrollbarPreferences(scrollable, ScrollOrientation_Y,
157 (hostinfo->dwFlags & DOCHOSTUIFLAG_SCROLL_NO) ? Scrollbar_Never : Scrollbar_Always);
158 if(NS_FAILED(nsres))
159 ERR("Could not set default Y scrollbar prefs: %08x\n", nsres);
160
161 nsres = nsIScrollable_SetDefaultScrollbarPreferences(scrollable, ScrollOrientation_X,
162 hostinfo->dwFlags & DOCHOSTUIFLAG_SCROLL_NO ? Scrollbar_Never : Scrollbar_Auto);
163 if(NS_FAILED(nsres))
164 ERR("Could not set default X scrollbar prefs: %08x\n", nsres);
165
166 nsIScrollable_Release(scrollable);
167 }else {
168 ERR("Could not get nsIScrollable: %08x\n", nsres);
169 }
170}
171
172/* Calls undocumented 84 cmd of CGID_ShellDocView */
174{
175 IOleCommandTarget *olecmd;
176 VARIANT var;
178
179 if(!doc->client)
180 return;
181
182 hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd);
183 if(FAILED(hres))
184 return;
185
187 hres = IOleCommandTarget_Exec(olecmd, &CGID_ShellDocView, 84, 0, NULL, &var);
188 IOleCommandTarget_Release(olecmd);
189 if(SUCCEEDED(hres) && V_VT(&var) != VT_NULL)
190 FIXME("handle result\n");
191}
192
193void set_document_navigation(HTMLDocumentObj *doc, BOOL doc_can_navigate)
194{
195 VARIANT var;
196
197 if(!doc->client_cmdtrg)
198 return;
199
200 if(doc_can_navigate) {
201 V_VT(&var) = VT_UNKNOWN;
203 }
204
205 IOleCommandTarget_Exec(doc->client_cmdtrg, &CGID_DocHostCmdPriv, DOCHOST_DOCCANNAVIGATE, 0,
206 doc_can_navigate ? &var : NULL, NULL);
207}
208
210{
211 HKEY settings_key;
212 DWORD val, size;
213 LONG res;
214
215 static const WCHAR ie_keyW[] = {
216 'S','O','F','T','W','A','R','E','\\',
217 'M','i','c','r','o','s','o','f','t','\\',
218 'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r',0};
219 static const WCHAR zoomW[] = {'Z','o','o','m',0};
220 static const WCHAR zoom_factorW[] = {'Z','o','o','m','F','a','c','t','o','r',0};
221
222 res = RegOpenKeyW(HKEY_CURRENT_USER, ie_keyW, &settings_key);
223 if(res != ERROR_SUCCESS)
224 return;
225
226 size = sizeof(val);
227 res = RegGetValueW(settings_key, zoomW, zoom_factorW, RRF_RT_REG_DWORD, NULL, &val, &size);
228 RegCloseKey(settings_key);
229 if(res == ERROR_SUCCESS)
230 set_viewer_zoom(doc->nscontainer, (float)val/100000);
231}
232
234{
236 IOleCommandTarget *cmdtrg = NULL;
237 IOleWindow *ole_window;
238 IBrowserService *browser_service;
239 BOOL hostui_setup;
240 VARIANT silent;
241 HWND hwnd;
243
244 TRACE("(%p)->(%p)\n", This, pClientSite);
245
246 if(pClientSite == This->doc_obj->client)
247 return S_OK;
248
249 if(This->doc_obj->client) {
250 IOleClientSite_Release(This->doc_obj->client);
251 This->doc_obj->client = NULL;
252 This->doc_obj->usermode = UNKNOWN_USERMODE;
253 }
254
255 if(This->doc_obj->client_cmdtrg) {
256 IOleCommandTarget_Release(This->doc_obj->client_cmdtrg);
257 This->doc_obj->client_cmdtrg = NULL;
258 }
259
260 if(This->doc_obj->hostui && !This->doc_obj->custom_hostui) {
261 IDocHostUIHandler_Release(This->doc_obj->hostui);
262 This->doc_obj->hostui = NULL;
263 }
264
265 if(This->doc_obj->doc_object_service) {
266 IDocObjectService_Release(This->doc_obj->doc_object_service);
267 This->doc_obj->doc_object_service = NULL;
268 }
269
270 if(This->doc_obj->webbrowser) {
271 IUnknown_Release(This->doc_obj->webbrowser);
272 This->doc_obj->webbrowser = NULL;
273 }
274
275 if(This->doc_obj->browser_service) {
276 IUnknown_Release(This->doc_obj->browser_service);
277 This->doc_obj->browser_service = NULL;
278 }
279
280 if(This->doc_obj->travel_log) {
281 ITravelLog_Release(This->doc_obj->travel_log);
282 This->doc_obj->travel_log = NULL;
283 }
284
285 memset(&This->doc_obj->hostinfo, 0, sizeof(DOCHOSTUIINFO));
286
287 if(!pClientSite)
288 return S_OK;
289
290 IOleClientSite_AddRef(pClientSite);
291 This->doc_obj->client = pClientSite;
292
293 hostui_setup = This->doc_obj->hostui_setup;
294
295 if(!This->doc_obj->hostui) {
296 IDocHostUIHandler *uihandler;
297
298 This->doc_obj->custom_hostui = FALSE;
299
300 hres = IOleClientSite_QueryInterface(pClientSite, &IID_IDocHostUIHandler, (void**)&uihandler);
301 if(SUCCEEDED(hres))
302 This->doc_obj->hostui = uihandler;
303 }
304
305 if(This->doc_obj->hostui) {
306 DOCHOSTUIINFO hostinfo;
307 LPOLESTR key_path = NULL, override_key_path = NULL;
308 IDocHostUIHandler2 *uihandler2;
309
310 memset(&hostinfo, 0, sizeof(DOCHOSTUIINFO));
311 hostinfo.cbSize = sizeof(DOCHOSTUIINFO);
312 hres = IDocHostUIHandler_GetHostInfo(This->doc_obj->hostui, &hostinfo);
313 if(SUCCEEDED(hres)) {
314 TRACE("hostinfo = {%u %08x %08x %s %s}\n",
315 hostinfo.cbSize, hostinfo.dwFlags, hostinfo.dwDoubleClick,
316 debugstr_w(hostinfo.pchHostCss), debugstr_w(hostinfo.pchHostNS));
317 update_hostinfo(This->doc_obj, &hostinfo);
318 This->doc_obj->hostinfo = hostinfo;
319 }
320
321 if(!hostui_setup) {
322 hres = IDocHostUIHandler_GetOptionKeyPath(This->doc_obj->hostui, &key_path, 0);
323 if(hres == S_OK && key_path) {
324 if(key_path[0]) {
325 /* FIXME: use key_path */
326 FIXME("key_path = %s\n", debugstr_w(key_path));
327 }
328 CoTaskMemFree(key_path);
329 }
330
331 hres = IDocHostUIHandler_QueryInterface(This->doc_obj->hostui, &IID_IDocHostUIHandler2,
332 (void**)&uihandler2);
333 if(SUCCEEDED(hres)) {
334 hres = IDocHostUIHandler2_GetOverrideKeyPath(uihandler2, &override_key_path, 0);
335 if(hres == S_OK && override_key_path) {
336 if(override_key_path[0]) {
337 /*FIXME: use override_key_path */
338 FIXME("override_key_path = %s\n", debugstr_w(override_key_path));
339 }
340 CoTaskMemFree(override_key_path);
341 }
342 IDocHostUIHandler2_Release(uihandler2);
343 }
344
345 This->doc_obj->hostui_setup = TRUE;
346 }
347 }
348
349 load_settings(This->doc_obj);
350
351 /* Native calls here GetWindow. What is it for?
352 * We don't have anything to do with it here (yet). */
353 hres = IOleClientSite_QueryInterface(pClientSite, &IID_IOleWindow, (void**)&ole_window);
354 if(SUCCEEDED(hres)) {
355 IOleWindow_GetWindow(ole_window, &hwnd);
356 IOleWindow_Release(ole_window);
357 }
358
359 hres = do_query_service((IUnknown*)pClientSite, &IID_IShellBrowser,
360 &IID_IBrowserService, (void**)&browser_service);
361 if(SUCCEEDED(hres)) {
362 ITravelLog *travel_log;
363
364 This->doc_obj->browser_service = (IUnknown*)browser_service;
365
366 hres = IBrowserService_GetTravelLog(browser_service, &travel_log);
367 if(SUCCEEDED(hres))
368 This->doc_obj->travel_log = travel_log;
369 }else {
370 browser_service = NULL;
371 }
372
373 hres = IOleClientSite_QueryInterface(pClientSite, &IID_IOleCommandTarget, (void**)&cmdtrg);
374 if(SUCCEEDED(hres)) {
375 VARIANT var;
376 OLECMD cmd = {OLECMDID_SETPROGRESSTEXT, 0};
377
378 This->doc_obj->client_cmdtrg = cmdtrg;
379
380 if(!hostui_setup) {
381 IDocObjectService *doc_object_service;
382 IWebBrowser2 *wb;
383
385
386 if(browser_service) {
387 hres = IBrowserService_QueryInterface(browser_service,
388 &IID_IDocObjectService, (void**)&doc_object_service);
389 if(SUCCEEDED(hres)) {
390 This->doc_obj->doc_object_service = doc_object_service;
391
392 /*
393 * Some embedding routines, esp. in regards to use of IDocObjectService, differ if
394 * embedder supports IWebBrowserApp.
395 */
396 hres = do_query_service((IUnknown*)pClientSite, &IID_IWebBrowserApp, &IID_IWebBrowser2, (void**)&wb);
397 if(SUCCEEDED(hres))
398 This->doc_obj->webbrowser = (IUnknown*)wb;
399 }
400 }
401 }
402
403 call_docview_84(This->doc_obj);
404
405 IOleCommandTarget_QueryStatus(cmdtrg, NULL, 1, &cmd, NULL);
406
407 V_VT(&var) = VT_I4;
408 V_I4(&var) = 0;
409 IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_SETPROGRESSMAX,
410 OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL);
411 IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_SETPROGRESSPOS,
412 OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL);
413 }
414
415 if(This->doc_obj->usermode == UNKNOWN_USERMODE)
416 IOleControl_OnAmbientPropertyChange(&This->IOleControl_iface, DISPID_AMBIENT_USERMODE);
417
418 IOleControl_OnAmbientPropertyChange(&This->IOleControl_iface,
420
421 hres = get_client_disp_property(This->doc_obj->client, DISPID_AMBIENT_SILENT, &silent);
422 if(SUCCEEDED(hres)) {
423 if(V_VT(&silent) != VT_BOOL)
424 WARN("silent = %s\n", debugstr_variant(&silent));
425 else if(V_BOOL(&silent))
426 FIXME("silent == true\n");
427 }
428
429 IOleControl_OnAmbientPropertyChange(&This->IOleControl_iface, DISPID_AMBIENT_USERAGENT);
430 IOleControl_OnAmbientPropertyChange(&This->IOleControl_iface, DISPID_AMBIENT_PALETTE);
431
432 return S_OK;
433}
434
436{
438
439 TRACE("(%p)->(%p)\n", This, ppClientSite);
440
441 if(!ppClientSite)
442 return E_INVALIDARG;
443
444 if(This->doc_obj->client)
445 IOleClientSite_AddRef(This->doc_obj->client);
446 *ppClientSite = This->doc_obj->client;
447
448 return S_OK;
449}
450
451static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp, LPCOLESTR szContainerObj)
452{
454 FIXME("(%p)->(%s %s)\n", This, debugstr_w(szContainerApp), debugstr_w(szContainerObj));
455 return E_NOTIMPL;
456}
457
458static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
459{
461
462 TRACE("(%p)->(%08x)\n", This, dwSaveOption);
463
464 if(dwSaveOption == OLECLOSE_PROMPTSAVE)
465 FIXME("OLECLOSE_PROMPTSAVE not implemented\n");
466
467 if(This->doc_obj->in_place_active)
468 IOleInPlaceObjectWindowless_InPlaceDeactivate(&This->IOleInPlaceObjectWindowless_iface);
469
471
472 if(This->advise_holder)
473 IOleAdviseHolder_SendOnClose(This->advise_holder);
474
475 return S_OK;
476}
477
478static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker *pmk)
479{
481 FIXME("(%p %d %p)->()\n", This, dwWhichMoniker, pmk);
482 return E_NOTIMPL;
483}
484
485static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
486{
488 FIXME("(%p)->(%d %d %p)\n", This, dwAssign, dwWhichMoniker, ppmk);
489 return E_NOTIMPL;
490}
491
492static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, IDataObject *pDataObject, BOOL fCreation,
494{
496 FIXME("(%p)->(%p %x %d)\n", This, pDataObject, fCreation, dwReserved);
497 return E_NOTIMPL;
498}
499
501{
503 FIXME("(%p)->(%d %p)\n", This, dwReserved, ppDataObject);
504 return E_NOTIMPL;
505}
506
507static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSite,
508 LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
509{
511 IOleDocumentSite *pDocSite;
513
514 TRACE("(%p)->(%d %p %p %d %p %p)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent, lprcPosRect);
515
516 if(iVerb != OLEIVERB_SHOW && iVerb != OLEIVERB_UIACTIVATE && iVerb != OLEIVERB_INPLACEACTIVATE) {
517 FIXME("iVerb = %d not supported\n", iVerb);
518 return E_NOTIMPL;
519 }
520
521 if(!pActiveSite)
522 pActiveSite = This->doc_obj->client;
523
524 hres = IOleClientSite_QueryInterface(pActiveSite, &IID_IOleDocumentSite, (void**)&pDocSite);
525 if(SUCCEEDED(hres)) {
527
528 /* FIXME: Create new IOleDocumentView. See CreateView for more info. */
529 hres = IOleDocumentSite_ActivateMe(pDocSite, &This->IOleDocumentView_iface);
530 IOleDocumentSite_Release(pDocSite);
531 }else {
532 hres = IOleDocumentView_UIActivate(&This->IOleDocumentView_iface, TRUE);
533 if(SUCCEEDED(hres)) {
534 if(lprcPosRect) {
535 RECT rect; /* We need to pass rect as not const pointer */
536 rect = *lprcPosRect;
537 IOleDocumentView_SetRect(&This->IOleDocumentView_iface, &rect);
538 }
539 IOleDocumentView_Show(&This->IOleDocumentView_iface, TRUE);
540 }
541 }
542
543 return hres;
544}
545
547{
549 FIXME("(%p)->(%p)\n", This, ppEnumOleVerb);
550 return E_NOTIMPL;
551}
552
554{
556 FIXME("(%p)\n", This);
557 return E_NOTIMPL;
558}
559
561{
563 FIXME("(%p)\n", This);
564 return E_NOTIMPL;
565}
566
568{
570
571 TRACE("(%p)->(%p)\n", This, pClsid);
572
573 if(!pClsid)
574 return E_INVALIDARG;
575
576 *pClsid = CLSID_HTMLDocument;
577 return S_OK;
578}
579
580static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType, LPOLESTR *pszUserType)
581{
583 FIXME("(%p)->(%d %p)\n", This, dwFormOfType, pszUserType);
584 return E_NOTIMPL;
585}
586
587static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
588{
590 FIXME("(%p)->(%d %p)\n", This, dwDrawAspect, psizel);
591 return E_NOTIMPL;
592}
593
594static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
595{
597 FIXME("(%p)->(%d %p)\n", This, dwDrawAspect, psizel);
598 return E_NOTIMPL;
599}
600
601static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink, DWORD *pdwConnection)
602{
604 TRACE("(%p)->(%p %p)\n", This, pAdvSink, pdwConnection);
605
606 if(!pdwConnection)
607 return E_INVALIDARG;
608
609 if(!pAdvSink) {
610 *pdwConnection = 0;
611 return E_INVALIDARG;
612 }
613
614 if(!This->advise_holder) {
615 CreateOleAdviseHolder(&This->advise_holder);
616 if(!This->advise_holder)
617 return E_OUTOFMEMORY;
618 }
619
620 return IOleAdviseHolder_Advise(This->advise_holder, pAdvSink, pdwConnection);
621}
622
624{
626 TRACE("(%p)->(%d)\n", This, dwConnection);
627
628 if(!This->advise_holder)
629 return OLE_E_NOCONNECTION;
630
631 return IOleAdviseHolder_Unadvise(This->advise_holder, dwConnection);
632}
633
635{
637
638 if(!This->advise_holder) {
639 *ppenumAdvise = NULL;
640 return S_OK;
641 }
642
643 return IOleAdviseHolder_EnumAdvise(This->advise_holder, ppenumAdvise);
644}
645
646static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
647{
649 FIXME("(%p)->(%d %p)\n", This, dwAspect, pdwStatus);
650 return E_NOTIMPL;
651}
652
654{
656 FIXME("(%p)->(%p)\n", This, pLogpal);
657 return E_NOTIMPL;
658}
659
660static const IOleObjectVtbl OleObjectVtbl = {
685};
686
687/**********************************************************
688 * IOleDocument implementation
689 */
690
692{
693 return CONTAINING_RECORD(iface, HTMLDocument, IOleDocument_iface);
694}
695
697{
700}
701
703{
705 return htmldoc_addref(This);
706}
707
709{
711 return htmldoc_release(This);
712}
713
716{
719
720 TRACE("(%p)->(%p %p %d %p)\n", This, pIPSite, pstm, dwReserved, ppView);
721
722 if(!ppView)
723 return E_INVALIDARG;
724
725 /* FIXME:
726 * Windows implementation creates new IOleDocumentView when function is called for the
727 * first time and returns E_FAIL when it is called for the second time, but it doesn't matter
728 * if the application uses returned interfaces, passed to ActivateMe or returned by
729 * QueryInterface, so there is no reason to create new interface. This needs more testing.
730 */
731
732 if(pIPSite) {
733 hres = IOleDocumentView_SetInPlaceSite(&This->IOleDocumentView_iface, pIPSite);
734 if(FAILED(hres))
735 return hres;
736 }
737
738 if(pstm)
739 FIXME("pstm is not supported\n");
740
741 IOleDocumentView_AddRef(&This->IOleDocumentView_iface);
742 *ppView = &This->IOleDocumentView_iface;
743 return S_OK;
744}
745
747{
749 FIXME("(%p)->(%p)\n", This, pdwStatus);
750 return E_NOTIMPL;
751}
752
754 IOleDocumentView **ppView)
755{
757 FIXME("(%p)->(%p %p)\n", This, ppEnum, ppView);
758 return E_NOTIMPL;
759}
760
761static const IOleDocumentVtbl OleDocumentVtbl = {
768};
769
770/**********************************************************
771 * IOleControl implementation
772 */
773
775{
776 return CONTAINING_RECORD(iface, HTMLDocument, IOleControl_iface);
777}
778
780{
783}
784
786{
788 return htmldoc_addref(This);
789}
790
792{
794 return htmldoc_release(This);
795}
796
797static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI)
798{
800 FIXME("(%p)->(%p)\n", This, pCI);
801 return E_NOTIMPL;
802}
803
805{
807 FIXME("(%p)->(%p)\n", This, pMsg);
808 return E_NOTIMPL;
809}
810
812{
813 IDispatch *disp = NULL;
814 DISPPARAMS dispparams = {NULL, 0};
815 UINT err;
817
818 hres = IOleClientSite_QueryInterface(client, &IID_IDispatch, (void**)&disp);
819 if(FAILED(hres)) {
820 TRACE("Could not get IDispatch\n");
821 return hres;
822 }
823
825
826 hres = IDispatch_Invoke(disp, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
827 DISPATCH_PROPERTYGET, &dispparams, res, NULL, &err);
828
829 IDispatch_Release(disp);
830
831 return hres;
832}
833
835{
836 VARIANT res;
838
840 if(SUCCEEDED(hres))
841 FIXME("unsupported dlcontrol %08x\n", V_I4(&res));
842
843 return S_OK;
844}
845
847{
850 VARIANT res;
852
853 client = This->doc_obj->client;
854 if(!client) {
855 TRACE("client = NULL\n");
856 return S_OK;
857 }
858
859 switch(dispID) {
861 TRACE("(%p)->(DISPID_AMBIENT_USERMODE)\n", This);
863 if(FAILED(hres))
864 return S_OK;
865
866 if(V_VT(&res) == VT_BOOL) {
867 if(V_BOOL(&res)) {
868 This->doc_obj->usermode = BROWSEMODE;
869 }else {
870 FIXME("edit mode is not supported\n");
871 This->doc_obj->usermode = EDITMODE;
872 }
873 }else {
874 FIXME("usermode=%s\n", debugstr_variant(&res));
875 }
876 return S_OK;
878 TRACE("(%p)->(DISPID_AMBIENT_DLCONTROL)\n", This);
881 TRACE("(%p)->(DISPID_AMBIENT_OFFLINEIFNOTCONNECTED)\n", This);
884 if(FAILED(hres))
885 return S_OK;
886
887 if(V_VT(&res) == VT_BOOL) {
888 if(V_BOOL(&res)) {
889 FIXME("offline connection is not supported\n");
890 hres = E_FAIL;
891 }
892 }else {
893 FIXME("offlineconnected=%s\n", debugstr_variant(&res));
894 }
895 return S_OK;
897 TRACE("(%p)->(DISPID_AMBIENT_SILENT)\n", This);
900 if(FAILED(hres))
901 return S_OK;
902
903 if(V_VT(&res) == VT_BOOL) {
904 if(V_BOOL(&res)) {
905 FIXME("silent mode is not supported\n");
906 hres = E_FAIL;
907 }
908 }else {
909 FIXME("silent=%s\n", debugstr_variant(&res));
910 }
911 return S_OK;
913 TRACE("(%p)->(DISPID_AMBIENT_USERAGENT)\n", This);
915 if(FAILED(hres))
916 return S_OK;
917
918 FIXME("not supported AMBIENT_USERAGENT\n");
919 hres = E_FAIL;
920 return S_OK;
922 TRACE("(%p)->(DISPID_AMBIENT_PALETTE)\n", This);
924 if(FAILED(hres))
925 return S_OK;
926
927 FIXME("not supported AMBIENT_PALETTE\n");
928 hres = E_FAIL;
929 return S_OK;
930 }
931
932 FIXME("(%p) unsupported dispID=%d\n", This, dispID);
933 return E_FAIL;
934}
935
937{
939 FIXME("(%p)->(%x)\n", This, bFreeze);
940 return E_NOTIMPL;
941}
942
943static const IOleControlVtbl OleControlVtbl = {
951};
952
953/**********************************************************
954 * IObjectWithSite implementation
955 */
956
958{
959 return CONTAINING_RECORD(iface, HTMLDocument, IObjectWithSite_iface);
960}
961
963{
966}
967
969{
971 return htmldoc_addref(This);
972}
973
975{
977 return htmldoc_release(This);
978}
979
981{
983 FIXME("(%p)->(%p)\n", This, pUnkSite);
984 return E_NOTIMPL;
985}
986
988{
990 FIXME("(%p)->(%p)\n", This, ppvSite);
991 return E_NOTIMPL;
992}
993
994static const IObjectWithSiteVtbl ObjectWithSiteVtbl = {
1000};
1001
1002/**********************************************************
1003 * IOleContainer implementation
1004 */
1005
1007{
1008 return CONTAINING_RECORD(iface, HTMLDocument, IOleContainer_iface);
1009}
1010
1012{
1015}
1016
1018{
1020 return htmldoc_addref(This);
1021}
1022
1024{
1026 return htmldoc_release(This);
1027}
1028
1030 ULONG *pchEaten, IMoniker **ppmkOut)
1031{
1033 FIXME("(%p)->(%p %s %p %p)\n", This, pbc, debugstr_w(pszDisplayName), pchEaten, ppmkOut);
1034 return E_NOTIMPL;
1035}
1036
1038{
1041
1042 TRACE("(%p)->(%x %p)\n", This, grfFlags, ppenum);
1043
1044 ret = heap_alloc(sizeof(*ret));
1045 if(!ret)
1046 return E_OUTOFMEMORY;
1047
1048 ret->IEnumUnknown_iface.lpVtbl = &EnumUnknownVtbl;
1049 ret->ref = 1;
1050
1051 *ppenum = &ret->IEnumUnknown_iface;
1052 return S_OK;
1053}
1054
1056{
1058 FIXME("(%p)->(%x)\n", This, fLock);
1059 return E_NOTIMPL;
1060}
1061
1062static const IOleContainerVtbl OleContainerVtbl = {
1069};
1070
1072{
1073 return CONTAINING_RECORD(iface, HTMLDocumentObj, ITargetContainer_iface);
1074}
1075
1077{
1079 return ICustomDoc_QueryInterface(&This->ICustomDoc_iface, riid, ppv);
1080}
1081
1083{
1085 return ICustomDoc_AddRef(&This->ICustomDoc_iface);
1086}
1087
1089{
1091 return ICustomDoc_Release(&This->ICustomDoc_iface);
1092}
1093
1095{
1097 FIXME("(%p)->(%p)\n", This, ppszFrameSrc);
1098 return E_NOTIMPL;
1099}
1100
1102{
1104
1105 TRACE("(%p)->(%p)\n", This, ppContainer);
1106
1107 /* NOTE: we should return wrapped interface here */
1108 IOleContainer_AddRef(&This->basedoc.IOleContainer_iface);
1109 *ppContainer = &This->basedoc.IOleContainer_iface;
1110 return S_OK;
1111}
1112
1113static const ITargetContainerVtbl TargetContainerVtbl = {
1119};
1120
1122{
1123 This->ITargetContainer_iface.lpVtbl = &TargetContainerVtbl;
1124}
1125
1126/**********************************************************
1127 * IObjectSafety implementation
1128 */
1129
1131{
1132 return CONTAINING_RECORD(iface, HTMLDocument, IObjectSafety_iface);
1133}
1134
1136{
1139}
1140
1142{
1144 return htmldoc_addref(This);
1145}
1146
1148{
1150 return htmldoc_release(This);
1151}
1152
1154 REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions)
1155{
1157 FIXME("(%p)->(%s %p %p)\n", This, debugstr_guid(riid), pdwSupportedOptions, pdwEnabledOptions);
1158 return E_NOTIMPL;
1159}
1160
1162 REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions)
1163{
1165 FIXME("(%p)->(%s %x %x)\n", This, debugstr_guid(riid), dwOptionSetMask, dwEnabledOptions);
1166
1167 if(IsEqualGUID(&IID_IPersistMoniker, riid) &&
1168 dwOptionSetMask==INTERFACESAFE_FOR_UNTRUSTED_DATA &&
1169 dwEnabledOptions==INTERFACESAFE_FOR_UNTRUSTED_DATA)
1170 return S_OK;
1171
1172 return E_NOTIMPL;
1173}
1174
1175static const IObjectSafetyVtbl ObjectSafetyVtbl = {
1181};
1182
1184{
1186 HRESULT hres;
1187
1188 if(!This->client || This->container_locked == fLock)
1189 return;
1190
1191 hres = IOleClientSite_GetContainer(This->client, &container);
1192 if(SUCCEEDED(hres)) {
1193 IOleContainer_LockContainer(container, fLock);
1194 This->container_locked = fLock;
1195 IOleContainer_Release(container);
1196 }
1197}
1198
1200{
1201 This->IOleObject_iface.lpVtbl = &OleObjectVtbl;
1202 This->IOleDocument_iface.lpVtbl = &OleDocumentVtbl;
1203 This->IOleControl_iface.lpVtbl = &OleControlVtbl;
1204 This->IObjectWithSite_iface.lpVtbl = &ObjectWithSiteVtbl;
1205 This->IOleContainer_iface.lpVtbl = &OleContainerVtbl;
1206 This->IObjectSafety_iface.lpVtbl = &ObjectSafetyVtbl;
1207}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
const GUID IID_IUnknown
#define FIXME(fmt,...)
Definition: debug.h:111
#define WARN(fmt,...)
Definition: debug.h:112
#define ERR(fmt,...)
Definition: debug.h:110
#define RegCloseKey(hKey)
Definition: registry.h:49
static HWND hwndParent
Definition: cryptui.c:300
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1969
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3297
@ VT_NULL
Definition: compat.h:2296
@ VT_UNKNOWN
Definition: compat.h:2308
@ VT_I4
Definition: compat.h:2298
@ VT_BOOL
Definition: compat.h:2306
HRESULT do_query_service(IUnknown *unk, REFGUID guid_service, REFIID riid, void **ppv)
Definition: main.c:148
#define RRF_RT_REG_DWORD
Definition: driver.c:578
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
GLuint res
Definition: glext.h:9613
GLuint GLfloat * val
Definition: glext.h:7180
static const WCHAR zoomW[]
Definition: htmlstyle3.c:92
#define DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
Definition: idispids.h:25
#define DISPID_AMBIENT_SILENT
Definition: idispids.h:26
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
const char * var
Definition: shader.c:5666
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
HRESULT hres
Definition: protocol.c:465
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:52
#define DISPID_AMBIENT_DLCONTROL
Definition: mshtmdid.h:539
#define DISPID_AMBIENT_USERAGENT
Definition: mshtmdid.h:540
@ DOCHOSTUIFLAG_SCROLL_NO
Definition: mshtmhst.idl:119
static HRESULT WINAPI EnumUnknown_QueryInterface(IEnumUnknown *iface, REFIID riid, void **ppv)
Definition: oleobj.c:33
static ULONG WINAPI ObjectWithSite_Release(IObjectWithSite *iface)
Definition: oleobj.c:974
static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL bFreeze)
Definition: oleobj.c:936
static EnumUnknown * impl_from_IEnumUnknown(IEnumUnknown *iface)
Definition: oleobj.c:28
static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
Definition: oleobj.c:646
static HRESULT WINAPI EnumUnknown_Clone(IEnumUnknown *iface, IEnumUnknown **ppenum)
Definition: oleobj.c:102
static HRESULT WINAPI OleObject_IsUpToDate(IOleObject *iface)
Definition: oleobj.c:560
static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink, DWORD *pdwConnection)
Definition: oleobj.c:601
static HRESULT WINAPI EnumUnknown_Skip(IEnumUnknown *iface, ULONG celt)
Definition: oleobj.c:88
static HTMLDocument * impl_from_IObjectWithSite(IObjectWithSite *iface)
Definition: oleobj.c:957
static ULONG WINAPI TargetContainer_AddRef(ITargetContainer *iface)
Definition: oleobj.c:1082
static const ITargetContainerVtbl TargetContainerVtbl
Definition: oleobj.c:1113
static ULONG WINAPI ObjectWithSite_AddRef(IObjectWithSite *iface)
Definition: oleobj.c:968
void set_document_navigation(HTMLDocumentObj *doc, BOOL doc_can_navigate)
Definition: oleobj.c:193
static HTMLDocument * impl_from_IOleDocument(IOleDocument *iface)
Definition: oleobj.c:691
static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, MSG *pMsg)
Definition: oleobj.c:804
static const IObjectWithSiteVtbl ObjectWithSiteVtbl
Definition: oleobj.c:994
static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv)
Definition: oleobj.c:128
static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **ppenumAdvise)
Definition: oleobj.c:634
static const IOleContainerVtbl OleContainerVtbl
Definition: oleobj.c:1062
static ULONG WINAPI OleObject_AddRef(IOleObject *iface)
Definition: oleobj.c:134
static ULONG WINAPI ObjectSafety_AddRef(IObjectSafety *iface)
Definition: oleobj.c:1141
void TargetContainer_Init(HTMLDocumentObj *This)
Definition: oleobj.c:1121
static HRESULT WINAPI OleDocument_EnumViews(IOleDocument *iface, IEnumOleDocumentViews **ppEnum, IOleDocumentView **ppView)
Definition: oleobj.c:753
static HRESULT WINAPI OleDocument_QueryInterface(IOleDocument *iface, REFIID riid, void **ppv)
Definition: oleobj.c:696
static ULONG WINAPI OleDocument_Release(IOleDocument *iface)
Definition: oleobj.c:708
static HRESULT WINAPI ObjectSafety_QueryInterface(IObjectSafety *iface, REFIID riid, void **ppv)
Definition: oleobj.c:1135
static ULONG WINAPI OleDocument_AddRef(IOleDocument *iface)
Definition: oleobj.c:702
static HRESULT WINAPI EnumUnknown_Reset(IEnumUnknown *iface)
Definition: oleobj.c:95
static HTMLDocument * impl_from_IOleObject(IOleObject *iface)
Definition: oleobj.c:123
static HRESULT WINAPI ObjectWithSite_GetSite(IObjectWithSite *iface, REFIID riid, PVOID *ppvSite)
Definition: oleobj.c:987
static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
Definition: oleobj.c:485
static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD dwReserved, IDataObject **ppDataObject)
Definition: oleobj.c:500
static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
Definition: oleobj.c:594
static ULONG WINAPI OleContainer_Release(IOleContainer *iface)
Definition: oleobj.c:1023
static HRESULT WINAPI OleDocument_GetDocMiscStatus(IOleDocument *iface, DWORD *pdwStatus)
Definition: oleobj.c:746
static HTMLDocument * impl_from_IObjectSafety(IObjectSafety *iface)
Definition: oleobj.c:1130
static const IEnumUnknownVtbl EnumUnknownVtbl
Definition: oleobj.c:109
#define DOCHOST_DOCCANNAVIGATE
Definition: oleobj.c:21
static const IObjectSafetyVtbl ObjectSafetyVtbl
Definition: oleobj.c:1175
static HTMLDocument * impl_from_IOleContainer(IOleContainer *iface)
Definition: oleobj.c:1006
static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType, LPOLESTR *pszUserType)
Definition: oleobj.c:580
static HTMLDocumentObj * impl_from_ITargetContainer(ITargetContainer *iface)
Definition: oleobj.c:1071
static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID)
Definition: oleobj.c:846
static HRESULT WINAPI ObjectWithSite_QueryInterface(IObjectWithSite *iface, REFIID riid, void **ppv)
Definition: oleobj.c:962
static HTMLDocument * impl_from_IOleControl(IOleControl *iface)
Definition: oleobj.c:774
static ULONG WINAPI OleObject_Release(IOleObject *iface)
Definition: oleobj.c:140
static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp, LPCOLESTR szContainerObj)
Definition: oleobj.c:451
static void update_hostinfo(HTMLDocumentObj *This, DOCHOSTUIINFO *hostinfo)
Definition: oleobj.c:146
static ULONG WINAPI ObjectSafety_Release(IObjectSafety *iface)
Definition: oleobj.c:1147
static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID riid, void **ppv)
Definition: oleobj.c:779
static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID *pClsid)
Definition: oleobj.c:567
static ULONG WINAPI EnumUnknown_Release(IEnumUnknown *iface)
Definition: oleobj.c:63
static const IOleDocumentVtbl OleDocumentVtbl
Definition: oleobj.c:761
static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
Definition: oleobj.c:507
void HTMLDocument_LockContainer(HTMLDocumentObj *This, BOOL fLock)
Definition: oleobj.c:1183
static ULONG WINAPI OleControl_Release(IOleControl *iface)
Definition: oleobj.c:791
static ULONG WINAPI EnumUnknown_AddRef(IEnumUnknown *iface)
Definition: oleobj.c:53
HRESULT get_client_disp_property(IOleClientSite *client, DISPID dispid, VARIANT *res)
Definition: oleobj.c:811
static ULONG WINAPI TargetContainer_Release(ITargetContainer *iface)
Definition: oleobj.c:1088
static void load_settings(HTMLDocumentObj *doc)
Definition: oleobj.c:209
static HRESULT WINAPI OleContainer_EnumObjects(IOleContainer *iface, DWORD grfFlags, IEnumUnknown **ppenum)
Definition: oleobj.c:1037
static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite *pClientSite)
Definition: oleobj.c:233
static HRESULT WINAPI OleContainer_ParseDisplayName(IOleContainer *iface, IBindCtx *pbc, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
Definition: oleobj.c:1029
static const IOleObjectVtbl OleObjectVtbl
Definition: oleobj.c:660
static HRESULT WINAPI OleContainer_LockContainer(IOleContainer *iface, BOOL fLock)
Definition: oleobj.c:1055
static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker *pmk)
Definition: oleobj.c:478
void HTMLDocument_OleObj_Init(HTMLDocument *This)
Definition: oleobj.c:1199
static HRESULT WINAPI OleContainer_QueryInterface(IOleContainer *iface, REFIID riid, void **ppv)
Definition: oleobj.c:1011
static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *pUnkSite)
Definition: oleobj.c:980
static ULONG WINAPI OleContainer_AddRef(IOleContainer *iface)
Definition: oleobj.c:1017
static HRESULT WINAPI OleDocument_CreateView(IOleDocument *iface, IOleInPlaceSite *pIPSite, IStream *pstm, DWORD dwReserved, IOleDocumentView **ppView)
Definition: oleobj.c:714
static HRESULT WINAPI OleObject_EnumVerbs(IOleObject *iface, IEnumOLEVERB **ppEnumOleVerb)
Definition: oleobj.c:546
static HRESULT WINAPI OleObject_Update(IOleObject *iface)
Definition: oleobj.c:553
void call_docview_84(HTMLDocumentObj *doc)
Definition: oleobj.c:173
static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
Definition: oleobj.c:785
static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
Definition: oleobj.c:587
static HRESULT WINAPI ObjectSafety_GetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions)
Definition: oleobj.c:1153
static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE *pLogpal)
Definition: oleobj.c:653
static HRESULT on_change_dlcontrol(HTMLDocument *This)
Definition: oleobj.c:834
static HRESULT WINAPI OleObject_Unadvise(IOleObject *iface, DWORD dwConnection)
Definition: oleobj.c:623
static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
Definition: oleobj.c:458
static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, IOleClientSite **ppClientSite)
Definition: oleobj.c:435
static HRESULT WINAPI TargetContainer_QueryInterface(ITargetContainer *iface, REFIID riid, void **ppv)
Definition: oleobj.c:1076
static const IOleControlVtbl OleControlVtbl
Definition: oleobj.c:943
static HRESULT WINAPI EnumUnknown_Next(IEnumUnknown *iface, ULONG celt, IUnknown **rgelt, ULONG *pceltFetched)
Definition: oleobj.c:76
static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, IDataObject *pDataObject, BOOL fCreation, DWORD dwReserved)
Definition: oleobj.c:492
static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI)
Definition: oleobj.c:797
static HRESULT WINAPI ObjectSafety_SetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions)
Definition: oleobj.c:1161
static HRESULT WINAPI TargetContainer_GetFrameUrl(ITargetContainer *iface, LPWSTR *ppszFrameSrc)
Definition: oleobj.c:1094
static HRESULT WINAPI TargetContainer_GetFramesContainer(ITargetContainer *iface, IOleContainer **ppContainer)
Definition: oleobj.c:1101
static HRESULT htmldoc_query_interface(HTMLDocument *This, REFIID riid, void **ppv)
static ULONG htmldoc_addref(HTMLDocument *This)
@ BROWSEMODE
@ EDITMODE
@ UNKNOWN_USERMODE
static ULONG htmldoc_release(HTMLDocument *This)
#define NS_SUCCEEDED(res)
void set_viewer_zoom(NSContainer *, float) DECLSPEC_HIDDEN
Definition: nsembed.c:1130
#define NS_FAILED(res)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
unsigned int UINT
Definition: ndis.h:50
#define LOCALE_SYSTEM_DEFAULT
#define OLEIVERB_UIACTIVATE
Definition: ole2.h:42
#define OLEIVERB_INPLACEACTIVATE
Definition: ole2.h:43
#define OLEIVERB_SHOW
Definition: ole2.h:39
HRESULT WINAPI CreateOleAdviseHolder(IOleAdviseHolder **ppOAHolder)
Definition: oleobj.c:875
#define V_BOOL(A)
Definition: oleauto.h:224
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define V_VT(A)
Definition: oleauto.h:211
#define V_I4(A)
Definition: oleauto.h:247
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
#define DISPID_AMBIENT_USERMODE
Definition: olectl.h:405
#define DISPID_AMBIENT_PALETTE
Definition: olectl.h:415
const GUID IID_IOleWindow
const GUID IID_IDispatch
const GUID IID_IEnumUnknown
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define IID_NULL
Definition: guiddef.h:98
#define err(...)
#define memset(x, y, z)
Definition: compat.h:39
static FILE * client
Definition: client.c:41
#define TRACE(s)
Definition: solgame.cpp:4
& rect
Definition: startmenu.cpp:1413
IEnumUnknown IEnumUnknown_iface
Definition: oleobj.c:24
LONG ref
Definition: oleobj.c:25
NSContainer * nscontainer
IOleClientSite * client
HTMLDocument basedoc
IOleCommandTarget * client_cmdtrg
HTMLOuterWindow * window
IHTMLWindow2 IHTMLWindow2_iface
Definition: ftp_var.h:139
Definition: send.c:48
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
int ret
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define OLE_E_NOCONNECTION
Definition: winerror.h:2618
#define E_NOINTERFACE
Definition: winerror.h:2364
#define HKEY_CURRENT_USER
Definition: winreg.h:11
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184