As long as it is a 16 bit .DLL, you can most likely use it. I haven't been able to use a 32 bit .DLL without running into issues, but that's not to say it can't be done.
Anyway, there are several steps involved with calling an external .DLL with Fox, but here is a quick tutorial that may help.
First, you have to use foxtools to enable the functionality with:
SET LIBRARY TO foxtools
Then, you must also make availbale to Fox, whatever library you want to use. To do that, you also use SET LIBRARY TO. As an example:
SET LIBRARY TO SomeDLL.DLL
Then you have to declare each function within the .DLL you want to call to Fox, as well as define the parameters. There is a 3rd party library I use for serial communications, and in order to use a comm port it must first be opened. This is how I declare the 'OpenComm' function:
opencomm =
regfn("OpenComm", "CII", "I")
where OpenComm is the function, "CII" are the (character, integer, integer) parameters passed TO the function, and the last "I" is the (integer) return value.
Next, you call the function using something like:
out_com =
callfn(
opencomm , 3, 100, 100)
where 3 is the comm port. 100 and 100 aren't important right now, but I believe they are the input and output buffer sizes. out_comm will contain the return value if the function completes successfully.
-Dave Summers-
![[cheers] [cheers] [cheers]](/data/assets/smilies/cheers.gif)
Even more Fox stuff at: