Server Functions

The server functions perform administrative tasks on a local or remote server. The server functions are:

·NetServerDiskEnum retrieves a list of local disk drives on a server.

·NetServerEnum lists all visible servers of specified types in the specified domain.

·NetServerGetInfo retrieves information about a specified server.

·NetServerSetInfo sets the operating parameters for a server.

Any user or application with admin group membership on a local or remote server can perform administrative tasks on that server to control its operation, user access, and resource sharing. The low-level parameters that affect a server's operation can be examined and modified by calling NetServerGetInfo and NetServerSetInfo.

You can examine and modify certain low-level parameters that affect a server's operation, defined in the server's LANMAN.INI file by calling the NetServerGetInfo and NetServerSetInfo functions. The NetServerEnum function lists all visible servers of specified types in the specified domains. Most server category functions execute only on a remote server. The NetServerEnum function can execute on either a local workstation or remote server, but all other server category functions executed on a local workstation return NERR_RemoteOnly.

The LAN Manager 2.x server API included several fields that logically belong to other LAN Manager services and core Windows NT components. For this reason, the server information levels available in LAN Manager 2.x are no longer available in Windows networking functions. The server-specific information is available at the following levels, starting at base level 100:

SERVER_INFO_100
SERVER_INFO_101
SERVER_INFO_102
SERVER_INFO_402

SERVER_INFO_403
SERVER_INFO_502
SERVER_INFO_503
SERVER_INFO_1501
SERVER_INFO_1502
SERVER_INFO_1503
SERVER_INFO_1506
SERVER_INFO_1509
SERVER_INFO_1510
SERVER_INFO_1511
SERVER_INFO_1512
SERVER_INFO_1513
SERVER_INFO_1515
SERVER_INFO_1516
SERVER_INFO_1518
SERVER_INFO_1523
SERVER_INFO_1528
SERVER_INFO_1529
SERVER_INFO_1530
SERVER_INFO_1533
SERVER_INFO_1534
SERVER_INFO_1535
SERVER_INFO_1536
SERVER_INFO_1538
SERVER_INFO_1539
SERVER_INFO_1540
SERVER_INFO_1541
SERVER_INFO_1542
SERVER_INFO_1544
SERVER_INFO_1550
SERVER_INFO_1552

The following structures are supported on LAN Manager 2.x systems as well:

SERVER_INFO_1005
SERVER_INFO_1010

SERVER_INFO_1016

SERVER_INFO_1017

SERVER_INFO_1018

SERVER_INFO_1107

For NetServerSetInfo, parmnum values refer to the members of the SERVER_INFO structures as follows. These values are used when indicating an error in a specific parameter through parm_err.

parmnum value Member of SERVER_INFO structure
SV_NAME_PARMNUM sv_name
SV_VERSION_MAJOR_PARMNUM sv_version_major
SV_VERSION_MINOR_PARMNUM sv_version_minor
SV_TYPE_PARMNUM sv_type
SV_COMMENT_PARMNUM sv_comment
SV_USERS_PARMNUM sv_users
SV_DISC_PARMNUM sv_disc
SV_HIDDEN_PARMNUM sv_hidden
SV_ANNOUNCE_PARMNUM sv_announce
SV_ANNDELTA_PARMNUM sv_anndelta
SV_USERPATH_PARMNUM sv_userpath
SV_ULIST_MTIME_PARMNUM sv_ulist_mtime
SV_GLIST_MTIME_PARMNUM sv_glist_mtime
SV_ALIST_MTIME_PARMNUM sv_alist_mtime
SV_ALERTS_PARMNUM sv_alerts
SV_SECURITY_PARMNUM sv_security
SV_NUMADMIN_PARMNUM sv_numadmin
SV_LANMASK_PARMNUM sv_lanmask
SV_GUESTACC_PARMNUM sv_guestacc
SV_CHDEVS_PARMNUM sv_chdevs
SV_CHDEVQ_PARMNUM sv_chdevq
SV_CHDEVJOBS_PARMNUM sv_chdevjobs
SV_CONNECTIONS_PARMNUM sv_connections
SV_SHARES_PARMNUM sv_shares
SV_OPENFILES_PARMNUM sv_openfiles
SV_SESSOPENS_PARMNUM sv_sessopens
SV_SESSVCS_PARMNUM sv_sessvcs
SV_SESSREQS_PARMNUM sv_sessreqs
SV_OPENSEARCH_PARMNUM sv_opensearch
SV_ACTIVELOCKS_PARMNUM sv_activelocks
SV_NUMREQBUF_PARMNUM sv_numreqbuf
SV_SIZREQBUF_PARMNUM sv_sizreqbuf
SV_NUMBIGBUF_PARMNUM sv_numbigbuf
SV_NUMFILETASKS_PARMNUM sv_numfiletasks
SV_ALERTSCHED_PARMNUM sv_alertsched
SV_ERRORALERT_PARMNUM sv_erroralert
SV_LOGONALERT_PARMNUM sv_logonalert
SV_ACCESSALERT_PARMNUM sv_accessalert
SV_DISKALERT_PARMNUM sv_diskalert
SV_NETIOALERT_PARMNUM sv_netioalert
SV_MAXAUDITSZ_PARMNUM sv_maxauditsz
SV_SRVHEURISTICS_PARMNUM sv_srvheuristics
SV_AUDITEDEVENTS_PARMNUM sv_auditedevents
SV_AUTOPROFILE_PARMNUM sv_autoprofile
SV_MAXWORKITEMS_PARMNUM sv_maxworkitems
SV_RAWWORKITEMS_PARMNUM sv_rawworkitems
SV_IRPSTACKSIZE_PARMNUM sv_irpstacksize
SV_SESSUSERS_PARMNUM sv_sessusers
SV_SESSCONNS_PARMNUM sv_sessconns
SV_MAXNONPAGEDMEMORYUSAGE_PARMNUM sv_maxnonpagedmemoryusage
SV_MAXPAGEDMEMORYUSAGE_PARMNUM sv_maxpagedmmeoryusage
SV_ENABLEOFTCOMPAT_PARMNUM sv_enablesoftcompat