Enumerating domains in a forest (windows networks) <p>I looking for an API method that retrieve the info that "net view /domain" does. namely, I'm looking for a way to enumerate the visible domains within a forest, using win32api (in C environment) </p> <p>thanks.</p> <p><strong>Update:</strong> it seems that <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms675976%28v=vs.85%29.aspx" rel="nofollow">DsEnumerateDomainTrusts</a> can do what I need, however, it doesn't looks like net.exe importing it, so I'd still like to know of other options.</p> <p><strong>Update2:</strong> as it's name imply, the function only enumerate trusted domain, even when DS_DOMAIN_IN_FOREST is specified, so I'm in square 1.</p>