I need to make a call to a function in an external DLL and I have not managed to find out of which way to do it, if they have some information please send to eperez@coincaint.com
Hi,
There are two functions in FoxTools that allow you to do this.
Unfortunately FoxTools isn't documented in the online help, it's in a ReadMe file; and the readme file is hidden in a zipped file in the Goodies subdirectory...
Having unzipped it all you will find:
\fpw26\goodies\foxtools\foxtools.wri
... which opens with the description of RegFn & CallFn. The directory also contains a few examples - and if you read the thread of yesterday about 'CallFn("GetPrivateProfileString" .. not working', you'll see how to do it wrong, too :-(
Finally you will need documentation for your DLL to tell you what parameters it takes and what return type it gives.
Also, if you are running under a 32-bit OS (basically not Win 3.x), you may want to call a 32-bit .DLL. Unfortunately in this case you can't use a "simple" Foxtools call. However there is a possible solution. Go to Rick Strahl's site
and get Call32 - it allows you to call Win32 functions from FoxPro 2.x. I've had success with this routine for some API calls, but others "hung" the system <s>.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.