JavaScript Editor js editor     Web development 

Main Page

Returns the external error number that corresponds to the Visual FoxPro internal error number specified by code.

int _ErrorInfo(int code, char FAR *message)
int code;                     /* Internal Visual FoxPro error number. */
char FAR *message;         /* Pointer to space for an error message. */


The message parameter is a pointer to a character string that is the Visual FoxPro error message. If message isn't a null pointer, Visual FoxPro fills in the error message text associated with the external error number.

For more information on how to create an API library and integrate it with Visual FoxPro, see Accessing the Visual FoxPro API.


The following example shows the information returned by _ErrorInfo(В ).

Visual FoxPro Code

В Copy Code

C Code

В Copy Code
#include <pro_ext.h>

void putLong(long n)
   Value val;

   val.ev_type = 'I';
   val.ev_long = n;
   val.ev_width = 10;


void FAR ErrorInfo(ParamBlk FAR *parm)
   int ext;
   char FAR *message;

   if ((message =_Alloca(128)) == 0)
      _Error(182); // "Insufficient memory"
   ext = _ErrorInfo((int) parm->p[0].val.ev_long, message);

   _PutChr('\n'); putLong(ext); _PutStr(" "); _PutStr(message);

FoxInfo myFoxInfo[] = {
   {"ERRORINFO", (FPFI) ErrorInfo, 1, "I"},
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo

See Also

JavaScript Editor js editor     Web development