The Client Management ActiveX control contains the CloseSession method:

 

 

Purpose

CloseSession requests the closing of a nominated client session.
 

Syntax

#Retval  = ObjectTagName.CloseSession( ParmMap )

Operation

ObjectTagName is an object expression that evaluates to the ClientManagement control.

ParmMap is a PROIV Interface map.

hTargetSession is the session identifier.

Remarks

If the method succeeds, it returns zero. If the function fails, it returns a non-zero error code. By reading the ErrorString property, you can obtain a user-friendly description of the error.

The Session Identifier must be a value returned from a earlier call to NewSession. If a value is passed that does not identify an active child session, then no error will be raised. If the session identifier is to an active session then an error event can be raised during the child session's closure process.

The closing process happens asynchronously. The CloseSession() method initiates the closing process. If successful, the SessionTerminated event is fired. If the closing process fails, the SessionError() event is fired with an error value.   

Errors that occur after the immediate return can be detected by reading the Error property.

This method should not be called within the SessionTerminated and SessionError event handlers.   

Example

 

Comment on this topic

Topic ID: 500454