10 Replies - 5749 Views - Last Post: 12 February 2011 - 12:02 PM Rate Topic: -----

#1 red1337  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 18-September 10

Webkit and Gecko problem

Posted 10 February 2011 - 04:45 AM

Don't really know what to post as an introduction so, Hello.

I'm currently trying to make a web browser from the webkit package from http://webkitdotnet.sourceforge.net/ on a 64-bit system

I loaded the webkitbrowser.dll to the toolbox and made sure it was loaded in the references and add just the webkitbrowser to the form, but when I debug it I get an error that reads

An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'WebKitBrowser, Version=0.5.0.0, Culture=neutral, PublicKeyToken=b967213f6d29a3be' or one of its dependencies. An attempt was made to load a program with an incorrect format.


under the troubleshooting tips, all the tip have the same "community content"

"32-bit DLLs on a 64-bit OS
Please Wait
This exception can occur when a .NET application running on a 64-bit platform attempts to load a DLL that does not support native 64-bit execution. If the application is built in platform-agnostic (i.e. "Any CPU") mode, it will launch in 64-bit mode on the host operating system, leading to this problem. To fix this, you can force the application to run in 32-bit mode by compiling for x86 architecture explicitly, forcing the program to launch in WoW64 mode on the 64-bit system, and allowing the 32-bit DLL to be accessed. -Mayank H Parmar"

So I figured the dll is 32-bit, but I don't know how to make the program debug in windows Wow64 so it can run the 32-bit dll.

Not wanting to put this much time in to one engine when I have other options, I decided to try the Gecko engine from http://code.google.c...in.v1.9.1.0.zip

But when I loaded the dll, check the reference, added the browser to the form and try to debug I got almost the same error as the first browser, only this time with gecko
An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'Skybound.Gecko, Version=1.9.1.0, Culture=neutral, PublicKeyToken=3209ac31600d1857' or one of its dependencies. An attempt was made to load a program with an incorrect format.


I've also tried moving the files from the webkit folder to the project's bin folder like a forum here suggested as a solution http://www.dreaminco...itnet-in-vbnet/


Any help and/or suggestions would be greatly appreciated.


Visual Basic 2008 Express
4gb ddr2, Intel duo 2.13 ghz, windows vista X64 basic


-Jarod

This post has been edited by red1337: 10 February 2011 - 04:49 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Webkit and Gecko problem

#2 Amrykid  Icon User is offline

  • 4+1=Moo
  • member icon

Reputation: 146
  • View blog
  • Posts: 1,572
  • Joined: 16-December 08

Re: Webkit and Gecko problem

Posted 10 February 2011 - 06:40 AM

View Postred1337, on 10 February 2011 - 05:45 AM, said:

Don't really know what to post as an introduction so, Hello.

I'm currently trying to make a web browser from the webkit package from http://webkitdotnet.sourceforge.net/ on a 64-bit system

I loaded the webkitbrowser.dll to the toolbox and made sure it was loaded in the references and add just the webkitbrowser to the form, but when I debug it I get an error that reads

An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'WebKitBrowser, Version=0.5.0.0, Culture=neutral, PublicKeyToken=b967213f6d29a3be' or one of its dependencies. An attempt was made to load a program with an incorrect format.


under the troubleshooting tips, all the tip have the same "community content"

"32-bit DLLs on a 64-bit OS
Please Wait
This exception can occur when a .NET application running on a 64-bit platform attempts to load a DLL that does not support native 64-bit execution. If the application is built in platform-agnostic (i.e. "Any CPU") mode, it will launch in 64-bit mode on the host operating system, leading to this problem. To fix this, you can force the application to run in 32-bit mode by compiling for x86 architecture explicitly, forcing the program to launch in WoW64 mode on the 64-bit system, and allowing the 32-bit DLL to be accessed. -Mayank H Parmar"

So I figured the dll is 32-bit, but I don't know how to make the program debug in windows Wow64 so it can run the 32-bit dll.

Not wanting to put this much time in to one engine when I have other options, I decided to try the Gecko engine from http://code.google.c...in.v1.9.1.0.zip

But when I loaded the dll, check the reference, added the browser to the form and try to debug I got almost the same error as the first browser, only this time with gecko
An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'Skybound.Gecko, Version=1.9.1.0, Culture=neutral, PublicKeyToken=3209ac31600d1857' or one of its dependencies. An attempt was made to load a program with an incorrect format.


I've also tried moving the files from the webkit folder to the project's bin folder like a forum here suggested as a solution http://www.dreaminco...itnet-in-vbnet/


Any help and/or suggestions would be greatly appreciated.


Visual Basic 2008 Express
4gb ddr2, Intel duo 2.13 ghz, windows vista X64 basic


-Jarod


It may be a problem with the dlls being 32bit. The odd think is 32bit applications can run on 64bit, but in 64bit operation systems (for Vista and Win7), exceptions are handled differently from 32bit ones. That may also be an issue.

Have you tried looking for a 64bit version of the dlls? If you can't find one, you might have to recompile them as 64bit.
Was This Post Helpful? 0
  • +
  • -

#3 red1337  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 18-September 10

Re: Webkit and Gecko problem

Posted 10 February 2011 - 07:35 AM

View PostAmrykid, on 10 February 2011 - 06:40 AM, said:

It may be a problem with the dlls being 32bit. The odd think is 32bit applications can run on 64bit, but in 64bit operation systems (for Vista and Win7), exceptions are handled differently from 32bit ones. That may also be an issue.

Have you tried looking for a 64bit version of the dlls? If you can't find one, you might have to recompile them as 64bit.

I've been looking everywhere for a tutorial to recompile them as 64bit but I can't find anything. Do you know of any?
Was This Post Helpful? 0
  • +
  • -

#4 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 966
  • View blog
  • Posts: 3,721
  • Joined: 02-July 08

Re: Webkit and Gecko problem

Posted 10 February 2011 - 08:25 AM

Also if your designing an app on the 64 bit OS[by default it is compiling as 64 bit], you can tell VS to make this a 32 bit app with the configurations manager - which I would try first.
Was This Post Helpful? 0
  • +
  • -

#5 red1337  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 18-September 10

Re: Webkit and Gecko problem

Posted 10 February 2011 - 09:45 AM

View Posthawkvalley1, on 10 February 2011 - 08:25 AM, said:

Also if your designing an app on the 64 bit OS[by default it is compiling as 64 bit], you can tell VS to make this a 32 bit app with the configurations manager - which I would try first.

I tried running it under a X86 with configurations manager but it gave me a different error,

full error posted below for X86

System.InvalidOperationException was unhandled
  Message="An error occurred creating the form. See Exception.InnerException for details.  The error is: Failed to initialize activation context"
  Source="test1"
  StackTrace:
       at WindowsApplication1.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
       at WindowsApplication1.My.MyProject.MyForms.get_Form1()
       at WindowsApplication1.My.MyApplication.OnCreateMainForm() in C:\Users\Jarod\Documents\Visual Studio 2008\Projects\test1\test1\My Project\Application.Designer.vb:line 35
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at WindowsApplication1.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()
  InnerException: System.ComponentModel.Win32Exception
       Message="Failed to initialize activation context"
       Source="WebKitBrowser"
       ErrorCode=-2147467259
       NativeErrorCode=2
       StackTrace:
            at WebKit.ActivationContext.Initialize()
            at WebKit.WebKitBrowser..ctor()
            at WindowsApplication1.Form1.InitializeComponent() in C:\Users\Jarod\Documents\Visual Studio 2008\Projects\test1\test1\Form1.Designer.vb:line 25
            at WindowsApplication1.Form1..ctor()
       InnerException: 


Was This Post Helpful? 0
  • +
  • -

#6 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 966
  • View blog
  • Posts: 3,721
  • Joined: 02-July 08

Re: Webkit and Gecko problem

Posted 10 February 2011 - 10:18 AM

Look specifically at the code on the lines those errors point too.
Was This Post Helpful? 0
  • +
  • -

#7 red1337  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 18-September 10

Re: Webkit and Gecko problem

Posted 10 February 2011 - 11:13 AM

I think I need to Initialize it but I have no idea how.

The other post was working off of this code

Public Sub New()
2
    InitializeComponent()
3
    AddHandler Me.Load, AddressOf Form1_Load
4
    AddHandler Me.webKitBrowser1.Navigated, AddressOf webKitBrowser1_Navigated
5
End Sub



maybe I'll see if I can get it to work
Was This Post Helpful? 0
  • +
  • -

#8 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 966
  • View blog
  • Posts: 3,721
  • Joined: 02-July 08

Re: Webkit and Gecko problem

Posted 10 February 2011 - 12:29 PM

Your not calling the new sub in your form right? That would be the reason for the inner exception.
Was This Post Helpful? 0
  • +
  • -

#9 red1337  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 18-September 10

Re: Webkit and Gecko problem

Posted 10 February 2011 - 02:10 PM

View Posthawkvalley1, on 10 February 2011 - 12:29 PM, said:

Your not calling the new sub in your form right? That would be the reason for the inner exception.

I had put any code in my form let, I wanted to get the GUI down before doing any of the coding.

A friend has a 32bit computer that they're going to let me put Visual Basic on tomorrow, I'll install it and try the dll, if it still gives me and error I'll know that it's the compatibility.
Was This Post Helpful? 0
  • +
  • -

#10 red1337  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 18-September 10

Re: Webkit and Gecko problem

Posted 11 February 2011 - 11:50 PM

I had an old copy of Windows Xp 32-bit that I installed on my 64-bit system, I got Visual Basic 2010 Express for it, loaded the webkitbrowser and put the dll in the folder and it debugged perfectly. I wanted to see if I could publish it and take it back to my 64-bit OS, long story short, didn't work on the 64bit vista but it did work on my friends 32Bit Vista and my 32Bit Xp OS on this computer.

It's definitely a problem with the dll being 32bit and not with the coding, I'll post updates if I find a work around.


Thanks for the help so far.

Any suggestions would be greatly appreciated.
Was This Post Helpful? 0
  • +
  • -

#11 red1337  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 18-September 10

Re: Webkit and Gecko problem

Posted 12 February 2011 - 12:02 PM

Moved the project to C# using the same dll and it loaded fine.

Tutorial for C# Webkit Browser posted on this site http://webkitdotnet.....net/basics.php


Thanks for the help.

This post has been edited by red1337: 12 February 2011 - 12:05 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1