Microsoft KB Archive/99553

{| The information in this article applies to:
 * width="100%"|
 * Microsoft Visual FoxPro for Windows, versions 3.0, 5.0
 * Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SUMMARY
Communication ports cannot be opened in FoxPro for Windows using low-level file functions; this will always return a negative result. This type of functionality can only be accomplished by making calls to the Windows application programming interface (API) through FoxPro by using Foxtools.fll.

NOTE: For backward compatibility, Visual FoxPro still supports FOXTOOLS.FLL (included in earlier FoxPro versions), the Visual FoxPro API library that allows calls to 16-bit .DLL functions. However, in Visual FoxPro, the DECLARE command is the preferred method for calling .DLL functions.

MORE INFORMATION
Foxtools.fll is an API library that allows FoxPro for Windows programs to call any Windows DLL (dynamic-link library) that supports the following criteria:


 * 1) Arguments of type integer, long, float, double, and string/buffer. These may be passed by reference or by value.
 * 2) Return types of integer, long, float, double, and string/buffer. These are returned by value only.

The following FOXTOOLS.FLL functions are used to provide this type of functionality: RegFn - Registers a function and the arguments it takes. CallFn - Calls a registered function. With the exception of RegFn and CallFn, the functions provided in FOXTOOLS.FLL are not supported by Microsoft Product Support either electronically or via telephone. NOTE: It is not possible to use a 16-bit application such as FoxPro for Windows 2.x to call a 32-bit operating system DLL such as Kernel32.dll in Windows 95 or Windows NT.