Function _conSetIWArea() Foundation
Set new workarea and return the numeric identifier of the old workarea.
XPPAPIRET _conSetIWArea(int newWArea,
int *oldWArea);
This function returns NULL in case no error occured, otherwise it returns an error code (XPP_ERR_...).
This function is used to set a new workarea using its numeric identifier.
#include <windows.h>
#include "xppdef.h"
#include "xpppar.h"
#include "xppcon.h"
XPPRET XPPENTRY MyCAPIFunction(XppParamList paramList)
{ /* Declare and initialize variables */
int iOldWArea;
if(_conSetIWArea( (int)1, &iOldWArea ))
{ /* Error handling... */
}
_retnl( paramList, (LONG)iOldWArea );
}
/* Xbase++ code */
PROCEDURE Main
LOCAL aDb1Struct := { {"NR", "C", 5, 0}, ;
{"NAME", "C", 30, 0} }
LOCAL aDb2Struct := { {"NR", "C", 5, 0}, ;
{"PHONE", "C", 30, 0} }
CLS
DbCreate( "DB1", aDb1Struct )
DbCreate( "DB2", aDb2Struct )
USE DB1 NEW EXCLUSIVE
USE DB2 NEW EXCLUSIVE
? Select(), Alias()
? MyCAPIFunction()
? Select(), Alias()
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.