uaPLUS Reference
ServerInstancesChange Method
See Also  Send Feedback
NSPlugin Namespace > AppPlugin Class : ServerInstancesChange Method

action
1=new DA instance is requested, 2=a DA instance terminates
3=new AE instance is requested, 4=an AE instance terminates
instanceHandle
indicates the server instance for a particular client.

Glossary Item Box

This method is called when:
a) A client connects and therefore a new server instance has to be created. If the method returns an error code then no instance is created and the client connect is failed. b) A server instance is terminating (a client disconnects). This method cannot prevent this. The call is to inform the plugin of the status change.
For a server with DA/AE functionality the configuration should define a different CLSID/ProID for DA and AE if application needs to supervise the instance creation. With the same CLSID for DA and AE on client connect an instance of each server type (DA and AE) is created and this method is called for each instance. At instance creation time it's not known what functionality the client is going to use.

Syntax

Visual Basic (Declaration) 
Public Shadows Function ServerInstancesChange( _
   ByVal action As Integer, _
   ByVal instanceHandle As Integer _
) As Integer
C# 
public new int ServerInstancesChange( 
   int action,
   int instanceHandle
)

Parameters

action
1=new DA instance is requested, 2=a DA instance terminates
3=new AE instance is requested, 4=an AE instance terminates
instanceHandle
indicates the server instance for a particular client.

Return Value

S_OK to allow the creation of a new server instance, an error code to prevent it.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family

See Also

© 2010-2018 Copyright Advosol Inc. All Rights Reserved.