Important: The information in this document is obsolete and should not be used for new development.
ASPCloseSession
TheASPCloseSession
function closes the session that you identify.
FUNCTION ASPCloseSession (thePBptr: XPPParmBlkPtr; async: Boolean): OSErr;
thePBptr
- A pointer to an XPP parameter block.
async
- A Boolean that specifies whether the function should be executed asynchronously or synchronously. Specify
TRUE
for asynchronous execution.
Field Description
sessRefnum
- A unique number that the .XPP driver assigned to this session when you called the
ASPOpenSession
function to open the session.DESCRIPTION
To close a single session, you pass the session's reference number to theASPCloseSession
function in thesessRefnum
field. The session reference number
is the number that the .XPP driver assigns to the session and returns to you in thesessRefnum
field when you open a session using theASPOpenSession
function. TheASPCloseSession
function cancels any function calls that are pending for the session, closes the session, and calls the attention routine for the session, if there is one, with
an attention code of 0 to indicate that the session is closed.Note that there are other ways in which a session can be closed: for example, ASP closes a session when one end of the session fails. A session remains open until it is explicitly terminated by either the ASP workstation application or the ASP server or until one of the session's ends fails or becomes unreachable.
SPECIAL CONSIDERATIONS
Note that you must provide the .XPP driver reference number as an input parameter
to this function. You can obtain the driver reference number by calling the Device Manager'sOpenDriver
function.ASSEMBLY-LANGUAGE INFORMATION
To execute theASPCloseSession
function from assembly language, call the_Control
trap macro with a value ofcloseSess
in thecsCode
field of the parameter block. You must also specify the .XPP driver reference number. To execute the_Control
trap asynchronously, include the value,ASYNC
in the operand field.RESULT CODES
aspParamErr -1070 You specified an invalid session reference number,
or the session has been closedaspSessClosed -1072 The .XPP driver is in the process of closing down
the sessionSEE ALSO
You can call theASPCloseAll
function, described next, to cancel all active ASP sessions on your node. Note that you should use theASPCloseAll
function cautiously as applications and processes other than your own that are running on the same node could be using ASP sessions.