Example
The following example shows how to use a connection name to create an ECLPS object.
//-------------------------------------------------------------------
// ECLPS::ECLPS (Constructor)
//
// Build a PS object from a name, and another from a handle.
//-------------------------------------------------------------------
void Sample58() {
ECLPS *PS1, *PS2; // Pointer to PS objects
ECLConnList ConnList; // Connection list object
try {
// Create PS object for connection 'A'
PS1 = new ECLPS('A');
// Create PS object for first connection in conn list
PS2 = new ECLPS(ConnList.GetFirstConnection()->GetHandle());
printf("PS #1 is for connection %c, PS #2 is for connection %c.\n",
PS1->GetName(), PS2->GetName());
delete PS1;
delete PS2;
}
catch (ECLErr Err) {
printf("ECL Error: %s\n", Err.GetMsgText());
}
} // end sample