Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

External dll in foxpro 2.6 for Windows

Status
Not open for further replies.

pcmarket

Programmer
Feb 7, 2001
3
VE
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 &quot;simple&quot; 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 &quot;hung&quot; the system <s>.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top