Keeping the DTR high with Delphi...

From: Arash Partow (arashp_at_hotmail.com)
Date: 02/19/04


Date: 18 Feb 2004 21:19:40 -0800

Hi,

I was wondering if anyone out there knows of a way to keep
the DTR high on a com port for a few seconds after the
application that has initialized the com port has gone down.
also how can the handle of the com port be passed from 1
application to another?

the problem I'm facing is that there are two applications
that use a device that is connected to the com port. the
first application uses the device, its supposed to execute
the second application and give control of the com port to
the second application.

the problem is the DTR goes low during the process of starting
up the next application the device detects this and turns itself
off, however in the device there is a sort of "timeout" which
basically says if the DTR is low for less than 2 seconds for it
not to turn itself off.

so basically i want to :

1.) be able to transfer the handle of the com port from app1 to app2
2.) do it in such a way that the DTR is not set low for more than 2 seconds

my platform is win2k and I'm using delphi 5,6,7

Anyone have any ideas?

Arash Partow

__________________________________________________
Be one who knows what they don't know,
Instead of being one who knows not what they don't know,
Thinking they know everything about all things.
http://www.partow.net



Relevant Pages

  • Re: program wont read w/o DTR resistance
    ... > that draw their power from the DTR line). ... > computer and the modified device on a serial line and a resistor ... > low-level going on in either the kernel or the serial port ...
    (comp.os.linux.development.system)
  • Re: program wont read w/o DTR resistance
    ... >> that draw their power from the DTR line). ... > How have you set up the serial port? ... Hey Dave, ... interpret DTR assertion as there being a listening machine onthe other end. ...
    (comp.os.linux.development.system)
  • Re: 1 serial port 2 parity types? MFC based app needs assistance.
    ... device sending data while the device is in the wrong mode. ... from the paralell port to switch between tow transmit lines form two ... the port assert DTR when transmitting. ...
    (microsoft.public.vc.mfc)
  • Re: 1 serial port 2 parity types? MFC based app needs assistance.
    ... device sending data while the device is in the wrong mode. ... from the paralell port to switch between tow transmit lines form two ... the port assert DTR when transmitting. ...
    (microsoft.public.vc.mfc)
  • Re: Keeping the DTR high with Delphi...
    ... >application that has initialized the com port has gone down. ... The handle is private to the App - you can't ... >basically says if the DTR is low for less than 2 seconds for it ... Object and is in fact a sort of device driver ...
    (comp.lang.pascal.delphi.misc)