|
-
Aug 13th, 2001, 01:54 PM
#1
Thread Starter
Hyperactive Member
DsGetDcName
Return Values
If the function returns domain controller information, the return value is NO_ERROR.
If the function fails, the return value can be one of the following error codes.
ERROR_INVALID_DOMAINNAME
The format of the specified DomainName is invalid.
ERROR_INVALID_FLAGS
The Flags parameter has conflicting or superfluous bits set.
ERROR_NOT_ENOUGH_MEMORY
Insufficient memory is available.
ERROR_NO_SUCH_DOMAIN
No DC is available for the specified domain or the domain does not exist.
Remarks
The DsGetDcName function is sent to the Netlogon service on the remote computer specified by ComputerName. If ComputerName is NULL, the function is processed on the local computer.
DsGetDcName does not require any particular access to the specified domain. By default, this function does not ensure that the returned domain controller is currently available. Rather, the caller should attempt to use the returned domain controller. If the domain controller is not available, the caller should repeat the DsGetDcName function, specifying the DS_FORCE_REDISCOVERY flag.
DSClient for Windows 95/98: The DsGetDcName function is exported from Logonsrv.dll. There is no corresponding library file. Note that this differs from Windows 2000, in which DsGetDcName is exported by Netapi32.dll and the library file is Netapi32.lib.
------------------------------------------------------
This function returns the default name of the domain controller.
Does anyone know this function in visual basic?
I need to get the name of the domain controller in windows 2000 adv. server.
thx, vbzero
-
Aug 13th, 2001, 02:18 PM
#2
If you read over the constants list, you'll se how to use this code to find just a domain controller
http://www.mvps.org/vbnet/code/netwo...verenumver.htm
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|