Page 1 of 1

Trouble calling a DLL

Posted: Fri May 25, 2018 9:20 pm
by milfredo
I am writing a program using Liberty Basic and thought I'd see how things might be using LBB.

Here is a snippet of code....

Open "IsFile32.dll" For DLL As #ff
CallDLL #ff, "IsFile",temp$ As ptr, result As long
close #ff

I get an error code when I try and run the program, saying that the DLL is not available. I put the IsFile32.dll in the same folder as the LBB application. So not sure what the problem happens to be.

Any help would be appreciated.

Milfredo

Re: Trouble calling a DLL

Posted: Wed Jun 20, 2018 5:59 pm
by Ivega718
You can explicitly put the path and file of DLL and test. May be this can help.

Sample:

Open "C:\BBCBASIC\LIB\IsFile32.dll" FOR DLL AS #FF

Re: Trouble calling a DLL

Posted: Wed Jun 20, 2018 6:09 pm
by Ivega718
Also you can test with BBC BASIC code in LBBOOSTER:

Code: Select all

!SYS "LoadLibrary", "IsFile32.dll" TO MyDll%
!PRINT MyDll%
!ff=MyDll%
ff now have the MyDll% value in LBB

If MyDll% return a number more great than 0 then DLL is load