Hello, I am developing a VB.NET 2008 application.
Although this is not a console application, this 'Windows Forms Application' consists of only a module (no UI, no Forms, no Controls, no Classes, ONLY a module).
Now, in that module, I call an asynchronous TcpClient BeginRead, passing 'AdressOf DoRead' as CallBack.
When the DoRead sub is executed, it runs on a different thread than the main module, and any call from here on executes on this thread.
What I need is a way to call a sub in the main thread from the CallBack thread (sub DoRead), all this without any UI components or forms.
I want a solution strictly to my problem, not a workaround involving Forms or synchronous read calls.