> I've found some VB code to query a domain controller to return the list of
> all computers in that domain. The VB code is reasonably straightforward (see
> below). How do I do the equivalent in C++? I've done a lot of searches and
> haven't come up with much useful information. Any pointers would be
> appreciated:
check out WNetEnumResource
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wnet/wnet/enume
rating_network_resources.asp
-Vinayak
Peter Steele - 30 Jun 2004 13:20 GMT
I'd much rather use an API call than deal with Active Directory. I had
looked for something but none of my searches came up with anything. This
appears to be what I need. Thanks!
> > I've found some VB code to query a domain controller to return the list of
> > all computers in that domain. The VB code is reasonably straightforward (see
[quoted text clipped - 3 lines]
>
> check out WNetEnumResource
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wnet/wnet/enume
rating_network_resources.asp
> -Vinayak
> I've found some VB code to query a domain controller to return the list of
> all computers in that domain. The VB code is reasonably straightforward (see
> below). How do I do the equivalent in C++? I've done a lot of searches and
> haven't come up with much useful information. Any pointers would be
> appreciated:
I'm not expert at either VB or Active Directory Services but that's what I
think your snippet is using. You may want to start reading here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/activ
e_directory_service_interfaces_adsi.asp
and then perhaps find an Active Directory newsgroup for information on its
object model.
On the other hand if you are looking for an answer to the question in the
subject line then I'd suggest that you search the docs for NetServerEnum()
for the pre-AD way of enumerating the workstations in a domain.
Regards,
Will
Peter Steele - 30 Jun 2004 13:21 GMT
Two options! I'll have to check out both of these API calls and see which
suits my needs.
> > I've found some VB code to query a domain controller to return the list of
> > all computers in that domain. The VB code is reasonably straightforward
[quoted text clipped - 5 lines]
> I'm not expert at either VB or Active Directory Services but that's what I
> think your snippet is using. You may want to start reading here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/activ
e_directory_service_interfaces_adsi.asp
> and then perhaps find an Active Directory newsgroup for information on its
> object model.
[quoted text clipped - 5 lines]
> Regards,
> Will