I want to create a new GeckoWebBrowser
control but with a separate set of cookies for each control.
I tried with this code but it gives me an error:
<ContractID(TestCookieServiceFactory.ContractID)>
Public Class TestCookieServiceFactory
Inherits GenericOneClassNsFactory(Of TestCookieServiceFactory, TestCookieService)
Public Const ContractID As String = "@mozilla.org/cookieService;1"
End Class
Public Class TestCookieService
Inherits nsICookieConsts
End Class
Public Sub Main()
Xpcom.Initialize("Firefox")
Dim existingFactoryDetails = TestCookieServiceFactory.Unregister()
TestCookieServiceFactory.Register()
Dim browser = New Gecko.GeckoWebBrowser
browser.Navigate("http://www.twitter.com")
End Sub
Error message:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Geckofx-Core.dll
Additional information: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
User contributions licensed under CC BY-SA 3.0