network path and use of netsharecheck api....
From: N|O (foolish3_at_hotmail.com)
Date: 08/04/04
- Next message: Randy Birch: "Re: Another IP address question (how to get IP address of remote computer)"
- Previous message: Veign: "Re: how to get User's mailing program?"
- Next in thread: Randy Birch: "Re: network path and use of netsharecheck api...."
- Reply: Randy Birch: "Re: network path and use of netsharecheck api...."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 04 Aug 2004 14:50:03 GMT
hii, i have to know if a folder, situated in \\server\images (for example)
exists.
This is the vb code i use:
Private Declare Function NetShareCheck Lib "netapi32.dll" _
(ByVal ServerName As String, _
ByVal Device As String, _
ByRef ShareType As Long) As Long
Private Sub Command1_Click()
Dim SName As String
Dim SHName As String
Dim DevType As Long
Dim Ans As Long
SName = Text1.Text -->\\server name
SHName = Text2.Text -->folder to find
DevType = -1
Ans = NetShareCheck(StrConv(SName, vbUnicode), StrConv(UCase(SHName),
vbUnicode), DevType)
MsgBox Ans, , DevType
End Sub
devtype return is 0, i think maybe the server exist, but Ans return
2311...this means: NetShareCheck fails with error 2311
(NERR_DeviceNotShared) when remoted to OS/2.
How can i resolve this?
Thakns a lot
- Next message: Randy Birch: "Re: Another IP address question (how to get IP address of remote computer)"
- Previous message: Veign: "Re: how to get User's mailing program?"
- Next in thread: Randy Birch: "Re: network path and use of netsharecheck api...."
- Reply: Randy Birch: "Re: network path and use of netsharecheck api...."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|