Platform SDK: Network Management |
The NetUseDel function ends a connection to a shared resource.
Win32-based applications can also use the WNetCancelConnection2 function to terminate a network connection.
No special group membership is required to call the NetUseDel function. This function cannot be executed on a remote server.
NET_API_STATUS NetUseDel ( LPWSTR UncServerName, LPWSTR UseName, DWORD ForceCond );
Value | Meaning |
---|---|
USE_NOFORCE | Fail the disconnection if open files exist on the connection. |
USE_FORCE | Fail the disconnection if open files exist on the connection. |
USE_LOTS_OF_FORCE | Close any open files and delete the connection. |
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value is a Win32 API error code. For a list of error codes, see Error Codes.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Unsupported.
Header: Declared in Lmuse.h; include Lm.h.
Library: Use Netapi32.lib.
Network Management Overview, Network Management Functions, Use Functions, NetUseAdd, WNetCancelConnection2