Exemple

L'exemple suivant montre comment utiliser la méthode GetConnType pour renvoyer le type de connexion.

//------------------------------------------------------------------- // ECLConnection::GetConnType // // Find the first 3270 display connection in the current list of // all connections. //------------------------------------------------------------------- void Sample10() { ULONG i; // Connection counter ECLConnList ConnList; // Connection list object ECLConnection *Info=NULL; // Pointer to connection object for (i=0; i<ConnList.GetCount(); i++) { Info = ConnList.GetNextConnection(Info); if (Info->GetConnType() == HOSTTYPE_3270DISPLAY) { // Found the first 3270 display connection printf("First 3270 display connection is '%c'.\n", Info->GetName()); return; } } // for printf("Found no 3270 display connections.\n"); } // end sample