G
Guest
Hi,
I am trying to create a multithreaded VB 2005 application which attempts to
create a new thread per Domain Controller (DC) in my environment. Each thread
connects to its allocated DC and enumerates all computer objects and extracts
the 'LastLogon' property. The results from each thread is then consolidated
so that I can get the true lastlogon date for each computer object.
However in my routine thats get actioned per thread, I have used the
following line which seems to halt each thread and doesn't progress to the
next line of code:
Dim searcher As New DirectorySearcher("LDAP://" + dc.Domain.ToString & "/" &
dc.Name)
Where dc is defined as ActiveDirectory.DomainController.
This is my method of connecting directly to a specific domain controller.
Why would this process halt when it works fine if I do not use
multithreading? Is there a better way of connecting directly to a domain
controller that would get around this problem?
Thanks,
Michael.
I am trying to create a multithreaded VB 2005 application which attempts to
create a new thread per Domain Controller (DC) in my environment. Each thread
connects to its allocated DC and enumerates all computer objects and extracts
the 'LastLogon' property. The results from each thread is then consolidated
so that I can get the true lastlogon date for each computer object.
However in my routine thats get actioned per thread, I have used the
following line which seems to halt each thread and doesn't progress to the
next line of code:
Dim searcher As New DirectorySearcher("LDAP://" + dc.Domain.ToString & "/" &
dc.Name)
Where dc is defined as ActiveDirectory.DomainController.
This is my method of connecting directly to a specific domain controller.
Why would this process halt when it works fine if I do not use
multithreading? Is there a better way of connecting directly to a domain
controller that would get around this problem?
Thanks,
Michael.