connect disconnect network drive
来源:互联网 发布:工行大数据案例 编辑:程序博客网 时间:2024/05/01 19:28
1. API之网络函数
WNetAddConnection 创建同一个网络资源的永久性连接
WNetAddConnection2 创建同一个网络资源的连接
WNetAddConnection3 创建同一个网络资源的连接
WNetCancelConnection 结束一个网络连接
WNetCancelConnection2 结束一个网络连接
WNetCloseEnum 结束一次枚举操作
WNetConnectionDialog 启动一个标准对话框,以便建立同网络资源的连接
WNetDisconnectDialog 启动一个标准对话框,以便断开同网络资源的连接
WNetEnumResource 枚举网络资源
WNetGetConnection 获取本地或已连接的一个资源的网络名称
WNetGetLastError 获取网络错误的扩展错误信息
WNetGetUniversalName 获取网络中一个文件的远程名称以及/或者UNC(统一命名规范)名称
WNetGetUser 获取一个网络资源用以连接的名字
WNetOpenEnum 启动对网络资源进行枚举的过程
Const NO_ERROR = 0
Const CONNECT_UPDATE_PROFILE = &H1
Private Declare Function WNetCancelConnection2 Lib "mpr.dll" Alias _
"WNetCancelConnection2A" _
(ByVal lpName As String, _
ByVal dwFlags As Long, _
ByVal fForce As Long) As Long
Private Declare Function WNetAddConnection2 Lib "mpr.dll" Alias _
"WNetAddConnection2A" _
(lpNetResource As NETRESOURCE, _
ByVal lpPassword As String, _
ByVal lpUserName As String, _
ByVal dwFlags As Long) As Long
ErrInfo = WNetAddConnection2(NetR, Text1(3).Text, Text1(2).Text,
CONNECT_UPDATE_PROFILE)
If ErrInfo = NO_ERROR Then
MsgBox "网络驱动器映射成功!", vbInformation, "映射"
Else
MsgBox "ERROR: " & Str(ErrInfo) & " - 网络驱动器映射失败!", _
vbExclamation, "映射"
End If
Dim ErrInfo As Long
Dim strLocalName As String
strLocalName = Text1(4).Text
ErrInfo = WNetCancelConnection2(strLocalName, CONNECT_UPDATE_PROFILE,
False)
If ErrInfo = NO_ERROR Then
MsgBox "成功断开驱动器映射!", vbInformation, "断开"
Else
MsgBox "ERROR: " & Str(ErrInfo) & " - 驱动器断开失败!", _
vbExclamation, "断开"
End If
- connect disconnect network drive
- map network drive issues
- Mounting Network Drive Ubuntu 8.04
- Quartz.Net Client Connect/Disconnect from Remote server.
- How to use adb to connect/disconnect device
- Solaris下如何map network drive
- connect: network is unreachable
- connect: network is unreachable
- WSH Logon Script for mapping user network drive
- drive test (network optimization) software list and brief introduction
- npm ERR! network connect ETIMEDOUT
- centos7 connect: Network is unreachable
- Can not connect to your phone. Disconnect it, restart it, then try connecting again
- [WFD] WFD 连接做connect和disconnect,手机概率性的没有反应以及重启
- Oracle Data Guard 主库报--RFS Possible network disconnect with primary database
- Oracle Data Guard 主库报--RFS Possible network disconnect with primary database
- sql Connect:Network error IOException:Connection refused:connect
- [Network]Android N 新wifi connect&auto connect流程分析
- 几种DC及区别
- 最近状况
- 回家
- oracle9i学习笔记,基本题目及答案!
- 打包,并自动安装SQL数据库
- connect disconnect network drive
- 转正后第一份薪水
- sql 标识列
- vb6.0打包错误一览
- 龙芯软件开发(23)-- PCI设备初始化
- 【eval()函数】
- 呵呵。别出心裁的禁止窗体移动。(C++)
- 由对BLOB数据的操作所引发的一系列思考
- jsp上传文件