NetSessionDel  1V2FXS3 

The NetSessionDel function ends a session between a server and a workstation.

Security Requirements

Only members of the Administrators or Account Operators local group can successfully execute NetSessionDel.

NET_API_STATUS NetSessionDel(

    LPTSTR servername,

 

    LPTSTR UncClientName,

 

    LPTSTR username,

 

   );

 

 

Parameters

servername

Pointer to a Unicode string containing the name of the remote server on which the function is to execute. A NULL pointer or string specifies the local computer.

UncClientName

Pointer to a Unicode string containing the computer name of the client to disconnect. If UncClientName is NULL, then all the sessions of the user in username will be deleted on the server specified.

username

Pointer to a Unicode string containing the name of the user whose session is to be terminated. A NULL pointer indicates that all users  sessions from the client name specified are to be terminated.

 

See Also

NetSessionEnum, NetSessionGetInfo