Navigate2 returns E_FAIL



I'm sure I am missing something pretty obvious here, but I have been
staring at this code for awhile now and can't figure out for the life
of me why IWebBrowser2::Navigate2 is always returning E_FAIL. Any
ideas?

Thanks in advance!
David Brownell

#include <windows.h>
#include <ExDisp.h>
#include <atlbase.h>
#include <comutil.h>

#pragma comment(lib, "comsupp.lib")

int main(void)
{
CoInitialize(0);

CComPtr<IWebBrowser2> pBrowser;

if(FAILED(pBrowser.CoCreateInstance(CLSID_WebBrowser)) || pBrowser
== 0)
return(0);

_variant_t vURL("http://www.microsoft.com";);

HRESULT hr = pBrowser->Navigate2(&vURL,
&vtMissing,
&vtMissing,
&vtMissing,
&vtMissing);

return(0);
}

.



Relevant Pages

  • Re: Navigate2 returns E_FAIL
    ... > I'm sure I am missing something pretty obvious here, ... > staring at this code for awhile now and can't figure out for the life ... With sufficient thrust, pigs fly just fine. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: This is unbelievable!
    ... At the prime of his life. ... There are people out there missing legs, missing arms, missing eys, ... Police inspected the body of Mr. Jarle Neteland aged 27 from Norway. ...
    (soc.culture.thai)
  • Re: Tonight at WaWa
    ... I think I maybe shouldnt go in that particular store for awhile. ... Im still an addict,and therefore must guard this quit with my ... Ahhh, the smokefree life!!! ... used to love playing bridge and a bit of poker too. ...
    (alt.support.stop-smoking)
  • Re: Track_No in sub form
    ... Microsoft Access MVP ... and you'll never work a day in your life." ... set the DefaultValue of TrackNo to... ... This number missing not beautiful. ...
    (microsoft.public.access.reports)
  • Re: Tonight at WaWa
    ... taking her own fucking sweet time paying for her shit and kept putting stuff ... I think I maybe shouldnt go in that particular store for awhile. ... Im still an addict,and therefore must guard this quit with my ... Ahhh, the smokefree life!!! ...
    (alt.support.stop-smoking)