+void wxWebViewIE::RegisterHandler(wxSharedPtr<wxWebHandler> handler)
+{
+ ClassFactory* cf = new ClassFactory(handler);
+ IInternetSession* session;
+ if(FAILED(CoInternetGetSession(0, &session, 0)))
+ {
+ wxFAIL_MSG("Could not retrive internet session");
+ }
+
+ HRESULT hr = session->RegisterNameSpace(cf, CLSID_FileProtocol, handler->GetName(), 0, NULL, 0);
+ if(FAILED(hr))
+ {
+ wxFAIL_MSG("Could not register protocol");
+ }
+}
+