The DLL use two different ways of comunication.
1) Comunication with and external port contected machine. I use WriteFile and ReadFile (with WaitCommEvent) to write and read from the port. I have not problems here as comunication is Ok with A and B apps.
2) Comunication with the application. When then application correctly loads the DLL , the it invokes a "Register event function", in which the application let know the DLL what callback function to call when that event happend. Example:
- Load the DLL
- Call 'Register log function" with the address of the app function (f1) to call when from the DLL we want to register an event in the log of the app.
- From the DLL, when appropiate, we call f1 with data to let know the app we want to send string paramenter to log file.
I hope my explanation is clear....
Anyway, what I have discoved until now is that threads are non supported bethween mfc app and non-mfc dll.
thx
FS