Help Urgent ... PNP serial attached device

Hi All,
We have developed a device which could be attached
to the serial port and is PlunPlay capable.Now our
requirement is that

"Whenever the device is plugged in the serial port an
application should be executed and whenever we remove
the device the application should be killed ".Here
application means a normal executable file(.exe).

Any idea on how to implement this ??? Is a driver
required for this ?? Looking for ur thoughts.

Thanx,
Alex.


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

At the very least, you’ll need a service “application” that can start the
user-mode application. You may also need a driver, depending on exactly how
you need to determine that you have this gadget attached to the serial
port.

To kill the application, it would depend a lot on how much control you have
over this application. You’d preferrable want the application to exit
relatively gently, so that it has time to save any data etc. This can be
done by having multiple threads and one thread that waits for an event
triggered by the detection of the removal, and then signalling one way or
another to the other threads to “exit”.

On the other hand, if the application is not “your own”, then you’d be
forced to (eventually) kill the application forcefully if the application
isn’t co-operating when asked to quit.

A lot of this depends on exactly what the application is supposed to do,
and how important it is to exit IMMEDIATELY. In human terms, immediately
may mean a second or so, but in computer terms, quite some time. So do you
need “immediate” “kill” of the application, and by what terms do you define
this “immediate”.


Mats

xxxxx@lists.osr.com wrote on 02/28/2005 01:46:18 PM:

Hi All,
We have developed a device which could be attached
to the serial port and is PlunPlay capable.Now our
requirement is that

"Whenever the device is plugged in the serial port an
application should be executed and whenever we remove
the device the application should be killed ".Here
application means a normal executable file(.exe).

Any idea on how to implement this ??? Is a driver
required for this ?? Looking for ur thoughts.

Thanx,
Alex.


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Questions? First check the Kernel Driver FAQ at http://www.
osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

ForwardSourceID:NT0000DDA6

Who is polling the serial port for device insertion? Serial enumeration
is somewhat funny. There is an enumeration protocol which describes how
to describe the device, but there is no standardaized notification
scheme for arrival or notification removal. Serenum (the serial device
serial enumerator) only searches when told to (after the serial port
itself has been started and when you scan for new hw in device manager).

This means you can plug in a serial enumerable device (like a serial
mouse) after booting and logging on and the device will not be detected
unless you manually search for it. Furthermore, the serial mouse driver
knows the device has been removed when a particular line changes (DSR
and/or CTS, depending on what is high when the device is started by
sermouse.sys). It is the serial mouse driver, not the serial enumerator
which reports the device as missing. This, again, is particular to a
device class (mice), and cannot be applied to all serial enumerated
devices.

You can dedicate an application or service to poll the port, but if you
expect other applications to use the port, you might not be able to open
the port for enumeration (another has it open) or prevent the other app
from opening it (b/c you have it open). TAPI may help here, I don’t
know enough about it to give a definitive answer though.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Alex John
Sent: Monday, February 28, 2005 5:46 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Help Urgent … PNP serial attached device

Hi All,
We have developed a device which could be attached
to the serial port and is PlunPlay capable.Now our
requirement is that

"Whenever the device is plugged in the serial port an
application should be executed and whenever we remove
the device the application should be killed ".Here
application means a normal executable file(.exe).

Any idea on how to implement this ??? Is a driver
required for this ?? Looking for ur thoughts.

Thanx,
Alex.


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com