| OLD | NEW |
| 1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
| 2 #include "PluginUserSettings.h" | 2 #include "PluginUserSettings.h" |
| 3 #include <algorithm> | 3 #include <algorithm> |
| 4 #include "PluginSettings.h" | 4 #include "PluginSettings.h" |
| 5 #include "PluginClient.h" | 5 #include "PluginClient.h" |
| 6 #include "../shared/Dictionary.h" | 6 #include "../shared/Dictionary.h" |
| 7 | 7 |
| 8 static const CString s_GetMessage = L"GetMessage"; | 8 static const CString s_GetMessage = L"GetMessage"; |
| 9 static const CString s_GetLanguageCount = L"GetLanguageCount"; | 9 static const CString s_GetLanguageCount = L"GetLanguageCount"; |
| 10 static const CString s_GetLanguageByIndex = L"GetLanguageByIndex"; | 10 static const CString s_GetLanguageByIndex = L"GetLanguageByIndex"; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 const CString& method = s_Methods[dispidMember]; | 133 const CString& method = s_Methods[dispidMember]; |
| 134 | 134 |
| 135 if (s_GetMessage == method) | 135 if (s_GetMessage == method) |
| 136 { | 136 { |
| 137 if (2 != pDispparams->cArgs) | 137 if (2 != pDispparams->cArgs) |
| 138 return DISP_E_BADPARAMCOUNT; | 138 return DISP_E_BADPARAMCOUNT; |
| 139 | 139 |
| 140 if (VT_BSTR != pDispparams->rgvarg[0].vt) | 140 if (VT_BSTR != pDispparams->rgvarg[0].vt) |
| 141 return DISP_E_TYPEMISMATCH; | 141 return DISP_E_TYPEMISMATCH; |
| 142 if (VT_BSTR != pDispparams->rgvarg[1].vt) |
| 143 return DISP_E_TYPEMISMATCH; |
| 142 | 144 |
| 143 if (pVarResult) | 145 if (pVarResult) |
| 144 { | 146 { |
| 145 CComBSTR key = pDispparams->rgvarg[0].bstrVal; | 147 CComBSTR key = pDispparams->rgvarg[0].bstrVal; |
| 146 CComBSTR section = pDispparams->rgvarg[1].bstrVal; | 148 CComBSTR section = pDispparams->rgvarg[1].bstrVal; |
| 147 CStringW message = sGetMessage((BSTR)section, (BSTR)key); | 149 CStringW message = sGetMessage((BSTR)section, (BSTR)key); |
| 148 | 150 |
| 149 pVarResult->vt = VT_BSTR; | 151 pVarResult->vt = VT_BSTR; |
| 150 pVarResult->bstrVal = SysAllocString(message); | 152 pVarResult->bstrVal = SysAllocString(message); |
| 151 } | 153 } |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 CPluginClient* client = CPluginClient::GetInstance(); | 354 CPluginClient* client = CPluginClient::GetInstance(); |
| 353 client->RemoveSubscription(client->GetPref(L"subscriptions_exceptionsurl",
L"")); | 355 client->RemoveSubscription(client->GetPref(L"subscriptions_exceptionsurl",
L"")); |
| 354 } | 356 } |
| 355 } | 357 } |
| 356 else | 358 else |
| 357 return DISP_E_MEMBERNOTFOUND; | 359 return DISP_E_MEMBERNOTFOUND; |
| 358 | 360 |
| 359 return S_OK; | 361 return S_OK; |
| 360 } | 362 } |
| 361 | 363 |
| OLD | NEW |