Notification Function 0006h Destroy Session

mov bx, SessionID ;identifier for new session

les di, Service ;es:di is address of service-function handler

mov ax, 0006h ;Destroy Session

call [Notification] ;client program's notification-function handler

Destroy Session (Notification Function 0006h) notifies client programs that the task switcher is destroying a session.

Parameters

SessionID

Identifies the session to be destroyed.

Service

Points to the service-function handler for the task switcher.

Return Value

The AX register contains 0000h.

Comments

A task switcher calls Destroy Session whenever a session is being destroyed. Typically, this will occur when the program in the current session ends. However, any session manager that controls the task switcher can also provide a way for the user to destroy a session while the program is still running, or to destroy a session that is suspended. As a result, the session being destroyed is not necessarily the current session.

If any client program returns 0001h to Create Session (Notification Function 0005h), all client programs may receive a call to Destroy Session, including the program that returned 0001h. Client programs can ignore a call to Destroy Session received without a preceding call to Create Session.

The task switcher enables interrupts before calling the client program. The client program can call any MS-DOS system function. Although the client program modifies the AX register, it must preserve all other registers.

See Also

Notification Function 0005h Create Session