Get information about all server instances or the requested server instance only. This information may be used to identify the client application, especially when the client application defines a name using the SetClientName OPC method.
Be aware the the client name cannot yet be defined during the instance creation (ServerInstancesChange call for creation). The client application has to call SetClientName() to define the name. The client handle is passed as an argument to the plugin methods ValidateItems and WriteItems to enable the server to allow/deny the access based on the instance information.
Visual Basic (Usage) | ![]() |
---|---|
Dim handle As Integer Dim info As ServerInstanceInfo() Dim value As Integer value = GenericServer.GetServerInstanceInfo(handle, info) |
C# | |
---|---|
public static int GetServerInstanceInfo( int handle, out ServerInstanceInfo[] info ) |
Parameters
- handle
- Handle of the server instance or 0 for all instances
- info
- Current server instance data. The array lenght is 0 if the requested instance doesn't exist.
Return Value
Error/success codeTarget Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2