Trap error: No more connections can be made to this remote computer
Posted on 2002-05-21
I am writing an application that copies certain local directories to a network share. This share is restricted to allow maximum 10 concurrent connections.
I need to trap the error that the maximum number of connections has been reached.
When i connect with Windows Explorer to the share I get the error:
"No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept."
when i connect using VB I get the error "Disk not Ready (Error 71) "
I connected by:
1. tring to open a file on the share.
2. the API function WNetAddConnection2
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
I need a connection method that will result me the proper error as Windows Explorer does.
I think this should be achieved with a API function
Can anyone help me with this?
Thanks in advance,