The following example shows how to create an ECLPrinterSettings object using the connection name and the connection handle.

void Sample116() {
   ECLPrinterSettings *PrSet1, *PrSet2; // Pointer to ECLPrinterSettings objects
   ECLConnList ConnList; // Connection list object

   try {
      // Create ECLPrinterSettings object for connection 'A'
      PrSet1 = new ECLPrinterSettings('A');
      // Create ECLPrinterSettings object for first connection in conn list
      ECLConnection *Connection = ConnList.GetFirstConnection();
      if (Connection != NULL) {
         PrSet2 = new ECLPrinterSettings(Connection->GetHandle()); 
         printf("PrSet#1 is for connection %c, PrSet #2 is for connection %c.\n", 
            PrSet1->GetName(), PrSet2->GetName());
      delete PrSet1;
      delete PrSet2;
   } else 
      printf("No connections to create PageSettings object.\n");
   catch (ECLErr Err) {
      printf("ECL Error: %s\n", Err.GetMsgText());
} // end sample