How to get started with ... everything?

Moderators: LCMark, LCfraser

SparkOut
Posts: 2020
Joined: Sun Sep 23, 2007 4:58 pm

Re: How to get started with ... everything?

Post by SparkOut » Wed Sep 25, 2019 3:06 pm

LCMark wrote:
Wed Sep 18, 2019 6:22 pm
@SparkOut : 64-bit windows processes cannot load 32-bit DLLs (and vice-versa) - so (as you already figured out) you need to include the 64-bit version of the DLL in the relevant code folder to work with the 64-bit engine.

The subsequent error would appear to be a bug in the LCB VM - try a version of your LCB file but without the "!<callconv>" at the end of each binding string. e.g.

Code: Select all

private __safe foreign handler _OpenDevice(in pCardAddress as CInt) returns CInt binds to "c:K8055D>OpenDevice!stdcall"
=>
private __safe foreign handler _OpenDevice(in pCardAddress as CInt) returns CInt binds to "c:K8055D>OpenDevice"
64-bit Win32 only has a single calling convention (as opposed to 32-bit Win32 having half-a-dozen); so the VM should be ignoring it (so that you can use the same binding strings with 32-bit and 64-bit versions of the same DLL) - however my guess would be that it isn't currently...

Note: Doing the above will cause the LCB file to not work with 32-bit Windows, so this is just to check my hypothesis is correct rather than a viable solution - if the above does fix it, then it should be easy to fix in the engine for the upcoming 9.5 maintenance release.
@LCMark
I have returned and tested and can confirm that removing the !stdcall from the binding strings works on Windows x64 with LC 9.5 now. You were right (as we expect no less!)

Post Reply

Return to “LiveCode Builder”