I am working on a web browser with c++ using IWebBrowser2. Declared on the top, outside any scope, I have this:
static char buf[1024];
In the documentcomplete event, I set the BSTR with:
CComBSTR bstrHTMLText;
X->get_outerHTML(&bstrHTMLText);
What I want to do is to copy bstrHTMLText value into buf (if bstrHTMLText length is > 1024 just fill buf and ignore the rest). every time documentcomplete fires.
How can I do this?