I am trying to create an app that will ping all IP's in a subnet and if they are online attempt to gather WMI information from them. To do this I would like to check multiple IPs at once as one at a time would take ages. So I am trying to do as follows
VB Code:
sub btnclcick Dim T1 As Thread For i = 1 To 255 T1 = New Thread(AddressOf Collect) T1.IsBackground = True T1.Start() Next end sub private sub collect() 'ping and get WMI end sub
Problem is each time the thread is restarted it starts the sub over before it can do anyting, how can I get multiple threads to open that same sub and all work at once?




Reply With Quote