OPCEnumQuery()
Function for browsing registered OPC servers. This function is used for the simple OPC client configuration.
Synopsis
int OPCEnumQuery(int type, dyn_string in, dyn_string &out);
Parameters
| Parameter | Description | 
|---|---|
| type | 1 = Search for OPC servers. 2 = Search for OPCA&E-Servers. | 
| in | The host name. For searching registered OPC servers. Specifying an empty string "" will search the own host. | 
| out | List of found servers | 
Return value
If the operation has been successful, the function returns 1 otherwise, an error occurred.
Error
Description
This function searches for registered OPC servers on a specified host name. The simple OPC client configuration uses this function. For the search you can only specify one host name.
 Example
Example
The following example returns a list of installed OPC servers on the host "eiwnt160".
main()
{
  int t = 2;
  int retVal;
  dyn_string i = " eiwnt160 ";
  dyn_string o;
  retVal = OPCEnumQuery(t,i,o);
  DebugN("Return value: ",retVal,"Type: ",t,"In; ",i,"OPC A&E
  servers: ",o);
}Assignment
Miscellaneous functions
Availability
CTRL
