When you create each of the connections you should be specifying a unique connection handle for each and a callback function to be called (they can actually use the same callback function) when you call DS_Open for each. Your callback function will have the form:
static void CVICALLBACK OurDSCallback (DSHandle dsHandle, int event,
void *callbackData);
and since this callback function will be called for all events that happen to the connection and will specify which connection fired the event in the dsHandle parameter you will know exactly which connection caused the "event" to happen that made the callback function execute. The event of interest in this case is DS_EVENT_STATUSUPDATED, and to check what the actual status is for this instance of the callback fu
nctions execution you can call the DS_GetStatus function to see if the connection is now in a DSConst_Unconnected state.
To view further information about this, look at the CVI function help for DS_Open and DS_GetStatus as well as the MultiOPCClient.prj example in the cvi\samples\datasocket\multiopcclient directory for an example that shows how to use one callback for multiple connections (note this is connecting to an opc server and not a datasocket server).
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask