marcosvpb / geckofx

Automatically exported from code.google.com/p/geckofx
0 stars 0 forks source link

The type initializer for 'WindowCreator' threw an exception. #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have initialized it in the exact way getting started told me how. I have
found possible answers to my problem elsewhere, but none of them helped. I
have tried to use the source compiled by myself and I get the same problem.

I know it is a problem with this:
public static void Register()
{
    // calling this method simply invokes the static ctor
}

The inner exception is: Class not registered (Exception from HRESULT:
0x80040154 (REGDB_E_CLASSNOTREG))

The stack trace is:
   at Skybound.Gecko.GeckoWebBrowser.WindowCreator.Register()
   at Skybound.Gecko.GeckoWebBrowser.OnHandleCreated(EventArgs e)
   at System.Windows.Forms.Control.WmCreate(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at Skybound.Gecko.GeckoWebBrowser.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.IntCreateWindowEx(Int32
dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32
x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef
hMenu, HandleRef hInst, Object pvParam)
   at System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(Int32
dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32
x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef
hMenu, HandleRef hInst, Object pvParam)
   at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.ControlCollection.Add(Control value)
   at FarsiLibrary.Win.FATabStrip.OnCollectionChanged(Object sender,
CollectionChangeEventArgs e)
   at
FarsiLibrary.Win.FATabStripItemCollection.OnCollectionChanged(CollectionChangeEv
entArgs
e)
   at FarsiLibrary.Win.FATabStripItemCollection.OnInsertComplete(Int32
index, Object item)
   at System.Collections.CollectionBase.System.Collections.IList.Add(Object
value)
   at FarsiLibrary.Win.FATabStripItemCollection.Add(FATabStripItem item)
   at FarsiLibrary.Win.FATabStrip.AddTab(FATabStripItem tabItem, Boolean
autoSelect)
   at FarsiLibrary.Win.FATabStrip.AddTab(FATabStripItem tabItem)
   at XsInternetBrowser.Form1.frmLoad(Object sender, EventArgs e) in
C:\Documents and Settings\Chance Snow\My Documents\Visual Studio
2005\Projects\XsInternetBrowser\XsInternetBrowser\Form1.vb:line 29
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd,
Int32 nCmdShow)
   at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
   at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
   at System.Windows.Forms.Control.set_Visible(Boolean value)
   at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(ApplicationContext context)
   at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicat
ionModel()
   at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String
[]
commandLine)
   at XsInternetBrowser.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

How do I fix the problem?

Any help is much appreciated.

Original issue reported on code.google.com by go.x...@gmail.com on 16 Nov 2009 at 1:18

GoogleCodeExporter commented 8 years ago
I had same problem and after a lot of test, I uninstall "OpenOffice 2.2" and 
"OpenOffice SDK"
and now GeckoFX is working well

is it because OpenOffice use a xpcom.dll 
and Xpcom.Initialize(string binDirectory) add binDirectory at the end of Path

Original comment by pbeuz...@gmail.com on 7 Dec 2009 at 5:52

GoogleCodeExporter commented 8 years ago
I have the same problem and i don't have OpenOffice and never have.

Original comment by steve82...@gmail.com on 18 May 2010 at 7:50