Navigate2 returns E_FAIL
- From: david_brownell@xxxxxxxxxxx
- Date: 18 Apr 2005 12:40:09 -0700
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);
}
.
- Follow-Ups:
- Re: Navigate2 returns E_FAIL
- From: Igor Tandetnik
- Re: Navigate2 returns E_FAIL
- Prev by Date: IHTMLDocument::Write method Problem ( How to clock popups)
- Next by Date: Re: Navigate2 returns E_FAIL
- Previous by thread: IHTMLDocument::Write method Problem ( How to clock popups)
- Next by thread: Re: Navigate2 returns E_FAIL
- Index(es):
Relevant Pages
|
|