Download VALUES API Interface Specification Release 2 Production Version
Transcript
Deutsche Börse - Xetra
VALUES API Interface Specification Release 2
Production Version
VALUES API Usage Examples
Initiating a VALUES Session
// fill the fields of the callbackContextData-structure
// This example uses no context data
callbackContextData->custBlockSize = 0;
// call VCI_Connect
VCI_Connect
(
&reqControl,
reqData,
connectCallback,
callbackContextData,
&respData,
&statusDataGlobal
);
// Assess whether or not the connection request succeeded
switch (statusDataGlobal.complSeverity)
{
case VCI_SUCCESS: // VCI_SUCCESS = Successful completion
// return-data received
if (respData)
{
// save response-data for use in later VALUES processing
// the connection ID is stored
myConnectionID = respData.connectionID;
// retrieval of the VMQ identifier
// myVMQ may subsequently be used to register an event and
// callback for the application's Dispatch event loop
myVMQ = atoi( respData.VMQname );
// storage of the Production Mode
prodMode = respData.prodMode;
}
break;
case VCI_FATAL:
// VCI_FATAL = Fatal error has
// occured. The application should perform a shutdown.
fatality_handling(statusDataGlobal);
break;
case VCI_ERROR:
// VCI_ERROR = An error has
// been detected. The application has to perform
// error-handling processing depending on which
// completion code has been returned
error_handling(statusDataGlobal);
break;
case VCI_WARNING: // VCI_WARNING = A minor
// error occured. The application may have to
// perform error-handling processing depending on
// which completion code has been returned.
warning_handling(statusDataGlobal);
break;
}
}
// end switch
// end connect_function()
04-Dec-1997
Page 171