2 * Copyright 2005-2006 Jacek Caban for CodeWeavers
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 "wine/debug.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
28 DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0);
30 #define DOCHOST_DOCCANNAVIGATE 0
32 static ATOM doc_view_atom = 0;
34 void push_dochost_task(DocHost *This, task_header_t *task, task_proc_t proc, BOOL send)
38 /* FIXME: Don't use lParam */
40 SendMessageW(This->frame_hwnd, WM_DOCHOSTTASK, 0, (LPARAM)task);
42 PostMessageW(This->frame_hwnd, WM_DOCHOSTTASK, 0, (LPARAM)task);
45 LRESULT process_dochost_task(DocHost *This, LPARAM lparam)
47 task_header_t *task = (task_header_t*)lparam;
49 task->proc(This, task);
55 static void notif_complete(DocHost *This, DISPID dispid)
57 DISPPARAMS dispparams;
62 dispparams.cNamedArgs = 0;
63 dispparams.rgdispidNamedArgs = NULL;
64 dispparams.rgvarg = params;
66 V_VT(params) = (VT_BYREF|VT_VARIANT);
67 V_BYREF(params) = &url;
69 V_VT(params+1) = VT_DISPATCH;
70 V_DISPATCH(params+1) = This->disp;
73 V_BSTR(&url) = SysAllocString(This->url);
75 TRACE("%d >>>\n", dispid);
76 call_sink(This->cps.wbe2, dispid, &dispparams);
77 TRACE("%d <<<\n", dispid);
79 SysFreeString(V_BSTR(&url));
80 This->busy = VARIANT_FALSE;
83 static void object_available(DocHost *This)
88 TRACE("(%p)\n", This);
91 WARN("document == NULL\n");
95 hres = IUnknown_QueryInterface(This->document, &IID_IHlinkTarget, (void**)&hlink);
97 FIXME("Could not get IHlinkTarget interface\n");
101 hres = IHlinkTarget_Navigate(hlink, 0, NULL);
102 IHlinkTarget_Release(hlink);
104 FIXME("Navigate failed\n");
107 static HRESULT get_doc_ready_state(DocHost *This, READYSTATE *ret)
109 DISPPARAMS dp = {NULL,NULL,0,0};
115 hres = IUnknown_QueryInterface(This->document, &IID_IDispatch, (void**)&disp);
119 hres = IDispatch_Invoke(disp, DISPID_READYSTATE, &IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_PROPERTYGET,
120 &dp, &var, &ei, NULL);
121 IDispatch_Release(disp);
123 WARN("Invoke(DISPID_READYSTATE failed: %08x\n", hres);
127 if(V_VT(&var) != VT_I4) {
128 WARN("V_VT(var) = %d\n", V_VT(&var));
137 static void advise_prop_notif(DocHost *This, BOOL set)
139 IConnectionPointContainer *cp_container;
140 IConnectionPoint *cp;
143 hres = IUnknown_QueryInterface(This->document, &IID_IConnectionPointContainer, (void**)&cp_container);
147 hres = IConnectionPointContainer_FindConnectionPoint(cp_container, &IID_IPropertyNotifySink, &cp);
148 IConnectionPointContainer_Release(cp_container);
153 hres = IConnectionPoint_Advise(cp, (IUnknown*)PROPNOTIF(This), &This->prop_notif_cookie);
155 hres = IConnectionPoint_Unadvise(cp, This->prop_notif_cookie);
156 IConnectionPoint_Release(cp);
159 This->is_prop_notif = set;
162 void set_doc_state(DocHost *This, READYSTATE doc_state)
164 This->doc_state = doc_state;
165 if(doc_state > This->ready_state)
166 This->ready_state = doc_state;
169 static void update_ready_state(DocHost *This, READYSTATE ready_state)
171 if(ready_state > READYSTATE_LOADING && This->doc_state <= READYSTATE_LOADING)
172 notif_complete(This, DISPID_NAVIGATECOMPLETE2);
174 if(ready_state == READYSTATE_COMPLETE && This->doc_state < READYSTATE_COMPLETE) {
175 set_doc_state(This, READYSTATE_COMPLETE);
176 notif_complete(This, DISPID_DOCUMENTCOMPLETE);
178 set_doc_state(This, ready_state);
183 task_header_t header;
185 READYSTATE ready_state;
186 } ready_state_task_t;
188 static void ready_state_proc(DocHost *This, task_header_t *_task)
190 ready_state_task_t *task = (ready_state_task_t*)_task;
192 if(task->doc == This->document)
193 update_ready_state(This, task->ready_state);
195 IUnknown_Release(task->doc);
198 static void push_ready_state_task(DocHost *This, READYSTATE ready_state)
200 ready_state_task_t *task = heap_alloc(sizeof(ready_state_task_t));
202 IUnknown_AddRef(This->document);
203 task->doc = This->document;
204 task->ready_state = ready_state;
206 push_dochost_task(This, &task->header, ready_state_proc, FALSE);
209 static void object_available_proc(DocHost *This, task_header_t *task)
211 object_available(This);
214 HRESULT dochost_object_available(DocHost *This, IUnknown *doc)
216 READYSTATE ready_state;
221 IUnknown_AddRef(doc);
222 This->document = doc;
224 hres = IUnknown_QueryInterface(doc, &IID_IOleObject, (void**)&oleobj);
225 if(SUCCEEDED(hres)) {
228 hres = IOleObject_GetUserClassID(oleobj, &clsid);
230 TRACE("Got clsid %s\n",
231 IsEqualGUID(&clsid, &CLSID_HTMLDocument) ? "CLSID_HTMLDocument" : debugstr_guid(&clsid));
233 hres = IOleObject_SetClientSite(oleobj, CLIENTSITE(This));
235 FIXME("SetClientSite failed: %08x\n", hres);
237 IOleObject_Release(oleobj);
239 FIXME("Could not get IOleObject iface: %08x\n", hres);
242 /* FIXME: Call SetAdvise */
244 task = heap_alloc(sizeof(*task));
245 push_dochost_task(This, task, object_available_proc, FALSE);
247 hres = get_doc_ready_state(This, &ready_state);
248 if(SUCCEEDED(hres)) {
249 if(ready_state == READYSTATE_COMPLETE)
250 push_ready_state_task(This, READYSTATE_COMPLETE);
251 if(ready_state != READYSTATE_COMPLETE || This->doc_navigate)
252 advise_prop_notif(This, TRUE);
258 static LRESULT resize_document(DocHost *This, LONG width, LONG height)
260 RECT rect = {0, 0, width, height};
262 TRACE("(%p)->(%d %d)\n", This, width, height);
265 IOleDocumentView_SetRect(This->view, &rect);
270 static LRESULT WINAPI doc_view_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
274 static const WCHAR wszTHIS[] = {'T','H','I','S',0};
276 if(msg == WM_CREATE) {
277 This = *(DocHost**)lParam;
278 SetPropW(hwnd, wszTHIS, This);
280 This = GetPropW(hwnd, wszTHIS);
285 return resize_document(This, LOWORD(lParam), HIWORD(lParam));
288 return DefWindowProcW(hwnd, msg, wParam, lParam);
291 void create_doc_view_hwnd(DocHost *This)
295 static const WCHAR wszShell_DocObject_View[] =
296 {'S','h','e','l','l',' ','D','o','c','O','b','j','e','c','t',' ','V','i','e','w',0};
299 static WNDCLASSEXW wndclass = {
303 0, 0 /* native uses 4*/, NULL, NULL, NULL,
304 (HBRUSH)(COLOR_WINDOW + 1), NULL,
305 wszShell_DocObject_View,
309 wndclass.hInstance = shdocvw_hinstance;
311 doc_view_atom = RegisterClassExW(&wndclass);
314 GetClientRect(This->frame_hwnd, &rect);
315 adjust_ie_docobj_rect(This->frame_hwnd, &rect);
316 This->hwnd = CreateWindowExW(0, wszShell_DocObject_View,
317 wszShell_DocObject_View,
318 WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP,
319 rect.left, rect.top, rect.right, rect.bottom, This->frame_hwnd,
320 NULL, shdocvw_hinstance, This);
323 void deactivate_document(DocHost *This)
325 IOleInPlaceObjectWindowless *winobj;
326 IOleObject *oleobj = NULL;
327 IHlinkTarget *hlink = NULL;
330 if(This->doc_navigate) {
331 IUnknown_Release(This->doc_navigate);
332 This->doc_navigate = NULL;
335 if(This->is_prop_notif)
336 advise_prop_notif(This, FALSE);
339 IOleDocumentView_UIActivate(This->view, FALSE);
341 hres = IUnknown_QueryInterface(This->document, &IID_IOleInPlaceObjectWindowless,
343 if(SUCCEEDED(hres)) {
344 IOleInPlaceObjectWindowless_InPlaceDeactivate(winobj);
345 IOleInPlaceObjectWindowless_Release(winobj);
349 IOleDocumentView_Show(This->view, FALSE);
350 IOleDocumentView_CloseView(This->view, 0);
351 IOleDocumentView_SetInPlaceSite(This->view, NULL);
352 IOleDocumentView_Release(This->view);
356 hres = IUnknown_QueryInterface(This->document, &IID_IOleObject, (void**)&oleobj);
358 IOleObject_Close(oleobj, OLECLOSE_NOSAVE);
360 hres = IUnknown_QueryInterface(This->document, &IID_IHlinkTarget, (void**)&hlink);
361 if(SUCCEEDED(hres)) {
362 IHlinkTarget_SetBrowseContext(hlink, NULL);
363 IHlinkTarget_Release(hlink);
367 IOleClientSite *client_site = NULL;
369 IOleObject_GetClientSite(oleobj, &client_site);
371 if(client_site == CLIENTSITE(This))
372 IOleObject_SetClientSite(oleobj, NULL);
373 IOleClientSite_Release(client_site);
376 IOleObject_Release(oleobj);
379 IUnknown_Release(This->document);
380 This->document = NULL;
383 void release_dochost_client(DocHost *This)
386 DestroyWindow(This->hwnd);
391 IDocHostUIHandler_Release(This->hostui);
395 if(This->client_disp) {
396 IDispatch_Release(This->client_disp);
397 This->client_disp = NULL;
401 IOleInPlaceFrame_Release(This->frame);
406 #define OLECMD_THIS(iface) DEFINE_THIS(DocHost, OleCommandTarget, iface)
408 static HRESULT WINAPI ClOleCommandTarget_QueryInterface(IOleCommandTarget *iface,
409 REFIID riid, void **ppv)
411 DocHost *This = OLECMD_THIS(iface);
412 return IOleClientSite_QueryInterface(CLIENTSITE(This), riid, ppv);
415 static ULONG WINAPI ClOleCommandTarget_AddRef(IOleCommandTarget *iface)
417 DocHost *This = OLECMD_THIS(iface);
418 return IOleClientSite_AddRef(CLIENTSITE(This));
421 static ULONG WINAPI ClOleCommandTarget_Release(IOleCommandTarget *iface)
423 DocHost *This = OLECMD_THIS(iface);
424 return IOleClientSite_Release(CLIENTSITE(This));
427 static HRESULT WINAPI ClOleCommandTarget_QueryStatus(IOleCommandTarget *iface,
428 const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
430 DocHost *This = OLECMD_THIS(iface);
432 FIXME("(%p)->(%s %u %p %p)\n", This, debugstr_guid(pguidCmdGroup), cCmds, prgCmds,
434 while (prgCmds && (cCmds > i)) {
435 FIXME("command_%u: %u, 0x%x\n", i, prgCmds[i].cmdID, prgCmds[i].cmdf);
441 static HRESULT WINAPI ClOleCommandTarget_Exec(IOleCommandTarget *iface,
442 const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn,
445 DocHost *This = OLECMD_THIS(iface);
447 TRACE("(%p)->(%s %d %d %p %p)\n", This, debugstr_guid(pguidCmdGroup), nCmdID,
448 nCmdexecopt, debugstr_variant(pvaIn), debugstr_variant(pvaOut));
451 FIXME("Unimplemented cmdid %d\n", nCmdID);
455 if(IsEqualGUID(pguidCmdGroup, &CGID_DocHostCmdPriv)) {
457 case DOCHOST_DOCCANNAVIGATE:
458 if(!pvaIn || V_VT(pvaIn) != VT_UNKNOWN)
461 if(This->doc_navigate)
462 IUnknown_Release(This->doc_navigate);
463 IUnknown_AddRef(V_UNKNOWN(pvaIn));
464 This->doc_navigate = V_UNKNOWN(pvaIn);
468 FIXME("unsupported command %d of CGID_DocHostCmdPriv\n", nCmdID);
473 FIXME("Unimplemented group %s\n", debugstr_guid(pguidCmdGroup));
479 static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
480 ClOleCommandTarget_QueryInterface,
481 ClOleCommandTarget_AddRef,
482 ClOleCommandTarget_Release,
483 ClOleCommandTarget_QueryStatus,
484 ClOleCommandTarget_Exec
487 #define DOCHOSTUI_THIS(iface) DEFINE_THIS(DocHost, DocHostUIHandler, iface)
489 static HRESULT WINAPI DocHostUIHandler_QueryInterface(IDocHostUIHandler2 *iface,
490 REFIID riid, void **ppv)
492 DocHost *This = DOCHOSTUI_THIS(iface);
493 return IOleClientSite_QueryInterface(CLIENTSITE(This), riid, ppv);
496 static ULONG WINAPI DocHostUIHandler_AddRef(IDocHostUIHandler2 *iface)
498 DocHost *This = DOCHOSTUI_THIS(iface);
499 return IOleClientSite_AddRef(CLIENTSITE(This));
502 static ULONG WINAPI DocHostUIHandler_Release(IDocHostUIHandler2 *iface)
504 DocHost *This = DOCHOSTUI_THIS(iface);
505 return IOleClientSite_Release(CLIENTSITE(This));
508 static HRESULT WINAPI DocHostUIHandler_ShowContextMenu(IDocHostUIHandler2 *iface,
509 DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved)
511 DocHost *This = DOCHOSTUI_THIS(iface);
514 TRACE("(%p)->(%d %p %p %p)\n", This, dwID, ppt, pcmdtReserved, pdispReserved);
517 hres = IDocHostUIHandler_ShowContextMenu(This->hostui, dwID, ppt, pcmdtReserved,
523 FIXME("default action not implemented\n");
527 static HRESULT WINAPI DocHostUIHandler_GetHostInfo(IDocHostUIHandler2 *iface,
528 DOCHOSTUIINFO *pInfo)
530 DocHost *This = DOCHOSTUI_THIS(iface);
533 TRACE("(%p)->(%p)\n", This, pInfo);
536 hres = IDocHostUIHandler_GetHostInfo(This->hostui, pInfo);
541 pInfo->dwFlags = DOCHOSTUIFLAG_DISABLE_HELP_MENU | DOCHOSTUIFLAG_OPENNEWWIN
542 | DOCHOSTUIFLAG_URL_ENCODING_ENABLE_UTF8 | DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION
543 | DOCHOSTUIFLAG_IME_ENABLE_RECONVERSION;
547 static HRESULT WINAPI DocHostUIHandler_ShowUI(IDocHostUIHandler2 *iface, DWORD dwID,
548 IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget,
549 IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc)
551 DocHost *This = DOCHOSTUI_THIS(iface);
552 FIXME("(%p)->(%d %p %p %p %p)\n", This, dwID, pActiveObject, pCommandTarget,
557 static HRESULT WINAPI DocHostUIHandler_HideUI(IDocHostUIHandler2 *iface)
559 DocHost *This = DOCHOSTUI_THIS(iface);
560 FIXME("(%p)\n", This);
564 static HRESULT WINAPI DocHostUIHandler_UpdateUI(IDocHostUIHandler2 *iface)
566 DocHost *This = DOCHOSTUI_THIS(iface);
568 TRACE("(%p)\n", This);
573 return IDocHostUIHandler_UpdateUI(This->hostui);
576 static HRESULT WINAPI DocHostUIHandler_EnableModeless(IDocHostUIHandler2 *iface,
579 DocHost *This = DOCHOSTUI_THIS(iface);
580 FIXME("(%p)->(%x)\n", This, fEnable);
584 static HRESULT WINAPI DocHostUIHandler_OnDocWindowActivate(IDocHostUIHandler2 *iface,
587 DocHost *This = DOCHOSTUI_THIS(iface);
588 FIXME("(%p)->(%x)\n", This, fActivate);
592 static HRESULT WINAPI DocHostUIHandler_OnFrameWindowActivate(IDocHostUIHandler2 *iface,
595 DocHost *This = DOCHOSTUI_THIS(iface);
596 FIXME("(%p)->(%x)\n", This, fActivate);
600 static HRESULT WINAPI DocHostUIHandler_ResizeBorder(IDocHostUIHandler2 *iface,
601 LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow)
603 DocHost *This = DOCHOSTUI_THIS(iface);
604 FIXME("(%p)->(%p %p %X)\n", This, prcBorder, pUIWindow, fRameWindow);
608 static HRESULT WINAPI DocHostUIHandler_TranslateAccelerator(IDocHostUIHandler2 *iface,
609 LPMSG lpMsg, const GUID *pguidCmdGroup, DWORD nCmdID)
611 DocHost *This = DOCHOSTUI_THIS(iface);
612 FIXME("(%p)->(%p %p %d)\n", This, lpMsg, pguidCmdGroup, nCmdID);
616 static HRESULT WINAPI DocHostUIHandler_GetOptionKeyPath(IDocHostUIHandler2 *iface,
617 LPOLESTR *pchKey, DWORD dw)
619 DocHost *This = DOCHOSTUI_THIS(iface);
621 TRACE("(%p)->(%p %d)\n", This, pchKey, dw);
624 return IDocHostUIHandler_GetOptionKeyPath(This->hostui, pchKey, dw);
629 static HRESULT WINAPI DocHostUIHandler_GetDropTarget(IDocHostUIHandler2 *iface,
630 IDropTarget *pDropTarget, IDropTarget **ppDropTarget)
632 DocHost *This = DOCHOSTUI_THIS(iface);
633 FIXME("(%p)\n", This);
637 static HRESULT WINAPI DocHostUIHandler_GetExternal(IDocHostUIHandler2 *iface,
638 IDispatch **ppDispatch)
640 DocHost *This = DOCHOSTUI_THIS(iface);
642 TRACE("(%p)->(%p)\n", This, ppDispatch);
645 return IDocHostUIHandler_GetExternal(This->hostui, ppDispatch);
647 FIXME("default action not implemented\n");
651 static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface,
652 DWORD dwTranslate, OLECHAR *pchURLIn, OLECHAR **ppchURLOut)
654 DocHost *This = DOCHOSTUI_THIS(iface);
656 TRACE("(%p)->(%d %s %p)\n", This, dwTranslate, debugstr_w(pchURLIn), ppchURLOut);
659 return IDocHostUIHandler_TranslateUrl(This->hostui, dwTranslate,
660 pchURLIn, ppchURLOut);
665 static HRESULT WINAPI DocHostUIHandler_FilterDataObject(IDocHostUIHandler2 *iface,
666 IDataObject *pDO, IDataObject **ppDORet)
668 DocHost *This = DOCHOSTUI_THIS(iface);
669 FIXME("(%p)->(%p %p)\n", This, pDO, ppDORet);
673 static HRESULT WINAPI DocHostUIHandler_GetOverrideKeyPath(IDocHostUIHandler2 *iface,
674 LPOLESTR *pchKey, DWORD dw)
676 DocHost *This = DOCHOSTUI_THIS(iface);
677 IDocHostUIHandler2 *handler;
680 TRACE("(%p)->(%p %d)\n", This, pchKey, dw);
685 hres = IDocHostUIHandler_QueryInterface(This->hostui, &IID_IDocHostUIHandler2,
687 if(SUCCEEDED(hres)) {
688 hres = IDocHostUIHandler2_GetOverrideKeyPath(handler, pchKey, dw);
689 IDocHostUIHandler2_Release(handler);
696 #undef DOCHOSTUI_THIS
698 static const IDocHostUIHandler2Vtbl DocHostUIHandler2Vtbl = {
699 DocHostUIHandler_QueryInterface,
700 DocHostUIHandler_AddRef,
701 DocHostUIHandler_Release,
702 DocHostUIHandler_ShowContextMenu,
703 DocHostUIHandler_GetHostInfo,
704 DocHostUIHandler_ShowUI,
705 DocHostUIHandler_HideUI,
706 DocHostUIHandler_UpdateUI,
707 DocHostUIHandler_EnableModeless,
708 DocHostUIHandler_OnDocWindowActivate,
709 DocHostUIHandler_OnFrameWindowActivate,
710 DocHostUIHandler_ResizeBorder,
711 DocHostUIHandler_TranslateAccelerator,
712 DocHostUIHandler_GetOptionKeyPath,
713 DocHostUIHandler_GetDropTarget,
714 DocHostUIHandler_GetExternal,
715 DocHostUIHandler_TranslateUrl,
716 DocHostUIHandler_FilterDataObject,
717 DocHostUIHandler_GetOverrideKeyPath
720 #define PROPNOTIF_THIS(iface) DEFINE_THIS(DocHost, IPropertyNotifySink, iface)
722 static HRESULT WINAPI PropertyNotifySink_QueryInterface(IPropertyNotifySink *iface,
723 REFIID riid, void **ppv)
725 DocHost *This = PROPNOTIF_THIS(iface);
726 return IOleClientSite_QueryInterface(CLIENTSITE(This), riid, ppv);
729 static ULONG WINAPI PropertyNotifySink_AddRef(IPropertyNotifySink *iface)
731 DocHost *This = PROPNOTIF_THIS(iface);
732 return IOleClientSite_AddRef(CLIENTSITE(This));
735 static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface)
737 DocHost *This = PROPNOTIF_THIS(iface);
738 return IOleClientSite_Release(CLIENTSITE(This));
741 static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, DISPID dispID)
743 DocHost *This = PROPNOTIF_THIS(iface);
745 TRACE("(%p)->(%d)\n", This, dispID);
748 case DISPID_READYSTATE: {
749 READYSTATE ready_state;
752 hres = get_doc_ready_state(This, &ready_state);
756 if(ready_state == READYSTATE_COMPLETE && !This->doc_navigate)
757 advise_prop_notif(This, FALSE);
759 push_ready_state_task(This, ready_state);
763 FIXME("unimplemented dispid %d\n", dispID);
770 static HRESULT WINAPI PropertyNotifySink_OnRequestEdit(IPropertyNotifySink *iface, DISPID dispID)
772 DocHost *This = PROPNOTIF_THIS(iface);
773 FIXME("(%p)->(%d)\n", This, dispID);
777 #undef PROPNOTIF_THIS
779 static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = {
780 PropertyNotifySink_QueryInterface,
781 PropertyNotifySink_AddRef,
782 PropertyNotifySink_Release,
783 PropertyNotifySink_OnChanged,
784 PropertyNotifySink_OnRequestEdit
787 void DocHost_Init(DocHost *This, IDispatch *disp)
789 This->lpDocHostUIHandlerVtbl = &DocHostUIHandler2Vtbl;
790 This->lpOleCommandTargetVtbl = &OleCommandTargetVtbl;
791 This->lpIPropertyNotifySinkVtbl = &PropertyNotifySinkVtbl;
795 This->client_disp = NULL;
797 This->document = NULL;
802 This->frame_hwnd = NULL;
805 This->silent = VARIANT_FALSE;
806 This->offline = VARIANT_FALSE;
808 This->ready_state = READYSTATE_UNINITIALIZED;
809 This->is_prop_notif = FALSE;
811 DocHost_ClientSite_Init(This);
812 DocHost_Frame_Init(This);
814 ConnectionPointContainer_Init(&This->cps, (IUnknown*)disp);
817 void DocHost_Release(DocHost *This)
819 release_dochost_client(This);
820 DocHost_ClientSite_Release(This);
822 ConnectionPointContainer_Destroy(&This->cps);
824 heap_free(This->url);