Basic4ppc Wine Project

joel2009

Member
Licensed User
I really want to get Basic4ppc running in linux, currently with .net installed basic4ppc runs but fails to load/show your source. After debugging, the problem seems to be with ole32.dll (while loading the text box.)

The library file ole32.dll, is required by windows and is used when performing OLE (Object Linking and Embedding) operations . OLE allows objects created in one application to be embedded in documents/objects created by a different applications e.g. embedding an Excel spreadsheet inside a Word document.

Here is the output:
B4X:
joel@joel-laptop:~$ env WINEPREFIX="/home/joel/.wine" wine "C:\Program Files\Anywhere Software\Basic4ppc Desktop\Basic4ppc Desktop.exe"
err:ole:CoGetContextToken apartment not initialised
fixme:shell:URL_ParseUrl failed to parse L"System.Windows.Forms"
fixme:shell:URL_ParseUrl failed to parse L"System"
fixme:shell:URL_ParseUrl failed to parse L"System.Drawing"
fixme:shell:URL_ParseUrl failed to parse L"ActiproSoftware.SyntaxEditor.Net20"
fixme:shell:URL_ParseUrl failed to parse L"ActiproSoftware.WinUICore.Net20"
fixme:shell:URL_ParseUrl failed to parse L"ActiproSoftware.Shared.Net20"
fixme:win:EnumDisplayDevicesW ((null),0,0x32d114,0x00000000), stub!
fixme:shell:URL_ParseUrl failed to parse L"Dbasic.resources"
fixme:shell:URL_ParseUrl failed to parse L"Dbasic.resources"
fixme:shell:URL_ParseUrl failed to parse L"System.Deployment"
fixme:shell:URL_ParseUrl failed to parse L"System.Xml"
fixme:shell:URL_ParseUrl failed to parse L"System.Design"
fixme:imm:ImmReleaseContext ((nil), 0x1b4890): stub
fixme:shell:URL_ParseUrl failed to parse L"ActiproSoftware.WinUICore.Net20.resources"
fixme:shell:URL_ParseUrl failed to parse L"ActiproSoftware.WinUICore.Net20.resources"

The output gives an error with CoGetContextToken which is associated with ole32.dll


Replacing the dll with the windows system dll causes wine to crash, so i'm now at a loss for what to do next.
 

joel2009

Member
Licensed User
More research reveals Basic4ppc calls the following resources on start up:

actiprosoftware.shared.net20
actiprosoftware.syntaxeditor.net20
lcsharpcode.sharpziplib
mscorelib
system
system.data
system.drawing
system.window.forms
system.xml

Something is wrong with parsing. I dont think wine is calling the dll's to load at the proper times to invoke basic4ppc's methods.
 

agraham

Expert
Licensed User
I know little to nothing about wine but as all those are managed assemblies I would expect their loading to be controlled by the .NET CLR and not by the OS.

I suspect the key is this "err: ole:CoGetContextToken apartment not initialised" which looks like a COM failure. It would seem that whichever wine version you are using cannot properly host the CLR. Are you using mono?

It may not help but someone at post #5 here WineHQ Forums View topic - Burraconline not start! has experienced the same error.
 

joel2009

Member
Licensed User
I have .net installed up to version 3.0 under wine, and yes i have tried mono.
Mono is only a replacement for the .net assemblies though, and lacks system dlls. Under mono GDI does not even load. I did see the link you posted before when researching, but since then .Net compatibilty has increased and newer versions of wine have been released. Since other forms are loading, i wonder if it may be a font issue. Like i said before the entire program loads minus the main form where you edit the code. I have gone as far as decompiling B4ppc to try and further understand what is broken under wine, but i don't really understand what i'm looking at. I can only recognize resources that are being called.

You may be correct about basic4ppc not calling any system files directly, but the dll's basic4ppc access may access system information sometimes from what i understand. However things may be getting called... debugging shows they are, so i don't know how else that may be argued. (by system i mean several dll's in the system32 folder of windows)

Right now i'm trying to figure out if the problem lies within the dll's themselves or the linux kernel.

Thanks for the help Agraham,

Joel


Edit: For got to mention COM. From the website- "OLE32, OLEAUT32, RPCRT4 - COM and DCOM are implemented here."
Found out Ole32 is a dll that is not replacable, you have to patch the wine dll provided.
 
Last edited:
Top