| Index: src/plugin/PluginMimeFilterClient.cpp |
| =================================================================== |
| --- a/src/plugin/PluginMimeFilterClient.cpp |
| +++ b/src/plugin/PluginMimeFilterClient.cpp |
| @@ -8,13 +8,14 @@ |
| typedef PassthroughAPP::CMetaFactory<PassthroughAPP::CComClassFactoryProtocol,WBPassthru> MetaFactory; |
| -CPluginMimeFilterClient::CPluginMimeFilterClient() : m_classFactory(NULL), m_spCFHTTP(NULL) |
| +CPluginMimeFilterClient::CPluginMimeFilterClient() : m_classFactory(NULL), m_spCFHTTP(NULL), m_spCFHTTPS(NULL) |
| { |
| // Should only be called once |
| // We register mime filters here |
| // Register asynchronous protocol |
| CComPtr<IInternetSession> spSession; |
| m_spCFHTTP = NULL; |
| + m_spCFHTTPS = NULL; |
|
Felix Dahlke
2013/08/11 17:00:36
No need to set this to NULL here if you do it in t
|
| HRESULT hr = ::CoInternetGetSession(0, &spSession, 0); |
| if (FAILED(hr) || !spSession) |
| { |
| @@ -35,6 +36,21 @@ |
| DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_SESSION, PLUGIN_ERROR_SESSION_REGISTER_HTTP_NAMESPACE, "MimeClient::RegisterNameSpace failed"); |
| return; |
| } |
| + |
| + hr = MetaFactory::CreateInstance(CLSID_HttpSProtocol, &m_spCFHTTPS); |
| + if (FAILED(hr) || !m_spCFHTTPS) |
| + { |
| + DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_SESSION, PLUGIN_ERROR_SESSION_CREATE_HTTPS_INSTANCE, "MimeClient::CreateInstance failed"); |
| + return; |
| + } |
| + |
| + hr = spSession->RegisterNameSpace(m_spCFHTTPS, CLSID_HttpSProtocol, L"https", 0, 0, 0); |
| + if (FAILED(hr)) |
| + { |
| + DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_SESSION, PLUGIN_ERROR_SESSION_REGISTER_HTTPS_NAMESPACE, "MimeClient::RegisterNameSpace failed"); |
| + return; |
| + } |
| + |
| } |
| @@ -51,6 +67,13 @@ |
| m_spCFHTTP.Release(); |
| m_spCFHTTP = NULL; |
| } |
| + spSession->UnregisterNameSpace(m_spCFHTTPS, L"https"); |
| + if (m_spCFHTTPS != NULL) |
| + { |
| + m_spCFHTTPS.Release(); |
| + m_spCFHTTPS = NULL; |
| + } |
| + |
| } |
| } |
| @@ -62,5 +85,6 @@ |
| if (spSession) |
| { |
| spSession->UnregisterNameSpace(m_spCFHTTP, L"http"); |
| + spSession->UnregisterNameSpace(m_spCFHTTPS, L"https"); |
| } |
| } |