You need an enumeration routine...and there's just the function available in netapi32.dll. Here is the VB form:
Private Declare Function NetServerEnum Lib "netapi32" _
(ByVal servername As Long, _
ByVal level As Long, _
buf As Any, _
ByVal prefmaxlen As Long, _
entriesread As Long, _
totalentries As Long, _
ByVal servertype As Long, _
ByVal domain As Long, _
resume_handle As Long) As Long
if you want to see an example of this call in use, go to:
http://vbnet.mvps.org/index.html?code/network/netserverenum.htm
Hope this helps.
Kevin
Private Declare Function NetServerEnum Lib "netapi32" _
(ByVal servername As Long, _
ByVal level As Long, _
buf As Any, _
ByVal prefmaxlen As Long, _
entriesread As Long, _
totalentries As Long, _
ByVal servertype As Long, _
ByVal domain As Long, _
resume_handle As Long) As Long
if you want to see an example of this call in use, go to:
http://vbnet.mvps.org/index.html?code/network/netserverenum.htm
Hope this helps.
Kevin