From: Kerem Gümrükcü on
Hi,

you can use WMI or LDAP for that (lots of examples in the WWW available!)
But another way is using NetServerEnum(...) with 7th parameter given the
constant SV_TYPE_DOMAIN_ENUM, that wil give you a complete list with
workgroups or domains, depending on what kind of network you are running.
Another approach is using LsaEnumerateTrustedDomains(...) or using the
WNetOpenEnum(...) and WNetEnumResource(....), but NetServerEnum is the
easiest to use,..

Hope this helps someone some day,...

Regards

Kerem

--
-----------------------
Beste Gr�sse / Best regards / Votre bien devoue
Kerem G�mr�kc�
Latest Project: http://www.pro-it-education.de/software/deviceremover
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------

"Kerem G�mr�kc�" <kareem114(a)hotmail.com> schrieb im Newsbeitrag
news:OEyDEJjfKHA.6096(a)TK2MSFTNGP02.phx.gbl...
> Hi,
>
> the topic say it all: I am looking for a windows api that
> can list me all domains/workgroups in the network.
> The api schould not be based on WMI, since WMI
> is not that fast sometimes,...
>
> Thanks in advance,...
>
> Regards
>
> Kerem
>
> --
> -----------------------
> Beste Gr�sse / Best regards / Votre bien devoue
> Kerem G�mr�kc�
> Latest Project: http://www.pro-it-education.de/software/deviceremover
> Latest Open-Source Projects: http://entwicklung.junetz.de
> -----------------------