Hi
I am relatively new to C# and OOP. I have developed a Windows application
that uses the MSComm control to dial to remote devices and retrieve some
information before hanging up. In addition the user can keep receiving until
he disconnects.
The comm class is using the MSComm control and has methods makeCall,
terminateCall etc. A caller class instantiates the comm class and calls its
methods and subscribes to the comm class's events. So in essense the calling
class calls a method (makeCall) and terminates execution until an event
signals that the expected data has arrived at which time the calling class
stores it in a database and calls the terminateCall method.
The design of the comm class handling the communications was done using
events (OnComm), such that whenever something arrives at the port I check it
, parse it and raise my own event for the caller class to pick up and update
the GUI. Furthermore the caller class disconnects the call.
I now have to make a series of such calls to a number of devices. I would
like to know how I can do that, since the calling class terminates execution
once it calls makeCall method. How do I keep control so as to loop through
all remote devices?
I am a bit confused about multi-threading, callback methods, reset events
etc.....can anyone explain?
--
Regards
Chris