I have been tasked with creating a DLL-like system that interacts with a device connected to a Com Port, which is constantly streaming data. The DLL will be used by other developers using all different languages. Thinking about it, 'Device Driver' springs to mind.
Anyway, my problem is that by nature, DLLs are a request -> response type setup, whereby as soon as a DLL function returns, the state is lost. I have a TComPort component on a form in the DLL, which probably isn't the best idea, and If a modally shoow the form everything works fine. Ideally i'd like to not use the form at all, but so far haven't been able to get it to work.
What I need, is a way of constantly collecting the streaming data from the com port, and then passing that back to the parent application without the parent application having to constantly call a DLL function. I have callbacks working fine, which allows me to trigger events for the parent application, I just can't think of a way to keep the innards of the DLL active so as to be always listening to the com port.
I know nothing about making device drivers, had a quick look at how to build activex controls (gave up), and thought I could write a full app with COM automation for the parent app but trying to stay away from that.
Your suggestions please?