Platform SDK: Network Management

Session Functions

The network management session functions control network sessions established between workstations and servers. The functions require that the server service be started on the server.

The session functions are listed following.

Function Description
NetSessionDel Deletes the current connections between a workstation and server; terminates the network session.
NetSessionEnum Returns information about all current sessions established for a server.
NetSessionGetInfo Returns information about a particular session.

A session is a link between a workstation and a server. A session is established the first time a workstation makes a connection to a shared resource on the server. Until the session ends, all further connections between the workstation and the server are part of the same session. To end a session, an application on the server end of a connection calls the NetSessionDel function.

The network management session functions manage information on a per-user basis with the username parameter. Because there can be multiple users per session, this parameter is necessary to access the user-specific information for the session.

Session functions are available at five information levels:

SESSION_INFO_0
SESSION_INFO_1

SESSION_INFO_2

SESSION_INFO_10

SESSION_INFO_502

If you are programming for Active Directory™, you may be able to call certain Active Directory Service Interface (ADSI) methods to achieve the same functionality you can achieve by calling the network management session functions. For more information, see IADsSession and IADsFileServiceOperations.

Windows 95/98: The following information levels are supported on Windows 95 and Windows 98:

session_info_0
session_info_1
session_info_2
session_info_10
session_info_50