Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than netapi32, prefix the name with the module name and a period.
''' <summary>
''' The NetSessionDel function ends a network session between a server and a workstation.
''' </summary>
''' <param name="serverName">[in] Pointer to a string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used. </param>
''' <param name="UncClientName">[in] Pointer to a string that specifies the computer name of the client to disconnect. If UncClientName is NULL, then all the sessions of the user identified by the username parameter will be deleted on the server specified by servername.</param>
''' <param name="username">[in] Pointer to a string that specifies the name of the user whose session is to be terminated. If this parameter is NULL, all users' sessions from the client specified by the UncClientName parameter are to be terminated.</param>
''' <returns>If the function succeeds, the return value is NERR_Success. If the function fails, the return value can be one of the following error codes. ERROR_ACCESS_DENIED-The user does not have access to the requested information. ERROR_INVALID_PARAMETER-The specified parameter is invalid. ERROR_NOT_ENOUGH_MEMORY-Insufficient memory is available. NERR_ClientNameNotFound-A session does not exist with that computer name.</returns>
''' <remarks>Only members of the Administrators or Server Operators local group can successfully execute the NetSessionDel function.</remarks>
<DllImport("netapi32.dll", SetLastError:=True)> Private Shared Function NetSessionDel(<MarshalAs(UnmanagedType.LPWStr)> ByVal serverName As String, <MarshalAs(UnmanagedType.LPWStr)> ByVal UncClientName As String, <MarshalAs(UnmanagedType.LPWStr)> ByVal username As String) As Integer
End Function!!!!User-Defined Types:
None.
Alternative Managed API:
Do you know one? Please contribute it!
Notes:
I don't know about the LPWStr's, they might not need to be there.
I don't know about the LPWStr's, the might not need to be there.
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).