I thought the  NetGetJoinInformation() function might provide the name of the AD Domain a Workstation is a member of but it only provides the domain name in pre-windows 2000 (Netbios) format.  
For example if the full name of the AD domain is TestDomain.Lan then NetGetJoinInformation() returns TESTDOMAIN as the domain name.  
Need a function that works on W2K & XP without .Net