How can I create an array? of threads that are accessible from forms and classes within my application??
I am putting
Public thread_handler() As Thread
in my form and adding threads using
Dim count As New Integer
If thread_handler Is Nothing Then count = 0 Else count = UBound(thread_handler) + 1
ReDim Preserve thread_handler(count)
thread_handler(count) = t 'add thread to thread handler
but is this correct and is there a better way as I am having some problems with checking threads (where activex objects aren't returning information) ie.
Error: COM object that has been separated from its underlying RCW cannot be used.
System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used
and I think its because of the way I am handling them???