I am trying to programatically find the root domain name using c++. There are lots of example of how to find the domain (I am using the example referenced there) ie:
How to get Windows domain name?
The example above also mentions that it returns the Forest name but I have tested it on 3 different domains and it does not while the c# example below does:
[System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest();
Any ideas?
Thank you