| Index: src/plugin/PluginTabBase.cpp |
| =================================================================== |
| --- a/src/plugin/PluginTabBase.cpp |
| +++ b/src/plugin/PluginTabBase.cpp |
| @@ -157,44 +157,44 @@ void CPluginTabBase::OnDocumentComplete( |
| if (isDocumentBrowser) |
| { |
| if (url != documentUrl) |
| { |
| SetDocumentUrl(url); |
| } |
| CString log; |
| - log.Format(L"Current URL: %s, settings URL: %s", url, UserSettingsFileUrl()); |
| + log.Format(L"Current URL: %s, settings URL: %s", url, UserSettingsFileUrl().c_str()); |
| DEBUG_ERROR_LOG(0, 0, 0, log); |
| - if (0 == url.CompareNoCase(UserSettingsFileUrl())) |
| + if (0 == url.CompareNoCase(CString(UserSettingsFileUrl().c_str()))) |
| { |
| CComPtr<IDispatch> pDocDispatch; |
| browser->get_Document(&pDocDispatch); |
| CComQIPtr<IHTMLDocument2> pDoc2 = pDocDispatch; |
| - if (pDoc2) |
| + if (pDoc2) |
| { |
| CComPtr<IHTMLWindow2> pWnd2; |
| pDoc2->get_parentWindow(&pWnd2); |
| - if (pWnd2) |
| + if (pWnd2) |
| { |
| - CComQIPtr<IDispatchEx> pWndEx = pWnd2; |
| - if (pWndEx) |
| + CComQIPtr<IDispatchEx> pWndEx = pWnd2; |
| + if (pWndEx) |
| { |
| - // Create "Settings" object in JavaScript. |
| + // Create "Settings" object in JavaScript. |
| // A method call of "Settings" in JavaScript, transfered to "Invoke" of m_pluginUserSettings |
| DISPID dispid; |
| HRESULT hr = pWndEx->GetDispID(L"Settings", fdexNameEnsure, &dispid); |
| if (SUCCEEDED(hr)) |
| { |
| CComVariant var((IDispatch*)&m_pluginUserSettings); |
| DISPPARAMS params; |
| params.cArgs = 1; |
| params.cNamedArgs = 0; |
| - params.rgvarg = &var; |
| + params.rgvarg = &var; |
| params.rgdispidNamedArgs = 0; |
| hr = pWndEx->Invoke(dispid, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYPUT | DISPATCH_PROPERTYPUTREF, ¶ms, 0, 0, 0); |
| if (FAILED(hr)) |
| { |
| DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_CREATE_SETTINGS_JAVASCRIPT, PLUGIN_ERROR_CREATE_SETTINGS_JAVASCRIPT_INVOKE, "CPluginTabBase::OnDocumentComplete - Failed to create Settings in JavaScript"); |
| } |
| } |
| } |