ConnectUNCWithCredentials.UNCAccessWithCredentials.NetUseDelete C# (CSharp) Method

NetUseDelete() public method

Ends the connection to the remote resource
public NetUseDelete ( ) : bool
return bool
        public bool NetUseDelete()
        {
            uint returncode;
            try
            {
                returncode = NetUseDel(null, sUNCPath, 2);
                iLastError = (int)returncode;
                return (returncode == 0);
            }
            catch
            {
                iLastError = Marshal.GetLastWin32Error();
                return false;
            }
        }