Hi
I have created a service which executes a routine every 1 second. The routine
calls some of the methods included in TBlockSerial, such as...
====== code follows ========
procedure TService2.SomeService
var
ser: TBlockSerial
begin
ser := TBlockSerial.Create
try
ser.Connect('COM4')
...
< send a few AT commands to the modem >
...
finally
ser.free;
end;
end;
===== end code ======
The problem I am having is that after a few repetitions, the procedure seems
unable to connect to the COM port and skips the code following the
ser.Connect() line. I can detect this if I log the execution to a text file - I
see that after a few repetitions the procedure executes up to the ser.Connect()
line and then jumps to the "finally" part of the code. The only way to get out
of this is to manually restart the service from the service management console,
but again once restarted the problem will occur again after a few repetitions.
Any ideas about what could be causing this and how to fix it? Is there a way to
kill whatever connections might be open to a COM port, before trying to connect
to it, thus eliminating the possibility of a previously hung connection not
allowing you to reconnect?
Thanks
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public