I have a commonly asked problem, but with a little twist.
I am trying to return the list of domains just like the list a user sees
in their drop down box during an NT login. I don't want to retrieve all
of the domains you'd see if you went through Network
Neighborhood/Microsoft Networking. I guess the difference between the
two is that the drop down list is the list of domains that trust you
(TRUSTING) while the other is the ones you trust (TRUSTED).
I have tried using NetServerEnum with SV_TYPE_DOMAIN_ENUM and that
returns the latter (in my case about 40). I have tried using
NetUserEnum with FILTER_INTERDOMAIN_TRUST_ACCOUNT which returns about 17
in my case. What I want is the 7 (my case) TRUSTING domains just like
the NT login drop down.
Speed is also a consideration so I don't know how much flexibility I
have to kludge/prune the list down by getting the PDC and seeing if my
domain is TRUSTED.
Am I using these functions wrong or do I want something else entirely
like with LSA functions that've been mentioned in my Deja search on this
topic? Perhaps there are other flags to the NetEnum functions that
would help?
I appreciate any responses.
Thanks,
--
>------------<
John Kane
so...@minn.net
>------------<
> I am trying to return the list of domains just like the list a user sees
> in their drop down box during an NT login.
You may want to look up NetEnumerateTrustedDomains(). Since I had, um,
mixed results with NETD(), I invite you to check the warning at
http://mvps.org/win32/network/netd.html first.
--
Cheers,
Felix.
If you post a reply, kindly refrain from emailing it, too.
Note to spammers: fel...@mvps.org is my real email address.
No anti-spam address here. Just one comment: IN YOUR FACE!
Use LSA to enumerate trusted domains just like the NT login drop down.
Microsoft has an example doing exactly what you want.
The url for that is:
http://msdn.microsoft.com/library/devprods/vs6/vc++/vcsample/vcsmpdisptrussa
mple.htm
Regards,
Guoyong
Guoyong Zhang <zh...@bluestone.com> wrote in message
news:ObVWL4Lx#GA.243@cppssbbsa03...
Actually, yes it its--the URL wrapped.
Guoyong Zhang wrote:
> Hi, John,
>
> Use LSA to enumerate trusted domains just like the NT login drop down.
>
> Microsoft has an example doing exactly what you want.
> The url for that is:
> http://msdn.microsoft.com/library/devprods/vs6/vc++/vcsample/vcsmpdisptrussa
> mple.htm
>
> Regards,
> Guoyong
-- Aaron [MVP]
---------------------
Aaron J Margosis
aaro...@erols.com
Andy Doran (andy....@dial.pipex.com) wrote:
: ...which apart from not being there anymore is in C++ not VB...
<snip>
Check the Newsgroups header. You'll find microsoft.public.vc.language
on the end of the long (*far* too long) list. Some people don't seem
to understand the idea of selecting the *most* appropriate newsgroup
rather than all that seem appropriate. This is the spammer mentality.
Ben.
--
Any opinions expressed are my own and not necessarily those of Laser-Scan.