Passing of Parameters to Visual FoxPro API Functions
Often the Visual FoxPro API routines will require parameters of a particular Visual FoxPro data structure. The following sections provide a list of Visual FoxPro data types and additional data structures. For the actual type definitions and structure definitions, refer to the Pro_ext.h file.
Visual FoxPro API Data Types
The following data types are used in Visual FoxPro API routines.
Data type | Description |
---|---|
|
The number of a line in an open file in an editing window. The first line is 1. |
|
The offset position of a character in an open file in an editing window. The offset position of the first character in the file or memo field is 0. |
|
File channel. Every file opened by Visual FoxPro, or through the API by using _FCreate( ) and _FOpen( ), is assigned an FCHAN. |
|
A 32-bit pointer to a function returning an integer. |
|
A unique identifier assigned to a single command on a menu. |
|
A unique identifier assigned to a menu. |
|
A unique identifier given to every block of memory allocated by Visual FoxPro, or allocated through the API using _AllocHand( ). It can be de-referenced to its pointer using _HandToPtr( ). |
|
Name table index. Every variable and table field's name has an entry in this table. |
|
Window handle. A unique identifier assigned to every window opened by Visual FoxPro, or opened through the API using _WOpen( ). |
Note Because FAR pointers are not appropriate for 32-bit compilers,
#define
statements in Pro_ext.h redefineFAR
,_far
, and__far
as null values.
Visual FoxPro API Data Structures
The primary data structures used in the Visual FoxPro API library are listed in the following table.
Structure | Description |
---|---|
|
A structure used to describe what the system is doing at a given time. |
|
Used in FLL libraries for communicating between Visual FoxPro and your program; not used in .ocx files. |
|
Used in FLL libraries for communicating between Visual FoxPro and your program; not used in .ocx files. |
|
A structure used to access parameter values (FLL) or Visual FoxPro variables or fields (FLL and ocx). |
|
Used in FLL libraries for communicating between Visual FoxPro and your program; not used in .ocx files. |
|
Used in FLL libraries for communicating between Visual FoxPro and your program; not used in .ocx files. |
|
A structure that defines the horizontal and vertical coordinates of a single point on the screen. Coordinates are specified in rows and columns. |
|
A structure that defines the coordinates of a rectangle on the screen. The upper-left corner of the rectangle is defined by ( top, left) and the lower-right corner is defined by ( bottom-1, right-1) . Coordinates are specified in rows and columns. |
|
A structure used to access parameter values (FLL) or Visual FoxPro variables or fields (FLL and OCX). |
See Also
Return of a Value to Visual FoxPro | Access to Visual FoxPro Variables and Fields | Accessing the Visual FoxPro API | Extending Visual FoxPro with External Libraries | Managing Memory | API Library Construction