DANSrv Reference
ServerInstancesChange Method
See Also  Send Feedback
NSPluginNet4 Assembly > 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 (Usage)Copy Code
Dim instance As AppPlugin
Dim action As Integer
Dim instanceHandle As Integer
Dim value As Integer
 
value = instance.ServerInstancesChange(action, instanceHandle)
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 creatioon of a new server instance, an error code to prevent it.

Requirements

Target 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

See Also

© 2002-2017 Copyright Advosol Inc. All Rights Reserved.