Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List of Servers
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00936484
Message ID:
00936587
Views:
36
API function NetServerEnum lists all servers of the specified type that are visible in a domain:
DECLARE INTEGER NetServerEnum IN netapi32;
	INTEGER servername, INTEGER level, INTEGER @ bufptr,;
	INTEGER prefmaxlen, INTEGER @ entriesread, INTEGER @ totalentries,;
	INTEGER servertype, INTEGER domain, INTEGER resume_handle
Parameter servertype can be one or more of the following values:
#DEFINE SV_TYPE_WORKSTATION         1
#DEFINE SV_TYPE_SERVER              2
#DEFINE SV_TYPE_SQLSERVER           4
#DEFINE SV_TYPE_DOMAIN_CTRL         8
#DEFINE SV_TYPE_PRINTQ_SERVER     512
#DEFINE SV_TYPE_SERVER_UNIX      2048
#DEFINE SV_TYPE_SERVER_NT      0x8000
#DEFINE SV_TYPE_DOMAIN_MASTER 0x80000
#DEFINE SV_TYPE_WINDOWS      0x400000
#DEFINE SV_TYPE_ALL        0xFFFFFFFF
As you can see there is SV_TYPE_SQLSERVER on this list.

FoxPro code sample (members area):

Retrieving lists of servers of the specified type that are visible in the primary domain (WinNT only)
http://www.news2news.com/vfp/?example=165&function=252

MSDN link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netserverenum.asp
Previous
Reply
Map
View

Click here to load this message in the networking platform