Information générale
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Hi,
Don't know what the problem maybe - just curious as to why you can't handle this directly from VFP using the MSComm OnComm() event ?
Regards,
Viv
>I wrote a COM DLL using ATL 3 (VC++ 6) to access serial ports. The intent is to send a cmd character string to a weighing indicator and have a thread(s) in the DLL process the indicator's response and fire an event. Once a cmd string has been sent to the DLL, VFP can go about other business (possibly working with a different serial port) until the event arrives - thereby eliminating serial port polling.
>
>The trouble is - a test VFP program runs for anywhere from 2 to 10 minutes (each indicator response requires about 100 ms), then completely locks up my machine. I've experimented with AutoYield set to either .T. and .F. (I'm not sure I understand exactly what AutoYield does with a COM DLL) and experienced the same failure.
>
>A similar test case in VB6 runs infinitely with no problems.
>
>I have a critical section in the DLL's event code to insure that each event must be handled before another one can be fired.
>
>I can see in the VC6 debugger that VFP is creating a new thread every time VFP calls into the DLL while VB6 does not create a thread.
>
>Does anyone know what's the problem and how to fix it. If this is a fundamental VFP problem, I may have to resort to VB6 to write this application (sigh).
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement