-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ole idispatch exception code 0 from fpdotnet unable to cast object from fpDotNet #20
Comments
The error is that the m.loChromium object is NULL or corrupted. |
I followed the instructions exactly as described, with the same error after un-registering and re-registering the .dll. All files are in the directory when I register the objects via regasm.exe Here is the message I receive when I register the .dll: RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications that may be installed on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re-register it. |
Your DLL library registration is OK. What value/type does the m.loChromium variable have? There may be a problem when creating the m.loChromium object and also possibly in the compatibility settings of Visual Foxpro vs. Windows. What version of Windows and Framework are you using? Please restart your Computer. |
The value it is returning is a .NULL. value. I am using windows 10, Foxpro 9 sp2. |
Start debugging in VFP9 on the line: |
Debugging shows the following:
loObject is NULL in this case. The loBridge.ErrorMessage is "Constructor on type 'CefSharp.WinForms.ChromiumWebBrowser' not found." |
Your problem is probably with the version of Cefsharp you are using. Please download the latest version of Cefsharp https://github.com/cwollenhaupt/fpCefSharp/releases/download/v97.1.61/fpCefSharp.v97.1.61.zip and then restore all files from directory \cef-bin-v97.1.61 |
There have been many changes in the v97.1.61.1 release regarding the handling of return values... Please try the latest release. If this doesn't work, please check what loBridge.cErrorMsg is. This error usually means that something happened loading the assembly. wwDotNetBridge returns a NULL value that is converted to System.DBNull through the COM InterOp layer. In other words, usually the error is something completely different like permissions on the cef-bin folder, a version conflict, or something like this. |
I struggled with this error for a while when trying to run the ShowHtml demo form directly. I dug into the CefSharp code before I realized no URL was being passed in. That passed .F. as the URL, for which no matching constructor could be found, hence the error: "Constructor on type 'CefSharp.WinForms.ChromiumWebBrowser' not found." I should have been running the demo PRGs instead. |
Here is a screenshot of the issue I am encountering.
I have tried unregistering and re-registering the fpDotNet.dll without any success.
I have also tried setting lCheckRuntime = .F. in cefsharpbrowser.prg.
I have verified that lcRuntime = This.GetInstalledVcRuntime (m.toHost) evaluates to "vc2019"
I tried this on two different systems.
Any and all help is greatly appreciated!
The text was updated successfully, but these errors were encountered: