When I run this code on IE8, ShowBrowserBar returns S_OK, but the toolbar isn't shown. On IE7 it works fine. I saw a similar question here, by Anna, but without a working answer... :) Any suggestions?
int _tmain(int argc, _TCHAR* argv[])
{
CoInitialize(0);
IWebBrowser2 *pIE = NULL;
// Create an instance of Internet Explorer
HRESULT hr = CoCreateInstance(CLSID_InternetExplorer, NULL, CLSCTX_SERVER, IID_IWebBrowser2, (void**)&pIE);
if (FAILED(hr)) {
return 1;
}
if( pIE != NULL ) {
VARIANT vtBandGUID, vtShow, vtSize;
vtBandGUID.vt = VT_BSTR;
vtBandGUID.bstrVal = SysAllocString( L"{my-toolbar-guid}" );
vtShow.vt = VT_BOOL;
vtShow.boolVal = VARIANT_TRUE;
vtSize.vt = VT_I2;
vtSize.iVal = 0;
HRESULT hr = pIE->ShowBrowserBar( &vtBandGUID, &vtShow, &vtSize );
SysFreeString( vtBandGUID.bstrVal );
pIE->Release();
}
CoUninitialize();
return 0;
}