ReactOS  0.4.13-dev-100-gc8611ae
navigate.c
Go to the documentation of this file.
1 /*
2  * Copyright 2006-2007 Jacek Caban for CodeWeavers
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 #define NONAMELESSUNION
20 
21 #include "ieframe.h"
22 
23 #include "exdispid.h"
24 #include "shellapi.h"
25 #include "winreg.h"
26 #include "shlwapi.h"
27 #include "wininet.h"
28 #include "mshtml.h"
29 #include "perhist.h"
30 #include "resource.h"
31 
32 #include "wine/debug.h"
33 
35 
36 static const WCHAR emptyW[] = {0};
37 
38 typedef struct {
42 
44 
47 
53 
54 static void dump_BINDINFO(BINDINFO *bi)
55 {
56  static const char * const BINDINFOF_str[] = {
57  "#0",
58  "BINDINFOF_URLENCODESTGMEDDATA",
59  "BINDINFOF_URLENCODEDEXTRAINFO"
60  };
61 
62  static const char * const BINDVERB_str[] = {
63  "BINDVERB_GET",
64  "BINDVERB_POST",
65  "BINDVERB_PUT",
66  "BINDVERB_CUSTOM"
67  };
68 
69  TRACE("\n"
70  "BINDINFO = {\n"
71  " %d, %s,\n"
72  " {%d, %p, %p},\n"
73  " %s,\n"
74  " %s,\n"
75  " %s,\n"
76  " %d, %08x, %d, %d\n"
77  " {%d %p %x},\n"
78  " %s\n"
79  " %p, %d\n"
80  "}\n",
81 
82  bi->cbSize, debugstr_w(bi->szExtraInfo),
83  bi->stgmedData.tymed, bi->stgmedData.u.hGlobal, bi->stgmedData.pUnkForRelease,
84  bi->grfBindInfoF > BINDINFOF_URLENCODEDEXTRAINFO
85  ? "unknown" : BINDINFOF_str[bi->grfBindInfoF],
86  bi->dwBindVerb > BINDVERB_CUSTOM
87  ? "unknown" : BINDVERB_str[bi->dwBindVerb],
88  debugstr_w(bi->szCustomVerb),
89  bi->cbstgmedData, bi->dwOptions, bi->dwOptionsFlags, bi->dwCodePage,
90  bi->securityAttributes.nLength,
91  bi->securityAttributes.lpSecurityDescriptor,
92  bi->securityAttributes.bInheritHandle,
93  debugstr_guid(&bi->iid),
94  bi->pUnk, bi->dwReserved
95  );
96 }
97 
99 {
100  VARIANTARG arg;
101  DISPPARAMS dispparams = {&arg, NULL, 1, 0};
104 
105  if(!This->doc_host)
106  return;
107 
108  TRACE("(%p, %d, %s)\n", This, statuscode, debugstr_w(str));
109  buffer[0] = 0;
110  if (statuscode && str && *str) {
111  fmt[0] = 0;
112  /* the format string must have one "%s" for the str */
115  }
116 
117  V_VT(&arg) = VT_BSTR;
119  TRACE("=> %s\n", debugstr_w(V_BSTR(&arg)));
120 
121  call_sink(This->doc_host->cps.wbe2, DISPID_STATUSTEXTCHANGE, &dispparams);
122 
123  if(This->doc_host->frame)
124  IOleInPlaceFrame_SetStatusText(This->doc_host->frame, buffer);
125 
126  VariantClear(&arg);
127 
128 }
129 
131 {
132  WCHAR *new_url;
133 
134  if(url) {
135  new_url = heap_strdupW(url);
136  if(!new_url)
137  return E_OUTOFMEMORY;
138  }else {
139  new_url = NULL;
140  }
141 
142  heap_free(This->url);
143  This->url = new_url;
144 
145  This->container_vtbl->set_url(This, This->url);
146  return S_OK;
147 }
148 
149 void notify_download_state(DocHost *dochost, BOOL is_downloading)
150 {
151  DISPPARAMS dwl_dp = {NULL};
152  TRACE("(%x)\n", is_downloading);
153  call_sink(dochost->cps.wbe2, is_downloading ? DISPID_DOWNLOADBEGIN : DISPID_DOWNLOADCOMPLETE, &dwl_dp);
154 }
155 
157 {
158  return CONTAINING_RECORD(iface, BindStatusCallback, IBindStatusCallback_iface);
159 }
160 
162  REFIID riid, void **ppv)
163 {
165 
166  if(IsEqualGUID(&IID_IUnknown, riid)) {
167  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
168  *ppv = &This->IBindStatusCallback_iface;
169  }else if(IsEqualGUID(&IID_IBindStatusCallback, riid)) {
170  TRACE("(%p)->(IID_IBindStatusCallback %p)\n", This, ppv);
171  *ppv = &This->IBindStatusCallback_iface;
172  }else if(IsEqualGUID(&IID_IHttpNegotiate, riid)) {
173  TRACE("(%p)->(IID_IHttpNegotiate %p)\n", This, ppv);
174  *ppv = &This->IHttpNegotiate_iface;
175  }else if(IsEqualGUID(&IID_IWindowForBindingUI, riid)) {
176  TRACE("(%p)->(IID_IWindowForBindingUI %p)\n", This, ppv);
177  *ppv = &This->IHttpSecurity_iface;
178  }else if(IsEqualGUID(&IID_IHttpSecurity, riid)) {
179  TRACE("(%p)->(IID_IHttpSecurity %p)\n", This, ppv);
180  *ppv = &This->IHttpSecurity_iface;
181  }else {
182  *ppv = NULL;
183  WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
184  return E_NOINTERFACE;
185  }
186 
187  IUnknown_AddRef((IUnknown*)*ppv);
188  return S_OK;
189 }
190 
192 {
195 
196  TRACE("(%p) ref=%d\n", This, ref);
197 
198  return ref;
199 }
200 
202 {
205 
206  TRACE("(%p) ref=%d\n", This, ref);
207 
208  if(!ref) {
209  if(This->doc_host)
210  IOleClientSite_Release(&This->doc_host->IOleClientSite_iface);
211  if(This->binding)
212  IBinding_Release(This->binding);
213  if(This->post_data)
214  GlobalFree(This->post_data);
215  SysFreeString(This->headers);
216  SysFreeString(This->url);
217  heap_free(This);
218  }
219 
220  return ref;
221 }
222 
224  DWORD dwReserved, IBinding *pbind)
225 {
227 
228  TRACE("(%p)->(%d %p)\n", This, dwReserved, pbind);
229 
230  This->binding = pbind;
231  IBinding_AddRef(This->binding);
232 
233  return S_OK;
234 }
235 
237  LONG *pnPriority)
238 {
240  FIXME("(%p)->(%p)\n", This, pnPriority);
241  return E_NOTIMPL;
242 }
243 
245  DWORD reserved)
246 {
248  FIXME("(%p)->(%d)\n", This, reserved);
249  return E_NOTIMPL;
250 }
251 
253 {
254  IWinInetHttpInfo *http_info;
255  DWORD status, size = sizeof(DWORD);
256  HRESULT hres;
257 
258  hres = IBinding_QueryInterface(binding, &IID_IWinInetHttpInfo, (void**)&http_info);
259  if(FAILED(hres))
260  return HTTP_STATUS_OK;
261 
262  hres = IWinInetHttpInfo_QueryInfo(http_info, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER,
263  &status, &size, NULL, NULL);
264  IWinInetHttpInfo_Release(http_info);
265 
266  if(FAILED(hres))
267  return HTTP_STATUS_OK;
268  return status;
269 }
270 
272  ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
273 {
276 
277  TRACE("(%p)->(%d %d %d %s)\n", This, ulProgress, ulProgressMax, ulStatusCode,
278  debugstr_w(szStatusText));
279 
280  switch(ulStatusCode) {
281  case BINDSTATUS_REDIRECTING:
282  return set_dochost_url(This->doc_host, szStatusText);
283  case BINDSTATUS_BEGINDOWNLOADDATA:
284  set_status_text(This, ulStatusCode, szStatusText);
287  handle_navigation_error(This->doc_host, status_code, This->url, NULL);
288  return S_OK;
289 
290  case BINDSTATUS_FINDINGRESOURCE:
291  case BINDSTATUS_ENDDOWNLOADDATA:
292  case BINDSTATUS_SENDINGREQUEST:
293  set_status_text(This, ulStatusCode, szStatusText);
294  return S_OK;
295 
296  case BINDSTATUS_CONNECTING:
297  case BINDSTATUS_CACHEFILENAMEAVAILABLE:
298  case BINDSTATUS_CLASSIDAVAILABLE:
299  case BINDSTATUS_MIMETYPEAVAILABLE:
300  case BINDSTATUS_BEGINSYNCOPERATION:
301  case BINDSTATUS_ENDSYNCOPERATION:
302  return S_OK;
303  default:
304  FIXME("status code %u\n", ulStatusCode);
305  }
306 
307  return S_OK;
308 }
309 
311 {
312  VARIANT var_status_code, var_frame_name, var_url;
313  DISPPARAMS dispparams;
314  VARIANTARG params[5];
315  VARIANT_BOOL cancel = VARIANT_FALSE;
316 
317  dispparams.cArgs = 5;
318  dispparams.cNamedArgs = 0;
319  dispparams.rgdispidNamedArgs = NULL;
320  dispparams.rgvarg = params;
321 
323  V_BOOLREF(params) = &cancel;
324 
326  V_VARIANTREF(params+1) = &var_status_code;
327  V_VT(&var_status_code) = VT_I4;
328  V_I4(&var_status_code) = hres;
329 
331  V_VARIANTREF(params+2) = &var_frame_name;
332  V_VT(&var_frame_name) = VT_BSTR;
333  if(win2) {
334  hres = IHTMLWindow2_get_name(win2, &V_BSTR(&var_frame_name));
335  if(FAILED(hres))
336  V_BSTR(&var_frame_name) = NULL;
337  } else
338  V_BSTR(&var_frame_name) = NULL;
339 
341  V_VARIANTREF(params+3) = &var_url;
342  V_VT(&var_url) = VT_BSTR;
343  V_BSTR(&var_url) = url;
344 
345  V_VT(params+4) = VT_DISPATCH;
346  V_DISPATCH(params+4) = (IDispatch*)doc_host->wb;
347 
348  call_sink(doc_host->cps.wbe2, DISPID_NAVIGATEERROR, &dispparams);
349  SysFreeString(V_BSTR(&var_frame_name));
350 
351  if(!cancel)
352  FIXME("Navigate to error page\n");
353 }
354 
356  HRESULT hresult, LPCWSTR szError)
357 {
359 
360  TRACE("(%p)->(%08x %s)\n", This, hresult, debugstr_w(szError));
361 
363 
364  if(!This->doc_host)
365  return S_OK;
366 
367  if(!This->doc_host->olecmd)
368  notify_download_state(This->doc_host, FALSE);
369  if(FAILED(hresult))
370  handle_navigation_error(This->doc_host, hresult, This->url, NULL);
371 
372  IOleClientSite_Release(&This->doc_host->IOleClientSite_iface);
373  This->doc_host = NULL;
374 
375  IBinding_Release(This->binding);
376  This->binding = NULL;
377 
378  return S_OK;
379 }
380 
382  DWORD *grfBINDF, BINDINFO *pbindinfo)
383 {
385 
386  TRACE("(%p)->(%p %p)\n", This, grfBINDF, pbindinfo);
387 
388  *grfBINDF = BINDF_ASYNCHRONOUS;
389 
390  if(This->post_data) {
391  pbindinfo->dwBindVerb = BINDVERB_POST;
392 
393  pbindinfo->stgmedData.tymed = TYMED_HGLOBAL;
394  pbindinfo->stgmedData.u.hGlobal = This->post_data;
395  pbindinfo->cbstgmedData = This->post_data_len;
396  pbindinfo->stgmedData.pUnkForRelease = (IUnknown*)&This->IBindStatusCallback_iface;
397  IBindStatusCallback_AddRef(&This->IBindStatusCallback_iface);
398  }
399 
400  return S_OK;
401 }
402 
404  DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed)
405 {
407  FIXME("(%p)->(%08x %d %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
408  return E_NOTIMPL;
409 }
410 
412  REFIID riid, IUnknown *punk)
413 {
415 
416  TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), punk);
417 
418  return dochost_object_available(This->doc_host, punk);
419 }
420 
421 static const IBindStatusCallbackVtbl BindStatusCallbackVtbl = {
433 };
434 
436 {
437  return CONTAINING_RECORD(iface, BindStatusCallback, IHttpNegotiate_iface);
438 }
439 
441  REFIID riid, void **ppv)
442 {
444  return IBindStatusCallback_QueryInterface(&This->IBindStatusCallback_iface, riid, ppv);
445 }
446 
448 {
450  return IBindStatusCallback_AddRef(&This->IBindStatusCallback_iface);
451 }
452 
454 {
456  return IBindStatusCallback_Release(&This->IBindStatusCallback_iface);
457 }
458 
460  LPCWSTR szURL, LPCWSTR szHeaders, DWORD dwReserved, LPWSTR *pszAdditionalHeaders)
461 {
463 
464  TRACE("(%p)->(%s %s %d %p)\n", This, debugstr_w(szURL), debugstr_w(szHeaders),
465  dwReserved, pszAdditionalHeaders);
466 
467  if(This->headers) {
468  int size = (strlenW(This->headers)+1)*sizeof(WCHAR);
469  *pszAdditionalHeaders = CoTaskMemAlloc(size);
470  memcpy(*pszAdditionalHeaders, This->headers, size);
471  }
472 
473  return S_OK;
474 }
475 
477  DWORD dwResponseCode, LPCWSTR szResponseHeaders, LPCWSTR szRequestHeaders,
478  LPWSTR *pszAdditionalRequestHeaders)
479 {
481  TRACE("(%p)->(%d %s %s %p)\n", This, dwResponseCode, debugstr_w(szResponseHeaders),
482  debugstr_w(szRequestHeaders), pszAdditionalRequestHeaders);
483  return S_OK;
484 }
485 
486 static const IHttpNegotiateVtbl HttpNegotiateVtbl = {
492 };
493 
495 {
496  return CONTAINING_RECORD(iface, BindStatusCallback, IHttpSecurity_iface);
497 }
498 
500 {
502  return IBindStatusCallback_QueryInterface(&This->IBindStatusCallback_iface, riid, ppv);
503 }
504 
506 {
508  return IBindStatusCallback_AddRef(&This->IBindStatusCallback_iface);
509 }
510 
512 {
514  return IBindStatusCallback_Release(&This->IBindStatusCallback_iface);
515 }
516 
517 static HRESULT WINAPI HttpSecurity_GetWindow(IHttpSecurity *iface, REFGUID rguidReason, HWND *phwnd)
518 {
520 
521  TRACE("(%p)->(%s %p)\n", This, debugstr_guid(rguidReason), phwnd);
522 
523  if(!This->doc_host)
524  return E_FAIL;
525 
526  *phwnd = This->doc_host->frame_hwnd;
527  return S_OK;
528 }
529 
531 {
533  FIXME("(%p)->(%u)\n", This, dwProblem);
534  return S_FALSE;
535 }
536 
537 static const IHttpSecurityVtbl HttpSecurityVtbl = {
543 };
544 
546  ULONG post_data_len, LPCWSTR headers)
547 {
549 
550  ret->IBindStatusCallback_iface.lpVtbl = &BindStatusCallbackVtbl;
551  ret->IHttpNegotiate_iface.lpVtbl = &HttpNegotiateVtbl;
552  ret->IHttpSecurity_iface.lpVtbl = &HttpSecurityVtbl;
553 
554  ret->ref = 1;
555  ret->url = SysAllocString(url);
556  ret->post_data = NULL;
557  ret->post_data_len = post_data_len;
558  ret->headers = headers ? SysAllocString(headers) : NULL;
559 
560  ret->doc_host = doc_host;
561  IOleClientSite_AddRef(&doc_host->IOleClientSite_iface);
562 
563  ret->binding = NULL;
564 
565  if(post_data) {
566  ret->post_data = GlobalAlloc(0, post_data_len);
567  memcpy(ret->post_data, post_data, post_data_len);
568  }
569 
570  return ret;
571 }
572 
574 {
575  VARIANT var_url, var_flags, var_frame_name, var_post_data, var_post_data2, var_headers;
576  DISPPARAMS dispparams;
577  VARIANTARG params[7];
579  DWORD file_path_len = ARRAY_SIZE(file_path);
580 
581  dispparams.cArgs = 7;
582  dispparams.cNamedArgs = 0;
583  dispparams.rgdispidNamedArgs = NULL;
584  dispparams.rgvarg = params;
585 
586  This->busy = VARIANT_TRUE;
587 
589  V_BOOLREF(params) = cancel;
590 
592  V_VARIANTREF(params+1) = &var_headers;
593  V_VT(&var_headers) = VT_BSTR;
594  V_BSTR(&var_headers) = headers;
595 
597  V_VARIANTREF(params+2) = &var_post_data2;
598  V_VT(&var_post_data2) = (VT_BYREF|VT_VARIANT);
599  V_VARIANTREF(&var_post_data2) = &var_post_data;
600 
601  if(post_data) {
602  V_VT(&var_post_data) = VT_UI1|VT_ARRAY;
603  V_ARRAY(&var_post_data) = post_data;
604  }else {
605  V_VT(&var_post_data) = VT_EMPTY;
606  }
607 
609  V_VARIANTREF(params+3) = &var_frame_name;
610  V_VT(&var_frame_name) = VT_BSTR;
611  V_BSTR(&var_frame_name) = NULL;
612 
614  V_VARIANTREF(params+4) = &var_flags;
615  V_VT(&var_flags) = VT_I4;
616  V_I4(&var_flags) = 0;
617 
619  V_VARIANTREF(params+5) = &var_url;
620  V_VT(&var_url) = VT_BSTR;
621  if(PathCreateFromUrlW(url, file_path, &file_path_len, 0) == S_OK)
622  V_BSTR(&var_url) = SysAllocString(file_path);
623  else
624  V_BSTR(&var_url) = SysAllocString(url);
625 
626  V_VT(params+6) = (VT_DISPATCH);
627  V_DISPATCH(params+6) = (IDispatch*)This->wb;
628 
629  call_sink(This->cps.wbe2, DISPID_BEFORENAVIGATE2, &dispparams);
630 
631  SysFreeString(V_BSTR(&var_url));
632 }
633 
634 /* FIXME: urlmon should handle it */
636 {
637  SHELLEXECUTEINFOW exec_info;
638  WCHAR app[64];
639  HKEY hkey;
640  DWORD res, type;
641  HRESULT hres;
642 
643  static const WCHAR wszURLProtocol[] = {'U','R','L',' ','P','r','o','t','o','c','o','l',0};
644 
645  hres = CoInternetParseUrl(url, PARSE_SCHEMA, 0, app, ARRAY_SIZE(app), NULL, 0);
646  if(FAILED(hres))
647  return FALSE;
648 
649  res = RegOpenKeyW(HKEY_CLASSES_ROOT, app, &hkey);
650  if(res != ERROR_SUCCESS)
651  return FALSE;
652 
653  res = RegQueryValueExW(hkey, wszURLProtocol, NULL, &type, NULL, NULL);
654  RegCloseKey(hkey);
655  if(res != ERROR_SUCCESS || type != REG_SZ)
656  return FALSE;
657 
658  TRACE("opening application %s\n", debugstr_w(app));
659 
660  memset(&exec_info, 0, sizeof(exec_info));
661  exec_info.cbSize = sizeof(exec_info);
662  exec_info.lpFile = url;
663  exec_info.nShow = SW_SHOW;
664 
665  return ShellExecuteExW(&exec_info);
666 }
667 
669 {
671  DWORD size;
672  HRESULT hres;
673 
674  if(PathIsURLW(url))
675  return CreateURLMoniker(NULL, url, mon);
676 
677  size = ARRAY_SIZE(new_url);
679  TRACE("was %s got %s\n", debugstr_w(url), debugstr_w(new_url));
680  if(FAILED(hres)) {
681  WARN("UrlApplyScheme failed: %08x\n", hres);
682  return hres;
683  }
684 
685  return CreateURLMoniker(NULL, new_url, mon);
686 }
687 
690 {
691  IUnknown *unk = NULL;
692  WCHAR *display_name;
693  HRESULT hres;
694 
695  if(mon) {
696  IMoniker_AddRef(mon);
697  }else {
698  hres = create_moniker(url, &mon);
699  if(FAILED(hres))
700  return hres;
701  }
702 
703  hres = IMoniker_GetDisplayName(mon, 0, NULL, &display_name);
704  if(FAILED(hres)) {
705  FIXME("GetDisplayName failed: %08x\n", hres);
706  IMoniker_Release(mon);
707  return hres;
708  }
709 
710  hres = set_dochost_url(This, display_name);
711  CoTaskMemFree(display_name);
712  if(FAILED(hres)) {
713  IMoniker_Release(mon);
714  return hres;
715  }
716 
717  IBindCtx_RegisterObjectParam(bindctx, (LPOLESTR)SZ_HTML_CLIENTSITE_OBJECTPARAM,
718  (IUnknown*)&This->IOleClientSite_iface);
719 
720  hres = IMoniker_BindToObject(mon, bindctx, NULL, &IID_IUnknown, (void**)&unk);
721  if(SUCCEEDED(hres)) {
722  hres = S_OK;
723  if(unk)
724  IUnknown_Release(unk);
725  }else if(try_application_url(url)) {
726  hres = S_OK;
727  }else {
728  FIXME("BindToObject failed: %08x\n", hres);
729  }
730 
731  IMoniker_Release(mon);
732  return S_OK;
733 }
734 
736 {
737  VARIANT headers_var, post_data_var;
738  BSTR empty_str;
739  HRESULT hres;
740 
742  if(FAILED(hres))
743  return;
744 
746 
747  if(headers) {
748  V_VT(&headers_var) = VT_BSTR;
749  V_BSTR(&headers_var) = headers;
750  }else {
751  V_VT(&headers_var) = VT_EMPTY;
752  }
753 
754  if(post_data) {
755  V_VT(&post_data_var) = VT_UI1|VT_ARRAY;
756  V_ARRAY(&post_data_var) = post_data;
757  }else {
758  V_VT(&post_data_var) = VT_EMPTY;
759  }
760 
761  set_doc_state(This, READYSTATE_LOADING);
762  hres = IHTMLPrivateWindow_SuperNavigate(window, url, empty_str, NULL, NULL, &post_data_var, &headers_var, 0);
764  if(FAILED(hres))
765  WARN("SuprtNavigate failed: %08x\n", hres);
766 }
767 
768 typedef struct {
775 
777 {
779 
780  SysFreeString(task->url);
781  SysFreeString(task->headers);
782  if(task->post_data)
784  heap_free(task);
785 }
786 
788 {
790  IHTMLPrivateWindow *priv_window;
791  HRESULT hres;
792 
793  if(!This->doc_navigate) {
794  ERR("Skip nav\n");
795  return;
796  }
797 
798  if(task->async_notif) {
799  VARIANT_BOOL cancel = VARIANT_FALSE;
800  on_before_navigate2(This, task->url, task->post_data, task->headers, &cancel);
801  if(cancel) {
802  TRACE("Navigation canceled\n");
803  return;
804  }
805  }
806 
807  hres = IUnknown_QueryInterface(This->doc_navigate, &IID_IHTMLPrivateWindow, (void**)&priv_window);
808  if(SUCCEEDED(hres)) {
809  html_window_navigate(This, priv_window, task->url, task->headers, task->post_data);
810  IHTMLPrivateWindow_Release(priv_window);
811  }else {
812  WARN("Could not get IHTMLPrivateWindow iface: %08x\n", hres);
813  }
814 }
815 
817  BOOL async_notif)
818 {
819  task_doc_navigate_t *task;
820 
821  TRACE("%s\n", debugstr_w(url));
822 
823  task = heap_alloc_zero(sizeof(*task));
824  if(!task)
825  return E_OUTOFMEMORY;
826 
827  task->url = SysAllocString(url);
828  if(!task->url) {
830  return E_OUTOFMEMORY;
831  }
832 
833  if(headers) {
834  task->headers = SysAllocString(headers);
835  if(!task->headers) {
837  return E_OUTOFMEMORY;
838  }
839  }
840 
841  if(post_data) {
842  task->post_data = SafeArrayCreateVector(VT_UI1, 0, post_data_size);
843  if(!task->post_data) {
845  return E_OUTOFMEMORY;
846  }
847 
848  memcpy(task->post_data->pvData, post_data, post_data_size);
849  }
850 
851  if(!async_notif) {
852  VARIANT_BOOL cancel = VARIANT_FALSE;
853 
854  on_before_navigate2(This, task->url, task->post_data, task->headers, &cancel);
855  if(cancel) {
856  TRACE("Navigation canceled\n");
858  return S_OK;
859  }
860  }
861 
862  task->async_notif = async_notif;
865  return S_OK;
866 }
867 
869 {
870  VARIANT_BOOL cancel = VARIANT_FALSE;
872  IBindCtx *bindctx;
873  HRESULT hres;
874 
875  set_doc_state(This, READYSTATE_LOADING);
876 
877  if(bsc->post_data) {
878  post_data = SafeArrayCreateVector(VT_UI1, 0, bsc->post_data_len);
879  memcpy(post_data->pvData, post_data, bsc->post_data_len);
880  }
881 
882  on_before_navigate2(This, bsc->url, post_data, bsc->headers, &cancel);
883  if(post_data)
885  if(cancel) {
886  FIXME("Navigation canceled\n");
887  return S_OK;
888  }
889 
893 
894  if(This->document)
896 
897  CreateAsyncBindCtx(0, &bsc->IBindStatusCallback_iface, 0, &bindctx);
898 
899  if(This->frame)
900  IOleInPlaceFrame_EnableModeless(This->frame, FALSE);
901 
902  hres = bind_to_object(This, mon, bsc->url, bindctx, &bsc->IBindStatusCallback_iface);
903 
904  if(This->frame)
905  IOleInPlaceFrame_EnableModeless(This->frame, TRUE);
906 
907  IBindCtx_Release(bindctx);
908 
909  return hres;
910 }
911 
912 typedef struct {
916 
918 {
920 
921  IBindStatusCallback_Release(&task->bsc->IBindStatusCallback_iface);
922  heap_free(task);
923 }
924 
926 {
928 
929  if(!This->hwnd)
931 
932  navigate_bsc(This, task->bsc, NULL);
933 }
934 
935 
937  const VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
938 {
939  SAFEARRAY *post_array = NULL;
940  PBYTE post_data = NULL;
941  ULONG post_data_len = 0;
942  LPWSTR headers = NULL;
943  HRESULT hres = S_OK;
944 
945  TRACE("navigating to %s\n", debugstr_w(url));
946 
947  if((Flags && V_VT(Flags) != VT_EMPTY && V_VT(Flags) != VT_ERROR)
948  || (TargetFrameName && V_VT(TargetFrameName) != VT_EMPTY && V_VT(TargetFrameName) != VT_ERROR))
949  FIXME("Unsupported args (Flags %s; TargetFrameName %s)\n", debugstr_variant(Flags), debugstr_variant(TargetFrameName));
950 
951  if(PostData) {
952  if(V_VT(PostData) & VT_ARRAY)
953  post_array = V_ISBYREF(PostData) ? *V_ARRAYREF(PostData) : V_ARRAY(PostData);
954  else
955  WARN("Invalid post data %s\n", debugstr_variant(PostData));
956  }
957 
958  if(post_array) {
959  LONG elem_max;
960  SafeArrayAccessData(post_array, (void**)&post_data);
961  SafeArrayGetUBound(post_array, 1, &elem_max);
962  post_data_len = (elem_max+1) * SafeArrayGetElemsize(post_array);
963  }
964 
965  if(Headers && V_VT(Headers) == VT_BSTR) {
966  headers = V_BSTR(Headers);
967  TRACE("Headers: %s\n", debugstr_w(headers));
968  }
969 
970  set_doc_state(This, READYSTATE_LOADING);
971  This->ready_state = READYSTATE_LOADING;
972 
973  if(This->doc_navigate) {
975 
976  if(PathIsURLW(url)) {
977  new_url[0] = 0;
978  }else {
979  DWORD size;
980 
981  size = ARRAY_SIZE(new_url);
982  hres = UrlApplySchemeW(url, new_url, &size,
984  if(FAILED(hres)) {
985  WARN("UrlApplyScheme failed: %08x\n", hres);
986  new_url[0] = 0;
987  }
988  }
989 
990  hres = async_doc_navigate(This, *new_url ? new_url : url, headers, post_data,
991  post_data_len, TRUE);
992  }else {
993  task_navigate_bsc_t *task;
994 
995  task = heap_alloc(sizeof(*task));
996  task->bsc = create_callback(This, url, post_data, post_data_len, headers);
998  }
999 
1000  if(post_data)
1001  SafeArrayUnaccessData(post_array);
1002 
1003  return hres;
1004 }
1005 
1008 {
1011  PBYTE post_data = NULL;
1012  ULONG post_data_len = 0;
1013  LPWSTR headers = NULL, url;
1014  BINDINFO bindinfo;
1015  DWORD bindf = 0;
1016  HRESULT hres;
1017 
1018  TRACE("\n");
1019 
1020  hres = IMoniker_GetDisplayName(mon, 0, NULL, &url);
1021  if(FAILED(hres))
1022  FIXME("GetDisplayName failed: %08x\n", hres);
1023 
1024  hres = IBindStatusCallback_QueryInterface(callback, &IID_IHttpNegotiate,
1025  (void**)&http_negotiate);
1026  if(SUCCEEDED(hres)) {
1027  static const WCHAR null_string[] = {0};
1028 
1029  IHttpNegotiate_BeginningTransaction(http_negotiate, null_string, null_string, 0,
1030  &headers);
1031  IHttpNegotiate_Release(http_negotiate);
1032  }
1033 
1034  memset(&bindinfo, 0, sizeof(bindinfo));
1035  bindinfo.cbSize = sizeof(bindinfo);
1036 
1037  hres = IBindStatusCallback_GetBindInfo(callback, &bindf, &bindinfo);
1038  dump_BINDINFO(&bindinfo);
1039  if(bindinfo.dwBindVerb == BINDVERB_POST) {
1040  post_data_len = bindinfo.cbstgmedData;
1041  if(post_data_len)
1042  post_data = bindinfo.stgmedData.u.hGlobal;
1043  }
1044 
1045  if(This->doc_navigate) {
1046  hres = async_doc_navigate(This, url, headers, post_data, post_data_len, FALSE);
1047  }else {
1048  bsc = create_callback(This, url, post_data, post_data_len, headers);
1049  hres = navigate_bsc(This, bsc, mon);
1050  IBindStatusCallback_Release(&bsc->IBindStatusCallback_iface);
1051  }
1052 
1053  CoTaskMemFree(url);
1055  ReleaseBindInfo(&bindinfo);
1056 
1057  return hres;
1058 }
1059 
1061 {
1062  HKEY hkey;
1063  DWORD res, type, size;
1064  WCHAR wszPageName[MAX_PATH];
1065  static const WCHAR wszAboutBlank[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
1066  static const WCHAR wszStartPage[] = {'S','t','a','r','t',' ','P','a','g','e',0};
1067  static const WCHAR wszSubKey[] = {'S','o','f','t','w','a','r','e','\\',
1068  'M','i','c','r','o','s','o','f','t','\\',
1069  'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','\\',
1070  'M','a','i','n',0};
1071 
1072  res = RegOpenKeyW(HKEY_CURRENT_USER, wszSubKey, &hkey);
1073  if (res != ERROR_SUCCESS)
1074  return navigate_url(This, wszAboutBlank, NULL, NULL, NULL, NULL);
1075 
1076  size = sizeof(wszPageName);
1077  res = RegQueryValueExW(hkey, wszStartPage, NULL, &type, (LPBYTE)wszPageName, &size);
1078  RegCloseKey(hkey);
1079  if (res != ERROR_SUCCESS || type != REG_SZ)
1080  return navigate_url(This, wszAboutBlank, NULL, NULL, NULL, NULL);
1081 
1082  return navigate_url(This, wszPageName, NULL, NULL, NULL, NULL);
1083 }
1084 
1085 static HRESULT navigate_history(DocHost *This, unsigned travellog_pos)
1086 {
1087  IPersistHistory *persist_history;
1089  LARGE_INTEGER li;
1090  HRESULT hres;
1091 
1092  if(!This->doc_navigate) {
1093  FIXME("unsupported doc_navigate FALSE\n");
1094  return E_NOTIMPL;
1095  }
1096 
1097  This->travellog.loading_pos = travellog_pos;
1098  entry = This->travellog.log + This->travellog.loading_pos;
1099 
1101 
1102  if(!entry->stream)
1103  return async_doc_navigate(This, entry->url, NULL, NULL, 0, FALSE);
1104 
1105  hres = IUnknown_QueryInterface(This->document, &IID_IPersistHistory, (void**)&persist_history);
1106  if(FAILED(hres))
1107  return hres;
1108 
1109  li.QuadPart = 0;
1110  IStream_Seek(entry->stream, li, STREAM_SEEK_SET, NULL);
1111 
1112  hres = IPersistHistory_LoadHistory(persist_history, entry->stream, NULL);
1113  IPersistHistory_Release(persist_history);
1114  return hres;
1115 }
1116 
1118 {
1119  if(!This->travellog.position) {
1120  WARN("No history available\n");
1121  return E_FAIL;
1122  }
1123 
1124  return navigate_history(This, This->travellog.position-1);
1125 }
1126 
1128 {
1129  if(This->travellog.position >= This->travellog.length) {
1130  WARN("No history available\n");
1131  return E_FAIL;
1132  }
1133 
1134  return navigate_history(This, This->travellog.position+1);
1135 }
1136 
1138 {
1139  FIXME("semi-stub\n");
1140 
1141  *ret = This->url ? SysAllocString(This->url) : SysAllocStringLen(NULL, 0);
1142  if(!*ret)
1143  return E_OUTOFMEMORY;
1144 
1145  return This->url ? S_OK : S_FALSE;
1146 }
1147 
1149 {
1150  return CONTAINING_RECORD(iface, HlinkFrame, IHlinkFrame_iface);
1151 }
1152 
1154 {
1156  return IUnknown_QueryInterface(This->outer, riid, ppv);
1157 }
1158 
1160 {
1162  return IUnknown_AddRef(This->outer);
1163 }
1164 
1166 {
1168  return IUnknown_Release(This->outer);
1169 }
1170 
1172  IHlinkBrowseContext *pihlbc)
1173 {
1175  FIXME("(%p)->(%p)\n", This, pihlbc);
1176  return E_NOTIMPL;
1177 }
1178 
1180  IHlinkBrowseContext **ppihlbc)
1181 {
1183  FIXME("(%p)->(%p)\n", This, ppihlbc);
1184  return E_NOTIMPL;
1185 }
1186 
1188  IBindStatusCallback *pibsc, IHlink *pihlNavigate)
1189 {
1191  IMoniker *mon;
1192  LPWSTR location = NULL;
1193 
1194  TRACE("(%p)->(%08x %p %p %p)\n", This, grfHLNF, pbc, pibsc, pihlNavigate);
1195 
1196  if(grfHLNF)
1197  FIXME("unsupported grfHLNF=%08x\n", grfHLNF);
1198 
1199  /* Windows calls GetTargetFrameName here. */
1200 
1201  IHlink_GetMonikerReference(pihlNavigate, 1, &mon, &location);
1202 
1203  if(location) {
1204  FIXME("location = %s\n", debugstr_w(location));
1206  }
1207 
1208  /* Windows calls GetHlinkSite here */
1209 
1210  if(grfHLNF & HLNF_OPENINNEWWINDOW) {
1211  FIXME("Not supported HLNF_OPENINNEWWINDOW\n");
1212  return E_NOTIMPL;
1213  }
1214 
1215  return navigate_hlink(This->doc_host, mon, pbc, pibsc);
1216 }
1217 
1219  IMoniker *pimkTarget, LPCWSTR pwzLocation, LPCWSTR pwzFriendlyName, DWORD dwreserved)
1220 {
1222  FIXME("(%p)->(%08x %p %s %s %d)\n", This, grfHLNF, pimkTarget, debugstr_w(pwzLocation),
1223  debugstr_w(pwzFriendlyName), dwreserved);
1224  return E_NOTIMPL;
1225 }
1226 
1228  IMoniker *pimkTarget, LPCWSTR pwzLocation, LPCWSTR pwzFriendlyName)
1229 {
1231  FIXME("(%p)->(%u %p %s %s)\n", This, uHLID, pimkTarget, debugstr_w(pwzLocation),
1232  debugstr_w(pwzFriendlyName));
1233  return E_NOTIMPL;
1234 }
1235 
1236 static const IHlinkFrameVtbl HlinkFrameVtbl = {
1245 };
1246 
1248 {
1249  return CONTAINING_RECORD(iface, HlinkFrame, ITargetFrame_iface);
1250 }
1251 
1253 {
1255  return IUnknown_QueryInterface(This->outer, riid, ppv);
1256 }
1257 
1259 {
1261  return IUnknown_AddRef(This->outer);
1262 }
1263 
1265 {
1267  return IUnknown_Release(This->outer);
1268 }
1269 
1271 {
1273  FIXME("(%p)->(%s)\n", This, debugstr_w(pszFrameName));
1274  return E_NOTIMPL;
1275 }
1276 
1278 {
1280  FIXME("(%p)->(%p)\n", This, ppszFrameName);
1281  return E_NOTIMPL;
1282 }
1283 
1285 {
1287  FIXME("(%p)->(%p)\n", This, ppunkParent);
1288  return E_NOTIMPL;
1289 }
1290 
1292  IUnknown *ppunkContextFrame, DWORD dwFlags, IUnknown **ppunkTargetFrame)
1293 {
1295  FIXME("(%p)->(%s %p %x %p)\n", This, debugstr_w(pszTargetName),
1296  ppunkContextFrame, dwFlags, ppunkTargetFrame);
1297  return E_NOTIMPL;
1298 }
1299 
1301 {
1303  FIXME("(%p)->(%s)\n", This, debugstr_w(pszFrameSrc));
1304  return E_NOTIMPL;
1305 }
1306 
1308 {
1310  FIXME("(%p)->(%p)\n", This, ppszFrameSrc);
1311  return E_NOTIMPL;
1312 }
1313 
1315 {
1317  FIXME("(%p)->(%p)\n", This, ppContainer);
1318  return E_NOTIMPL;
1319 }
1320 
1322 {
1324  FIXME("(%p)->(%x)\n", This, dwFlags);
1325  return E_NOTIMPL;
1326 }
1327 
1329 {
1331  FIXME("(%p)->(%p)\n", This, pdwFlags);
1332  return E_NOTIMPL;
1333 }
1334 
1336 {
1338  FIXME("(%p)->(%d %d)\n", This, dwWidth, dwHeight);
1339  return E_NOTIMPL;
1340 }
1341 
1342 static HRESULT WINAPI TargetFrame_GetFrameMargins(ITargetFrame *iface, DWORD *pdwWidth, DWORD *pdwHeight)
1343 {
1345  FIXME("(%p)->(%p %p)\n", This, pdwWidth, pdwHeight);
1346  return E_NOTIMPL;
1347 }
1348 
1350 {
1352  FIXME("(%p)->(%u %p)\n", This, cLength, pulData);
1353  return E_NOTIMPL;
1354 }
1355 
1357 {
1359  FIXME("(%p)->(%p)\n", This, pUnkChildFrame);
1360  return E_NOTIMPL;
1361 }
1362 
1364 {
1366  FIXME("(%p)->(%p)\n", This, pUnkChildFrame);
1367  return E_NOTIMPL;
1368 }
1369 
1370 static const ITargetFrameVtbl TargetFrameVtbl = {
1388 };
1389 
1391 {
1392  return CONTAINING_RECORD(iface, HlinkFrame, ITargetFrame2_iface);
1393 }
1394 
1396 {
1398  return IUnknown_QueryInterface(This->outer, riid, ppv);
1399 }
1400 
1402 {
1404  return IUnknown_AddRef(This->outer);
1405 }
1406 
1408 {
1410  return IUnknown_Release(This->outer);
1411 }
1412 
1414 {
1416  FIXME("(%p)->(%s)\n", This, debugstr_w(pszFrameName));
1417  return E_NOTIMPL;
1418 }
1419 
1421 {
1423  FIXME("(%p)->(%p)\n", This, ppszFrameName);
1424  return E_NOTIMPL;
1425 }
1426 
1428 {
1430  FIXME("(%p)->(%p)\n", This, ppunkParent);
1431  return E_NOTIMPL;
1432 }
1433 
1435 {
1437  FIXME("(%p)->(%s)\n", This, debugstr_w(pszFrameSrc));
1438  return E_NOTIMPL;
1439 }
1440 
1442 {
1444  FIXME("(%p)->()\n", This);
1445  return E_NOTIMPL;
1446 }
1447 
1449 {
1451  FIXME("(%p)->(%p)\n", This, ppContainer);
1452  return E_NOTIMPL;
1453 }
1454 
1456 {
1458  FIXME("(%p)->(%x)\n", This, dwFlags);
1459  return E_NOTIMPL;
1460 }
1461 
1463 {
1465  FIXME("(%p)->(%p)\n", This, pdwFlags);
1466  return E_NOTIMPL;
1467 }
1468 
1470 {
1472  FIXME("(%p)->(%d %d)\n", This, dwWidth, dwHeight);
1473  return E_NOTIMPL;
1474 }
1475 
1477 {
1479  FIXME("(%p)->(%p %p)\n", This, pdwWidth, pdwHeight);
1480  return E_NOTIMPL;
1481 }
1482 
1483 static HRESULT WINAPI TargetFrame2_FindFrame(ITargetFrame2 *iface, LPCWSTR pszTargetName, DWORD dwFlags, IUnknown **ppunkTargetFrame)
1484 {
1486  FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(pszTargetName), dwFlags, ppunkTargetFrame);
1487  return E_NOTIMPL;
1488 }
1489 
1490 static HRESULT WINAPI TargetFrame2_GetTargetAlias(ITargetFrame2 *iface, LPCWSTR pszTargetName, LPWSTR *ppszTargetAlias)
1491 {
1493  FIXME("(%p)->(%s %p)\n", This, debugstr_w(pszTargetName), ppszTargetAlias);
1494  return E_NOTIMPL;
1495 }
1496 
1497 static const ITargetFrame2Vtbl TargetFrame2Vtbl = {
1513 };
1514 
1516 {
1517  return CONTAINING_RECORD(iface, HlinkFrame, ITargetFramePriv2_iface);
1518 }
1519 
1521 {
1523  return IUnknown_QueryInterface(This->outer, riid, ppv);
1524 }
1525 
1527 {
1529  return IUnknown_AddRef(This->outer);
1530 }
1531 
1533 {
1535  return IUnknown_Release(This->outer);
1536 }
1537 
1539  LPCWSTR pszTargetName, DWORD dwFlags, IUnknown **ppunkTargetFrame)
1540 {
1542  FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(pszTargetName), dwFlags, ppunkTargetFrame);
1543  return E_NOTIMPL;
1544 }
1545 
1547  LPCWSTR pszTargetName, IUnknown *punkContextFrame, DWORD dwFlags, IUnknown **ppunkTargetFrame)
1548 {
1550  FIXME("(%p)->(%s %p %x %p)\n", This, debugstr_w(pszTargetName), punkContextFrame, dwFlags, ppunkTargetFrame);
1551  return E_NOTIMPL;
1552 }
1553 
1555 {
1557  FIXME("(%p)->(%p)\n", This, pUnkChildFrame);
1558  return E_NOTIMPL;
1559 }
1560 
1562 {
1564  FIXME("(%p)->(%p)\n", This, pUnkChildFrame);
1565  return E_NOTIMPL;
1566 }
1567 
1569  IBindStatusCallback *pibsc, LPCWSTR pszTargetName, LPCWSTR pszUrl, LPCWSTR pszLocation)
1570 {
1572  FIXME("(%p)->(%x %p %p %s %s %s)\n", This, grfHLNF, pbc, pibsc, debugstr_w(pszTargetName),
1573  debugstr_w(pszUrl), debugstr_w(pszLocation));
1574  return E_NOTIMPL;
1575 }
1576 
1578 {
1580  FIXME("(%p)->(%d %p)\n", This, dwID, ppunkBrowser);
1581  return E_NOTIMPL;
1582 }
1583 
1585  IBindStatusCallback *pibsc, LPCWSTR pszTargetName, IUri *pUri, LPCWSTR pszLocation)
1586 {
1588  IMoniker *mon;
1589  HRESULT hres;
1590 
1591  TRACE("(%p)->(%x %p %p %s %p %s)\n", This, grfHLNF, pbc, pibsc, debugstr_w(pszTargetName),
1592  pUri, debugstr_w(pszLocation));
1593 
1594  /*
1595  * NOTE: This is an undocumented function. It seems to be working the way it's implemented,
1596  * but I couldn't get its tests working. It's used by mshtml to load content in a new
1597  * instance of browser.
1598  */
1599 
1600  hres = CreateURLMonikerEx2(NULL, pUri, &mon, 0);
1601  if(FAILED(hres))
1602  return hres;
1603 
1604  hres = navigate_hlink(This->doc_host, mon, pbc, pibsc);
1605  IMoniker_Release(mon);
1606  return hres;
1607 }
1608 
1609 static const ITargetFramePriv2Vtbl TargetFramePriv2Vtbl = {
1620 };
1621 
1623 {
1624  return CONTAINING_RECORD(iface, HlinkFrame, IWebBrowserPriv2IE9_iface);
1625 }
1626 
1628 {
1630  return IUnknown_QueryInterface(This->outer, riid, ppv);
1631 }
1632 
1634 {
1636  return IUnknown_AddRef(This->outer);
1637 }
1638 
1640 {
1642  return IUnknown_Release(This->outer);
1643 }
1644 
1646  VARIANT *target_frame, VARIANT *post_data, VARIANT *headers, IBindCtx *bind_ctx, LPOLESTR url_fragment, DWORD unused)
1647 {
1649  FIXME("(%p)->(%p %s %s %s %s %p %s)\n", This, uri, debugstr_variant(flags), debugstr_variant(target_frame),
1650  debugstr_variant(post_data), debugstr_variant(headers), bind_ctx, debugstr_w(url_fragment));
1651  return E_NOTIMPL;
1652 }
1653 
1654 static const IWebBrowserPriv2IE9Vtbl WebBrowserPriv2IE9Vtbl = {
1659 };
1660 
1662 {
1663  if(IsEqualGUID(&IID_IHlinkFrame, riid)) {
1664  TRACE("(%p)->(IID_IHlinkFrame %p)\n", This, ppv);
1665  *ppv = &This->IHlinkFrame_iface;
1666  }else if(IsEqualGUID(&IID_ITargetFrame, riid)) {
1667  TRACE("(%p)->(IID_ITargetFrame %p)\n", This, ppv);
1668  *ppv = &This->ITargetFrame_iface;
1669  }else if(IsEqualGUID(&IID_ITargetFrame2, riid)) {
1670  TRACE("(%p)->(IID_ITargetFrame2 %p)\n", This, ppv);
1671  *ppv = &This->ITargetFrame2_iface;
1672  }else if(IsEqualGUID(&IID_ITargetFramePriv, riid)) {
1673  TRACE("(%p)->(IID_ITargetFramePriv %p)\n", This, ppv);
1674  *ppv = &This->ITargetFramePriv2_iface;
1675  }else if(IsEqualGUID(&IID_ITargetFramePriv2, riid)) {
1676  TRACE("(%p)->(IID_ITargetFramePriv2 %p)\n", This, ppv);
1677  *ppv = &This->ITargetFramePriv2_iface;
1678  }else if(IsEqualGUID(&IID_IWebBrowserPriv2IE9, riid)) {
1679  TRACE("(%p)->(IID_IWebBrowserPriv2IE9 %p)\n", This, ppv);
1680  *ppv = &This->IWebBrowserPriv2IE9_iface;
1681  }else {
1682  return FALSE;
1683  }
1684 
1685  IUnknown_AddRef((IUnknown*)*ppv);
1686  return TRUE;
1687 }
1688 
1690 {
1691  This->IHlinkFrame_iface.lpVtbl = &HlinkFrameVtbl;
1692  This->ITargetFrame_iface.lpVtbl = &TargetFrameVtbl;
1693  This->ITargetFrame2_iface.lpVtbl = &TargetFrame2Vtbl;
1694  This->ITargetFramePriv2_iface.lpVtbl = &TargetFramePriv2Vtbl;
1695  This->IWebBrowserPriv2IE9_iface.lpVtbl = &WebBrowserPriv2IE9Vtbl;
1696 
1697  This->outer = outer;
1698  This->doc_host = doc_host;
1699 }
void on_commandstate_change(DocHost *doc_host, LONG command, BOOL enable)
Definition: dochost.c:83
static ULONG WINAPI WebBrowserPriv2IE9_Release(IWebBrowserPriv2IE9 *iface)
Definition: navigate.c:1639
static HRESULT WINAPI TargetFramePriv2_OnChildFrameActivate(ITargetFramePriv2 *iface, IUnknown *pUnkChildFrame)
Definition: navigate.c:1554
static HRESULT WINAPI TargetFrame2_GetFrameOptions(ITargetFrame2 *iface, DWORD *pdwFlags)
Definition: navigate.c:1462
static HRESULT WINAPI TargetFramePriv2_NavigateHack(ITargetFramePriv2 *iface, DWORD grfHLNF, LPBC pbc, IBindStatusCallback *pibsc, LPCWSTR pszTargetName, LPCWSTR pszUrl, LPCWSTR pszLocation)
Definition: navigate.c:1568
#define DISPID_BEFORENAVIGATE2
Definition: exdispid.h:43
HRESULT WINAPI PathCreateFromUrlW(LPCWSTR pszUrl, LPWSTR pszPath, LPDWORD pcchPath, DWORD dwReserved)
Definition: path.c:3334
IOleClientSite IOleClientSite_iface
Definition: ieframe.h:120
static HRESULT WINAPI TargetFrame2_GetParentFrame(ITargetFrame2 *iface, IUnknown **ppunkParent)
Definition: navigate.c:1427
#define REFIID
Definition: guiddef.h:113
#define TRUE
Definition: types.h:120
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
#define E_NOINTERFACE
Definition: winerror.h:2364
Definition: compat.h:1939
#define snprintfW
Definition: unicode.h:60
static const TCHAR empty_str[]
Definition: dialog.c:32
static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk)
Definition: navigate.c:411
static HRESULT WINAPI HttpSecurity_QueryInterface(IHttpSecurity *iface, REFIID riid, void **ppv)
Definition: navigate.c:499
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define ERROR_SUCCESS
Definition: deptool.c:10
static HRESULT create_moniker(LPCWSTR url, IMoniker **mon)
Definition: navigate.c:668
static BindStatusCallback * create_callback(DocHost *doc_host, LPCWSTR url, PBYTE post_data, ULONG post_data_len, LPCWSTR headers)
Definition: navigate.c:545
static HRESULT WINAPI TargetFrame2_GetFrameName(ITargetFrame2 *iface, LPWSTR *ppszFrameName)
Definition: navigate.c:1420
Definition: scsiwmi.h:51
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:342
interface IBindCtx * LPBC
Definition: objfwd.h:18
static const IBindStatusCallbackVtbl BindStatusCallbackVtbl
Definition: navigate.c:421
static HRESULT WINAPI TargetFrame2_SetFrameMargins(ITargetFrame2 *iface, DWORD dwWidth, DWORD dwHeight)
Definition: navigate.c:1469
static ULONG WINAPI HttpSecurity_AddRef(IHttpSecurity *iface)
Definition: navigate.c:505
static HRESULT bind_to_object(DocHost *This, IMoniker *mon, LPCWSTR url, IBindCtx *bindctx, IBindStatusCallback *callback)
Definition: navigate.c:688
task_header_t header
Definition: navigate.c:769
const char * uri
Definition: sec_mgr.c:1594
REFIID riid
Definition: precomp.h:44
void WINAPI ReleaseBindInfo(BINDINFO *pbindinfo)
Definition: urlmon_main.c:572
#define HKEY_CURRENT_USER
Definition: winreg.h:11
static HRESULT WINAPI TargetFrame_RemoteNavigate(ITargetFrame *iface, ULONG cLength, ULONG *pulData)
Definition: navigate.c:1349
#define V_ARRAY(A)
Definition: oleauto.h:222
static void on_before_navigate2(DocHost *This, LPCWSTR url, SAFEARRAY *post_data, LPWSTR headers, VARIANT_BOOL *cancel)
Definition: navigate.c:573
static HRESULT async_doc_navigate(DocHost *This, LPCWSTR url, LPCWSTR headers, PBYTE post_data, ULONG post_data_size, BOOL async_notif)
Definition: navigate.c:816
uint8_t entry
Definition: isohybrid.c:63
static HRESULT WINAPI TargetFrame_GetParentFrame(ITargetFrame *iface, IUnknown **ppunkParent)
Definition: navigate.c:1284
#define WARN(fmt,...)
Definition: debug.h:111
static ULONG WINAPI HttpSecurity_Release(IHttpSecurity *iface)
Definition: navigate.c:511
static HRESULT WINAPI TargetFrame2_GetFramesContainer(ITargetFrame2 *iface, IOleContainer **ppContainer)
Definition: navigate.c:1448
DocHost * doc_host
Definition: navigate.c:45
static HRESULT WINAPI TargetFrame_FindFrame(ITargetFrame *iface, LPCWSTR pszTargetName, IUnknown *ppunkContextFrame, DWORD dwFlags, IUnknown **ppunkTargetFrame)
Definition: navigate.c:1291
static HRESULT WINAPI TargetFrame2_SetFrameOptions(ITargetFrame2 *iface, DWORD dwFlags)
Definition: navigate.c:1455
REFIID LPVOID * ppv
Definition: atlbase.h:39
BOOL HlinkFrame_QI(HlinkFrame *This, REFIID riid, void **ppv)
Definition: navigate.c:1661
static DWORD get_http_status_code(IBinding *binding)
Definition: navigate.c:252
static HRESULT WINAPI TargetFrame_SetFrameName(ITargetFrame *iface, LPCWSTR pszFrameName)
Definition: navigate.c:1270
static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError)
Definition: navigate.c:355
GLdouble GLdouble t
Definition: gl.h:2047
#define V_ISBYREF(A)
Definition: oleauto.h:217
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
void HlinkFrame_Init(HlinkFrame *This, IUnknown *outer, DocHost *doc_host)
Definition: navigate.c:1689
#define DISPID_DOWNLOADCOMPLETE
Definition: webchild.h:39
static HRESULT WINAPI TargetFrame_GetFrameName(ITargetFrame *iface, LPWSTR *ppszFrameName)
Definition: navigate.c:1277
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
GLuint buffer
Definition: glext.h:5915
HRESULT go_back(DocHost *This)
Definition: navigate.c:1117
static BOOL try_application_url(LPCWSTR url)
Definition: navigate.c:635
HGLOBAL post_data
Definition: navigate.c:49
vector< Header * > headers
Definition: sdkparse.cpp:39
static HRESULT WINAPI TargetFrame2_SetFrameName(ITargetFrame2 *iface, LPCWSTR pszFrameName)
Definition: navigate.c:1413
void * arg
Definition: msvc.h:12
static HRESULT WINAPI HttpSecurity_GetWindow(IHttpSecurity *iface, REFGUID rguidReason, HWND *phwnd)
Definition: navigate.c:517
HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
Definition: internet.c:392
OLECHAR * BSTR
Definition: compat.h:1934
__IHTMLWindow2_FWD_DEFINED__ typedef interface IHTMLWindow2 IHTMLWindow2
Definition: mshtmhst.idl:64
static HRESULT navigate_bsc(DocHost *This, BindStatusCallback *bsc, IMoniker *mon)
Definition: navigate.c:868
static ULONG WINAPI HlinkFrame_AddRef(IHlinkFrame *iface)
Definition: navigate.c:1159
static LPOLESTR
Definition: stg_prop.c:27
static HlinkFrame * impl_from_IHlinkFrame(IHlinkFrame *iface)
Definition: navigate.c:1148
#define E_FAIL
Definition: ddrawi.h:102
static HRESULT WINAPI TargetFrame_SetFrameSrc(ITargetFrame *iface, LPCWSTR pszFrameSrc)
Definition: navigate.c:1300
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define DWORD
Definition: nt_native.h:44
short VARIANT_BOOL
Definition: compat.h:1931
static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate *iface, LPCWSTR szURL, LPCWSTR szHeaders, DWORD dwReserved, LPWSTR *pszAdditionalHeaders)
Definition: navigate.c:459
Definition: send.c:47
static HRESULT WINAPI TargetFramePriv2_FindFrameInContext(ITargetFramePriv2 *iface, LPCWSTR pszTargetName, IUnknown *punkContextFrame, DWORD dwFlags, IUnknown **ppunkTargetFrame)
Definition: navigate.c:1546
#define DISPID_STATUSTEXTCHANGE
Definition: webchild.h:37
static const ITargetFrame2Vtbl TargetFrame2Vtbl
Definition: navigate.c:1497
static HRESULT WINAPI TargetFrame_GetFrameOptions(ITargetFrame *iface, DWORD *pdwFlags)
Definition: navigate.c:1328
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
void update_navigation_commands(DocHost *dochost)
Definition: dochost.c:106
#define V_I4(A)
Definition: oleauto.h:247
BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
Definition: url.c:2432
static HRESULT WINAPI HttpSecurity_OnSecurityProblem(IHttpSecurity *iface, DWORD dwProblem)
Definition: navigate.c:530
static HlinkFrame * impl_from_ITargetFrame(ITargetFrame *iface)
Definition: navigate.c:1247
static HRESULT WINAPI BindStatusCallback_GetPriority(IBindStatusCallback *iface, LONG *pnPriority)
Definition: navigate.c:236
static void dump_BINDINFO(BINDINFO *bi)
Definition: navigate.c:54
#define V_DISPATCH(A)
Definition: oleauto.h:239
static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx, IBindStatusCallback *callback)
Definition: navigate.c:1006
static HlinkFrame * impl_from_ITargetFramePriv2(ITargetFramePriv2 *iface)
Definition: navigate.c:1515
ConnectionPointContainer cps
Definition: ieframe.h:173
struct status_code status_code
IWebBrowser2 * wb
Definition: ieframe.h:133
static BindStatusCallback * impl_from_IHttpNegotiate(IHttpNegotiate *iface)
Definition: navigate.c:435
#define IDS_STATUSFMT_MAXLEN
Definition: resource.h:78
WORD unused[29]
Definition: crypt.c:1155
static ULONG WINAPI HttpNegotiate_AddRef(IHttpNegotiate *iface)
Definition: navigate.c:447
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static void html_window_navigate(DocHost *This, IHTMLPrivateWindow *window, BSTR url, BSTR headers, SAFEARRAY *post_data)
Definition: navigate.c:735
GLenum const GLfloat * params
Definition: glext.h:5645
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
static HRESULT WINAPI WebBrowserPriv2IE9_NavigateWithBindCtx2(IWebBrowserPriv2IE9 *iface, IUri *uri, VARIANT *flags, VARIANT *target_frame, VARIANT *post_data, VARIANT *headers, IBindCtx *bind_ctx, LPOLESTR url_fragment, DWORD unused)
Definition: navigate.c:1645
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
Definition: safearray.c:1139
static HRESULT WINAPI TargetFramePriv2_FindFrameDownwards(ITargetFramePriv2 *iface, LPCWSTR pszTargetName, DWORD dwFlags, IUnknown **ppunkTargetFrame)
Definition: navigate.c:1538
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
static HRESULT WINAPI HlinkFrame_GetBrowseContext(IHlinkFrame *iface, IHlinkBrowseContext **ppihlbc)
Definition: navigate.c:1179
void call_sink(ConnectionPoint *This, DISPID dispid, DISPPARAMS *dispparams)
Definition: events.c:391
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3311
#define debugstr_w
Definition: kernel32.h:32
static HRESULT WINAPI WebBrowserPriv2IE9_QueryInterface(IWebBrowserPriv2IE9 *iface, REFIID riid, void **ppv)
Definition: navigate.c:1627
GLenum GLint ref
Definition: glext.h:6028
#define FIXME(fmt,...)
Definition: debug.h:110
r reserved
Definition: btrfs.c:2655
static void navigate_bsc_proc(DocHost *This, task_header_t *t)
Definition: navigate.c:925
#define V_ARRAYREF(A)
Definition: oleauto.h:223
#define S_FALSE
Definition: winerror.h:2357
HRESULT get_location_url(DocHost *This, BSTR *ret)
Definition: navigate.c:1137
static IBindStatusCallbackEx bsc
Definition: url.c:2149
const WCHAR * str
#define V_BOOLREF(A)
Definition: oleauto.h:225
smooth NULL
Definition: ftsmooth.c:416
static HRESULT WINAPI HlinkFrame_QueryInterface(IHlinkFrame *iface, REFIID riid, void **ppv)
Definition: navigate.c:1153
static HRESULT WINAPI TargetFrame2_SetFrameSrc(ITargetFrame2 *iface, LPCWSTR pszFrameSrc)
Definition: navigate.c:1434
#define INTERNET_MAX_URL_LENGTH
Definition: session.c:1380
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed)
Definition: navigate.c:403
static HRESULT WINAPI TargetFrame_GetFramesContainer(ITargetFrame *iface, IOleContainer **ppContainer)
Definition: navigate.c:1314
Definition: ieframe.h:104
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2225
static HRESULT WINAPI TargetFrame2_GetFrameMargins(ITargetFrame2 *iface, DWORD *pdwWidth, DWORD *pdwHeight)
Definition: navigate.c:1476
#define SW_SHOW
Definition: winuser.h:769
static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate *iface, REFIID riid, void **ppv)
Definition: navigate.c:440
#define debugstr_guid
Definition: kernel32.h:35
SHDocVw::uuid CSC_NAVIGATEBACK
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
static const WCHAR dwHeight[]
Definition: provider.c:60
static HRESULT WINAPI TargetFrame_SetFrameOptions(ITargetFrame *iface, DWORD dwFlags)
Definition: navigate.c:1321
void deactivate_document(DocHost *This)
Definition: dochost.c:511
HRESULT navigate_url(DocHost *This, LPCWSTR url, const VARIANT *Flags, const VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
Definition: navigate.c:936
#define IDS_STATUSFMT_FIRST
Definition: resource.h:73
static HRESULT WINAPI TargetFramePriv2_AggregatedNavigation2(ITargetFramePriv2 *iface, DWORD grfHLNF, LPBC pbc, IBindStatusCallback *pibsc, LPCWSTR pszTargetName, IUri *pUri, LPCWSTR pszLocation)
Definition: navigate.c:1584
static HRESULT WINAPI TargetFrame2_QueryInterface(ITargetFrame2 *iface, REFIID riid, void **ppv)
Definition: navigate.c:1395
static HRESULT WINAPI TargetFrame_QueryInterface(ITargetFrame *iface, REFIID riid, void **ppv)
Definition: navigate.c:1252
static ULONG WINAPI TargetFrame2_AddRef(ITargetFrame2 *iface)
Definition: navigate.c:1401
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
static HRESULT WINAPI BindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
Definition: navigate.c:381
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
ULONG post_data_len
Definition: navigate.c:51
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4134
__wchar_t WCHAR
Definition: xmlstorage.h:180
HRESULT set_dochost_url(DocHost *This, const WCHAR *url)
Definition: navigate.c:130
#define URL_APPLY_DEFAULT
Definition: shlwapi.h:1204
LONG HRESULT
Definition: typedefs.h:77
static HlinkFrame * impl_from_IWebBrowserPriv2IE9(IWebBrowserPriv2IE9 *iface)
Definition: navigate.c:1622
static const WCHAR url[]
Definition: encode.c:1432
const GUID IID_IUnknown
static BindStatusCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: navigate.c:156
PVOID pvData
Definition: compat.h:2000
IHttpNegotiate IHttpNegotiate_iface
Definition: navigate.c:40
#define MAX_PATH
Definition: compat.h:26
#define WINAPI
Definition: msvc.h:8
unsigned long DWORD
Definition: ntddk_ex.h:95
#define HTTP_STATUS_OK
Definition: winhttp.h:240
static ULONG WINAPI TargetFrame_Release(ITargetFrame *iface)
Definition: navigate.c:1264
void create_doc_view_hwnd(DocHost *This)
Definition: dochost.c:480
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
static ULONG WINAPI HlinkFrame_Release(IHlinkFrame *iface)
Definition: navigate.c:1165
void set_doc_state(DocHost *This, READYSTATE doc_state)
Definition: dochost.c:235
GLbitfield flags
Definition: glext.h:7161
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
Definition: safearray.c:1349
SAFEARRAY *WINAPI SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements)
Definition: safearray.c:679
static ULONG WINAPI TargetFramePriv2_Release(ITargetFramePriv2 *iface)
Definition: navigate.c:1532
int ret
#define DISPID_NAVIGATEERROR
Definition: webchild.h:73
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
static const CHAR post_data[]
Definition: protocol.c:215
#define InterlockedDecrement
Definition: armddk.h:52
HRESULT dochost_object_available(DocHost *This, IUnknown *doc)
Definition: dochost.c:305
void push_dochost_task(DocHost *This, task_header_t *task, task_proc_t proc, task_destr_t destr, BOOL send)
Definition: dochost.c:39
HRESULT WINAPI UrlApplySchemeW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, DWORD dwFlags)
Definition: url.c:1817
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define DISPID_DOWNLOADBEGIN
Definition: webchild.h:41
static HRESULT WINAPI HlinkFrame_SetBrowseContext(IHlinkFrame *iface, IHlinkBrowseContext *pihlbc)
Definition: navigate.c:1171
static void doc_navigate_proc(DocHost *This, task_header_t *t)
Definition: navigate.c:787
#define V_VT(A)
Definition: oleauto.h:211
HRESULT WINAPI CreateURLMonikerEx2(IMoniker *pmkContext, IUri *pUri, IMoniker **ppmk, DWORD dwFlags)
Definition: umon.c:668
static HRESULT WINAPI TargetFrame_GetFrameMargins(ITargetFrame *iface, DWORD *pdwWidth, DWORD *pdwHeight)
Definition: navigate.c:1342
void notify_download_state(DocHost *dochost, BOOL is_downloading)
Definition: navigate.c:149
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
IBindStatusCallback IBindStatusCallback_iface
Definition: navigate.c:39
static IHTMLWindow2 * window
Definition: events.c:77
SAFEARRAY * post_data
Definition: navigate.c:772
static HRESULT WINAPI TargetFrame2_GetTargetAlias(ITargetFrame2 *iface, LPCWSTR pszTargetName, LPWSTR *ppszTargetAlias)
Definition: navigate.c:1490
ConnectionPoint * wbe2
Definition: ieframe.h:55
#define V_BSTR(A)
Definition: oleauto.h:226
static void doc_navigate_task_destr(task_header_t *t)
Definition: navigate.c:776
#define HTTP_QUERY_STATUS_CODE
Definition: wininet.h:1542
task_header_t header
Definition: navigate.c:913
static void navigate_bsc_task_destr(task_header_t *t)
Definition: navigate.c:917
static ULONG WINAPI HttpNegotiate_Release(IHttpNegotiate *iface)
Definition: navigate.c:453
IHttpSecurity IHttpSecurity_iface
Definition: navigate.c:41
static HRESULT WINAPI TargetFrame_GetFrameSrc(ITargetFrame *iface, LPWSTR *ppszFrameSrc)
Definition: navigate.c:1307
#define ERR(fmt,...)
Definition: debug.h:109
static HRESULT WINAPI HlinkFrame_Navigate(IHlinkFrame *iface, DWORD grfHLNF, LPBC pbc, IBindStatusCallback *pibsc, IHlink *pihlNavigate)
Definition: navigate.c:1187
IBinding * binding
Definition: navigate.c:46
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:59
void abort_dochost_tasks(DocHost *This, task_proc_t proc)
Definition: dochost.c:70
HRESULT WINAPI SafeArrayGetUBound(SAFEARRAY *psa, UINT nDim, LONG *plUbound)
Definition: safearray.c:1035
HRESULT go_forward(DocHost *This)
Definition: navigate.c:1127
HRESULT WINAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *callback, IEnumFORMATETC *format, IBindCtx **pbind)
Definition: bindctx.c:899
static HRESULT WINAPI TargetFramePriv2_QueryInterface(ITargetFramePriv2 *iface, REFIID riid, void **ppv)
Definition: navigate.c:1520
static void set_status_text(BindStatusCallback *This, ULONG statuscode, LPCWSTR str)
Definition: navigate.c:98
#define InterlockedIncrement
Definition: armddk.h:53
static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
Definition: navigate.c:271
static const WCHAR emptyW[]
Definition: navigate.c:36
static HRESULT WINAPI TargetFrame2_FindFrame(ITargetFrame2 *iface, LPCWSTR pszTargetName, DWORD dwFlags, IUnknown **ppunkTargetFrame)
Definition: navigate.c:1483
#define ARRAY_SIZE(a)
Definition: main.h:24
static SZ_HTML_CLIENTSITE_OBJECTPARAM(const WCHAR[]) const WCHAR SZ_HTML_CLIENTSITE_OBJECTPARAM[]
Definition: mshtmhst.idl:59
static HRESULT WINAPI TargetFrame_SetFrameMargins(ITargetFrame *iface, DWORD dwWidth, DWORD dwHeight)
Definition: navigate.c:1335
static BindStatusCallback * impl_from_IHttpSecurity(IHttpSecurity *iface)
Definition: navigate.c:494
#define E_NOTIMPL
Definition: ddrawi.h:99
static const IHttpSecurityVtbl HttpSecurityVtbl
Definition: navigate.c:537
static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallback *iface)
Definition: navigate.c:191
UINT WINAPI SafeArrayGetElemsize(SAFEARRAY *psa)
Definition: safearray.c:1116
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
BindStatusCallback * bsc
Definition: navigate.c:914
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static HRESULT WINAPI TargetFrame_OnChildFrameActivate(ITargetFrame *iface, IUnknown *pUnkChildFrame)
Definition: navigate.c:1356
SHDocVw::uuid CSC_NAVIGATEFORWARD
#define HTTP_QUERY_FLAG_NUMBER
Definition: wininet.h:1606
void handle_navigation_error(DocHost *doc_host, HRESULT hres, BSTR url, IHTMLWindow2 *win2)
Definition: navigate.c:310
#define URL_APPLY_GUESSSCHEME
Definition: shlwapi.h:1203
static HRESULT WINAPI HlinkFrame_UpdateHlink(IHlinkFrame *iface, ULONG uHLID, IMoniker *pimkTarget, LPCWSTR pwzLocation, LPCWSTR pwzFriendlyName)
Definition: navigate.c:1227
static HRESULT WINAPI HlinkFrame_OnNavigate(IHlinkFrame *iface, DWORD grfHLNF, IMoniker *pimkTarget, LPCWSTR pwzLocation, LPCWSTR pwzFriendlyName, DWORD dwreserved)
Definition: navigate.c:1218
GLuint res
Definition: glext.h:9613
struct stdole::DISPPARAMS DISPPARAMS
static ULONG WINAPI TargetFrame2_Release(ITargetFrame2 *iface)
Definition: navigate.c:1407
unsigned int ULONG
Definition: retypes.h:1
static HRESULT WINAPI TargetFramePriv2_FindBrowserByIndex(ITargetFramePriv2 *iface, DWORD dwID, IUnknown **ppunkBrowser)
Definition: navigate.c:1577
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
Definition: umon.c:732
static HRESULT WINAPI TargetFramePriv2_OnChildFrameDeactivate(ITargetFramePriv2 *iface, IUnknown *pUnkChildFrame)
Definition: navigate.c:1561
static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *iface, DWORD dwReserved, IBinding *pbind)
Definition: navigate.c:223
static IHttpNegotiate2 http_negotiate
Definition: protocol.c:387
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface)
Definition: navigate.c:201
#define V_VARIANTREF(A)
Definition: oleauto.h:283
static ULONG WINAPI TargetFrame_AddRef(ITargetFrame *iface)
Definition: navigate.c:1258
#define URL_APPLY_GUESSFILE
Definition: shlwapi.h:1202
static HlinkFrame * impl_from_ITargetFrame2(ITargetFrame2 *iface)
Definition: navigate.c:1390
HRESULT go_home(DocHost *This)
Definition: navigate.c:1060
WCHAR * LPWSTR
Definition: xmlstorage.h:184
WINE_DEFAULT_DEBUG_CHANNEL(ieframe)
static HRESULT WINAPI HttpNegotiate_OnResponse(IHttpNegotiate *iface, DWORD dwResponseCode, LPCWSTR szResponseHeaders, LPCWSTR szRequestHeaders, LPWSTR *pszAdditionalRequestHeaders)
Definition: navigate.c:476
static HRESULT navigate_history(DocHost *This, unsigned travellog_pos)
Definition: navigate.c:1085
#define memset(x, y, z)
Definition: compat.h:39
static HRESULT WINAPI TargetFrame2_GetFrameSrc(ITargetFrame2 *iface, LPWSTR *ppszFrameSrc)
Definition: navigate.c:1441
static const ITargetFrameVtbl TargetFrameVtbl
Definition: navigate.c:1370
static SERVICE_STATUS status
Definition: service.c:31
BYTE * PBYTE
Definition: pedump.c:66
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406
static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallback *iface, REFIID riid, void **ppv)
Definition: navigate.c:161
static HRESULT WINAPI TargetFrame_OnChildFrameDeactivate(ITargetFrame *iface, IUnknown *pUnkChildFrame)
Definition: navigate.c:1363
Definition: dsound.c:943
static const ITargetFramePriv2Vtbl TargetFramePriv2Vtbl
Definition: navigate.c:1609
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
static const WCHAR dwWidth[]
Definition: provider.c:59
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
Definition: safearray.c:1170
static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallback *iface, DWORD reserved)
Definition: navigate.c:244
#define SUCCEEDED(hr)
Definition: intsafe.h:57
LONGLONG QuadPart
Definition: typedefs.h:112
static const IHlinkFrameVtbl HlinkFrameVtbl
Definition: navigate.c:1236
static ULONG WINAPI TargetFramePriv2_AddRef(ITargetFramePriv2 *iface)
Definition: navigate.c:1526
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
TCHAR file_path[MAX_PATH]
Definition: sndrec32.cpp:57
static DWORD bindf
Definition: protocol.c:70
#define REG_SZ
Definition: layer.c:22
static ULONG WINAPI WebBrowserPriv2IE9_AddRef(IWebBrowserPriv2IE9 *iface)
Definition: navigate.c:1633
Definition: ps.c:97
static const IHttpNegotiateVtbl HttpNegotiateVtbl
Definition: navigate.c:486
static const IWebBrowserPriv2IE9Vtbl WebBrowserPriv2IE9Vtbl
Definition: navigate.c:1654