webbrowser referer header
I have a VC++6 dialog-based app containg a webbrowser control. I use the Navigate(url,NULL,NULL,NULL,NULL) format to navigate to websites from the control.
The control passes over browser and version information to the visited website, but not any referer information. If I want to pass , say, referer infohttp:///www.mybrowser.com from the control, how do I do this ?
I think it's got something to do with the Header argument of Navigate, but I don't know the correct syntax. Can someone write me a few lines of code showing how I should do it.
Thanks
Alex
[660 byte] By [
alex2308] at [2007-12-16]
Although this question is off topic for thsi forum, the answer is very simple, so I'll post it here.
Create a BSTR for the referer header and assign the header value to it, assign that to a variant, pass that as the headers argument, clean everything up. E.g. using the compiler COM support classes.
_variant_t varHeaders(L"Referer: http://www.mybrowser.com\r\n");
your navigate call with &varHeaders as the last parameter.
Ronald Laeremans
Visual C++ team