Function _conSetIWArea() Foundation

Set new workarea and return the numeric identifier of the old workarea.

Syntax
XPPAPIRET _conSetIWArea(int newWArea,
                        int *oldWArea);
Parameters
int newWArea
The integer variable newWArea contains the numeric identifier of the new workarea.
int* oldWArea
The address of an integer variable that is to contain the numeric identifier of the old workarea.
Return

This function returns NULL in case no error occured, otherwise it returns an error code (XPP_ERR_...).

Description

This function is used to set a new workarea using its numeric identifier.

Examples
#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 
Feedback

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.