public bool NetUseDelete() { uint returncode; try { returncode = NetUseDel(null, sUNCPath, 2); iLastError = (int)returncode; return (returncode == 0); } catch { iLastError = Marshal.GetLastWin32Error(); return false; } }