Returns the domain controller for a domain.
wntGetDc(server-name, domain-name, flag)
(s) server-name: the UNC name of the server on which the function will execute (eg, "\\MYSERVER"), or a blank string ("") to indicate the current machine.
(s) domain-name: is the name of a domain, or a blank string ("") to indicate the primary domain.
(i) flag: (see below)
(s) Returns a domain controller name in UNC format (eg, "\\MYSERVER").
"flag" can be one of the following:
Flag |
Meaning |
0 |
Return any domain controller for the specified domain
This will get the name of any domain controller for "domain-name" that is directly trusted by "server-name". "server-name" must be part of a domain (it cannot be a standalone computer). If "server-name" is a Windows NT Workstation that is a member of a domain or a Windows NT Server member, "domain-name" must be in the same domain as "server-name". If "server-name" is a Windows NT Server domain controller, "domain-name" must be one of the domains trusted by the domain for which the server is a controller. The domain controller that this call finds has been operational at least once during this call.
|
1 |
Return the primary domain controller for the specified domain
|
; Load Appropriate Extender AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')
dc = wntGetDc( "", "WorkGrp", 1) Message("Primary Domain controller for Workgrps",dc) Exit