[cvsnt] NetGetAnyDCName vs NetGetDCName

Tony Hoyle tmh at nodomain.org
Thu Feb 5 12:54:48 GMT 2004

Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.

On Thu, 5 Feb 2004 13:24:08 +0100, "Mathieu Veurman"
<MVeurman at seagull.nl> wrote:

>If I substitute NetGetAnyDCName by NetGetDCName the PDC of the
>seagullirl domain is returned and all runs well. It looks like
>NetGetAnyDCName was added in version 1.56 of win32.c without any clear
>description why. What's the drawback to replace NetGetAnyDCName by
>NetGetDCName? If there is one, why not make a combination of both? If
>the first one fails the second one still has the possibility to come up
>with a valid dc.
NetGetAnyDCName is a lot faster on large networks - it'll generally
return a local DC... for example we have two DCs one in the UK and one
in the US, connected via VPN.  In the US NetGetDCName returns the DC
in the UK, which isn't acceptable.

Unless you have a really odd configuration this function is otherwise
identical to NetGetDCName - from the description:

"The NetGetAnyDCName function returns the name of any domain
controller (DC) for a domain that is directly trusted by the specified

As long as you have a trust relationship, it'll work.


More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook