Freigeben über


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
EDLINE
The number of a line in an open file in an editing window. The first line is 1.
EDPOS
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.
FCHAN
File channel. Every file opened by Visual FoxPro, or through the API by using _FCreate( ) and _FOpen( ), is assigned an FCHAN.
FPFI
A 32-bit pointer to a function returning an integer.
ITEMID
A unique identifier assigned to a single command on a menu.
MENUID
A unique identifier assigned to a menu.
MHANDLE
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( ).
NTI
Name table index. Every variable and table field's name has an entry in this table.
WHANDLE
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 redefine FAR, _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
EventRec
A structure used to describe what the system is doing at a given time.
FoxInfo
Used in FLL libraries for communicating between Visual FoxPro and your program; not used in .ocx files.
FoxTable
Used in FLL libraries for communicating between Visual FoxPro and your program; not used in .ocx files.
Locator
A structure used to access parameter values (FLL) or Visual FoxPro variables or fields (FLL and ocx).
ParamBlk
Used in FLL libraries for communicating between Visual FoxPro and your program; not used in .ocx files.
Parameter
Used in FLL libraries for communicating between Visual FoxPro and your program; not used in .ocx files.
Point
A structure that defines the horizontal and vertical coordinates of a single point on the screen. Coordinates are specified in rows and columns.
Rect
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.
Value
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