Session Support

[Netbios is not supported on Windows Vista, Windows Server 2008, and subsequent versions of the operating system]

The following are the session support commands:

  • NCBCALL (call)
  • NCBHANGUP (hang up)
  • NCBLISTEN (listen)
  • NCBSSTAT (session status)

The NCBCALL and NCBLISTEN commands establish a session between processes. One process issues the NCBLISTEN command to prepare to open a session. The other process issues the NCBCALL command to open the session. The remote computer must have an NCBLISTEN command pending. When the session is established, the NCBLISTEN command is completed and the calling process receives a local session number and the name of the remote session partner. In addition, the NCBCALL command is completed and the calling process receives a local session number in the ncb_lsn member of the NCB structure. The process of establishing a session is shown in the following illustration.

 

Bb870916.netbios4(en-us,VS.85).png

 

The NCBSSTAT command obtains the status of any sessions that were opened using the specified name. The ncb_buffer member receives a SESSION_HEADER structure, followed by one or more SESSION_BUFFER structures. The process of obtaining the session status is shown in the following illustration.

 

Bb870916.netbios8(en-us,VS.85).png

 

The NCBHANGUP command closes the session identified by the specified local session number, as shown in the following illustration.

 

Bb870916.netbios9(en-us,VS.85).png

 

This example assumes that there are NCBRECVANY commands pending on both computers.

 

 

Send comments about this topic to Microsoft

Build date: 7/2/2010

Show: