Hi!
I use this API:
Declare Function WNetAddConnection Lib "MPR.DLL" Alias "WNetAddConnectionA" (ByVal lpszNetPath As String, ByVal lpszPassword As String, ByVal lpszLocalName As String) As Long
Declare Function WNetCancelConnection Lib "MPR.DLL" Alias "WNetCancelConnectionA" (ByVal lpszName As String, ByVal bForce As Long) As Long
And i use this in the code:
G1 = WNetAddConnection(share_path1, "", "G:")
K1 = WNetAddConnection(share_path3, "", "K:")
The problem is that if I try to connect i get an error.
If I first manuelly connect to a different drive on the same server and then run my program it works.
help me, please !!
I use this API:
Declare Function WNetAddConnection Lib "MPR.DLL" Alias "WNetAddConnectionA" (ByVal lpszNetPath As String, ByVal lpszPassword As String, ByVal lpszLocalName As String) As Long
Declare Function WNetCancelConnection Lib "MPR.DLL" Alias "WNetCancelConnectionA" (ByVal lpszName As String, ByVal bForce As Long) As Long
And i use this in the code:
G1 = WNetAddConnection(share_path1, "", "G:")
K1 = WNetAddConnection(share_path3, "", "K:")
The problem is that if I try to connect i get an error.
If I first manuelly connect to a different drive on the same server and then run my program it works.
help me, please !!