JavaScript Editor js editor     Web development 

Main Page

The FoxInfo structure is used to communicate function names and parameter descriptions between Visual FoxPro and your FLL library.

The following code illustrates the syntax for a FoxInfo structure:

В Copy Code
FoxInfo arrayname[ ] = {
   {funcName1, FPFI function1, parmCount1, parmTypes1}
   {funcName2, FPFI function2, parmCount2, parmTypes2}
      . . .
   {funcNameN, FPFI functionN, parmCountN, parmTypesN}

The following table describes the parameters in this structure.

Parameter Description


Specifies a variable of type FoxInfo.

You can include several FoxInfo structure lines in this array.


Contains the name that the Visual FoxPro user calls to invoke your function.


Specifies the address of your C language routine. This is the exact (case-sensitive) name you use to define your function.


Specifies the number of parameters described in the parmTypes string or one of the following flag values. The following list describes possible flag values:


    Specifies that the function cannot be called directly from Visual FoxPro.


    Specifies that the routine is to be called when the library is loaded. CALLONLOAD can't call any routine that returns results to Visual FoxPro.


    Specifies that the routine is to be called when the library is unloaded or when the Visual FoxPro QUIT command is issued. CALLONUNLOAD cannot call any routine that returns results to Visual FoxPro.


Describes the data type of each parameter.

The following lists the valid values for parmTypes.

  • " "

    No parameter.

  • "?"

    Specifies that any type can be passed. In the body of the function, you'll need to check the type of the passed parameter.

  • "C"

    Specifies a Character type parameter.

  • "D"

    Specifies a Date type parameter.

  • "I"

    Specifies an Integer type parameter.

  • "L"

    Specifies a Logical type parameter.

  • "N"

    Specifies a Numeric type parameter.

  • "R"


  • "T"

    Specifies a DateTime type parameter.

  • "Y"

    Specifies a Currency type parameter

  • "O"

    Specifies an Object type parameter

Include a type value for each parameter passed to the library. To indicate that a parameter is optional, precede it with a period (.). Only trailing parameters can be omitted.

For example, suppose you create a function that accepts a character and a numeric parameter. When you specify parmType, use "CN".

The following example FoxInfo structure defines a library with one function, which is internally named dates and externally accessed as DATES. The structure accepts one Character type parameter:

В Copy Code
FoxInfo myFoxInfo[] = {
   { "DATES", (FPFI) dates, 1, "C" }

After you compile your FLL library with this FoxInfo structure and load it in Visual FoxPro using the SET LIBRARY command, you can call this function in Visual FoxPro with the following line of code:

В Copy Code

See Also

JavaScript Editor js editor     Web development