/// <summary> /// 打开链接 /// </summary> /// <returns></returns> public void Open() { if (string.IsNullOrEmpty(_userName)) { return; } uint resault = FileAPI.WNetAddConnection(_userName, _password, _fileRoot, null); }
/// <summary> /// 关闭连接 /// </summary> public void Close() { if (string.IsNullOrEmpty(_userName)) { return; } uint resault = FileAPI.WNetCancelConnection(_fileRoot, 1, true); //取消映射 }