wntServiceInf

Returns information about a server's type.

Syntax:

wntServiceInf(server-name)

Parameters:

(s) server-name: the UNC name of a server (eg, "\\SERVER1"), or a blank string ("") to indicate the local machine.

Returns:

(i) a bitmask indicating the type of server, or 0 on error. The individual flag bits in the bitmask can be extracted using the binary AND ("&") operator. See below.

Req#

Server Type

1

2

4

8

16

32

64

128

256

512

1024

2048

4096

8192

16384

32768

65536

131072

262144

524288

4194304

8388608

16777216

33554432

67108864

268435456

536870912

1073741824

-2147483648

 

All LAN Manager workstation

All LAN Manager server

Any server running with Microsoft SQL Server

Primary domain controller

Backup domain controller

Server running the timesource service

Apple File Protocol servers

Novell servers

LAN Manager 2.x Domain Member

Server sharing print queue

Server running dialin service

Xenix server

Windows NT (either workstation or server)

Server running Windows for Workgroups

Microsoft File and Print for Netware

Windows NT Non-DC server

Server that can run the browser service

Server running a browser service as backup

Server running the master browser service

Server running the domain master browser

Windows 95 or newer

Root of a DFS tree

NT Cluster

Terminal Server(Hydra)

NT Cluster Virtual Server Name

IBM DSS (Directory and Security Services) or equivalent

Return list for alternate transport

Return local list only

Domain announcement

 

Example:
; Load Appropriate Extender
AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')

servertype=wntServiceInf("\\SERVER1") title=StrCat("Server Type : ",servertype) If servertype == 0    Message("Error","There was an Error with the function wntServiceInf") Else    If (servertype & 4194304)       Message(title, "Windows 95 or newer")    Else       If (servertype & 128)          Message(title, "Novell server")       Else          If ( servertype & (8|16))             Message(title,"Primary or Backup Domain Controller")          Else             Message(title, "Other")          EndIf       EndIf    EndIf EndIf Exit
See Also:

wntServerType