0.9b (c) 1995 Peter Childs
This function retrieves the Domain Controller Computer name. To function correctly, the administrator must be logged on to one domain only and not have any value specified in the othdomains = parameter in IBMLAN.INI.
It is recommended to use the function NetEnumerate(NETSERVER) as a replacement.
Syntax
parse value GetDCName() with MyRc dcName
Parameters
The parameters returned are:
MyRc The return code from the operation
dcName The Domain Controller Computer name
Note
The function is only capable of returning one computer name.
Example
/* Get the DC computer name */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs parse value GetDCName() with MyRc dcName if MyRc <> '0' then do say 'Could not obtain Domain Controller name' exit 9 end if dcName = '' then do say 'Could not obtain Domain Controller name' exit 9 end say 'Domain Controller Name is :' dcName call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Domain Controller Name is : \\ILIDC
Inf-HTML End Run - Successful