Exemple

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

//------------------------------------------------------------------- // ECLConnection::GetName // // Find the first 3270 display connection in the current list of // all connections and display its name (session ID). //------------------------------------------------------------------- void Sample11() { 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, display the name printf("First 3270 display connection is '%c'.\n", Info->GetName()); return; } } // for printf("Found no 3270 display connections.\n"); } // end sample