Use
SAP_CMHANDLE returns the socket handle, via which the CPI-C interface reads the return codes and data from the SAP Gateway. This handle and the function SAP_CMTIMEOUT (see above) allow the CPI-C interface to be operated without blocking. The handle can, for example, be used for the function Select. This makes it possible to wait for more than one event. An event is the arrival of CPI-C data.
Integration
The function SAP_CMHANDLE can only be used in connection with the function CMINIT or CMACCP.

CM_RETCODE return_code;
CPIC_INT gwhandle;
..
SAP_CMHANDLE(&gwhandle, &return_code);
..