DANSrvAE Reference
ServerInstancesChange Method
See Also  Send comments on this topic.
NSPlugin Assembly > NSPlugin Namespace > GenericServer 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 Function ServerInstancesChange( _
   ByVal action As Integer, _
   ByVal instanceHandle As Integer _
) As Integer
C# 
public 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

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

© 2004-2017 Advosol Inc. All Rights Reserved.