Re: ExecWB and VARIANT
- From: "Brian Muth" <bmuth@xxxxxxxx>
- Date: Thu, 13 Dec 2007 14:13:13 -0800
"RAN" <nijenhuis@xxxxxxx> wrote in message news:0d41348b-658b-470c-9193-b166fb9c8b6e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
In want to use the ExecWB method of the webbrowser activeX control
from microsoft.
void CWebBrowser2::ExecWB(long cmdID, long cmdexecopt, VARIANT* pvaIn,
VARIANT* pvaOut)
I want to SaveAs a webpage using the cmdID = IDM_SAVEAS.
I don't know how to initialise the VARIANT* pvaIn variable to store
the pathname of the file to save the webpage. It is a VT_BSTR and
pbstrVal must be initialised, but i dont know how to initialise a
VARIANT*.
You need to pass a variant array of input parameters, each parameter being a variant.
Without actually testing, the code could look something like:
CComSafeArrayBound bnd (1, 0);
CComSafeArray<VARIANT> p (&bnd);
CComVariant v (L"My filename");
p.Add (v);
CComVariant pars (p);
x->ExecWB(cmdID, cmdexecopt, &p, NULL);
HTH
Brian
.
- References:
- ExecWB and VARIANT
- From: RAN
- ExecWB and VARIANT
- Prev by Date: Re: ExecWB and VARIANT
- Next by Date: Re: Vista-elevation and HKEY_CURRENT_USER
- Previous by thread: Re: ExecWB and VARIANT
- Next by thread: Simple question? Ultimate Grid Control
- Index(es):
Relevant Pages
|