Stores all servers of the specified type that are visible in a domain into an array.

ANetServers(cArrayName [, nServerType [, nLevel [, cDomain]]])

Parameters

cArrayName

if nLevel = 1

the array contains the following information from the SERVER_INFO_101 structure.
ColumnContentDatatype
1Platform IDN
2The name of a server.C
3The major version number and the server type.N
4The minor release version number of the operating system.N
5The type of software the computer is running.N
6A comment describing the server.C


if nLevel = 2

the array contains the following information from the SERVER_INFO_100 structure.
ColumnContentDatatype
1Platform IDC
2The name of a server.C
nServerType (optional)

default = SV_TYPE_SERVER

A value that filters the server entries.
For a list of possible values have a look at the NetServerEnum documentation.

nLevel (optional)

default = 1

1 or 2.

cDomain (optional)

default = NULL

The name of the domain for which a list of servers is to be returned.
The domain name must be a NetBIOS domain name (for example, microsoft).
The ANetServers function does not support DNS-style names (for example, microsoft.com).

Return Value

The number of servers.

See Also

Reference

AbortUrlDownloadToFileEx
AIpAddresses
ANetFiles
GetServerTime
IcmpPing
Ip2MacAddress
ResolveHostToIp
SyncToSNTPServer
UrlDownloadToFileEx

Used WinApi functions

NetServerEnum