[DllImport("netapi32.dll", SetLastError=true)]
static extern TODO NetFileClose(TODO);
Declare Function NetFileClose Lib "netapi32.dll" _
ByVal servername As String, _
ByVal fileid As Integer) As Integer
None.
Definition from the API
'NET_API_STATUS NetFileClose(
' LPWSTR servername,
' DWORD fileid
');
See NetFileEnum for how to get the fileid
If MsgBox("Are you sure you want to disconnect this resource?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
NetFileClose(strServerName, fileid)
End If
Do you know one? Please contribute it!