Very Critical - Serial Ports

I have two windows applications monitoring two devices on two serialports.

In the above two applications one is written by me and other is from some other vendor.

I want to use a single serialport for both the applications by having some compromise in my application
that whenever the other application wants to send some data I have to stop my communication and give
it the port.

At the device level I can take care and combine the packets from two devices and can send packets with
distinguition as to which packet has to go to which application which is decoded by my application.

Windows won’t allow two processes to use same serialport. Is there any method so that I can emulate
a serial port to the other application providing it as if it is writing to serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I have two windows applications monitoring two devices on two serialports.

In the above two applications one is written by me and other is from some other vendor.

I want to use a single serialport for both the applications by having some compromise in my application
that whenever the other application wants to send some data I have to stop my communication and give
it the port.

At the device level I can take care and combine the packets from two devices and can send packets with
distinguition as to which packet has to go to which application which is decoded by my application.

Windows won’t allow two processes to use same serialport. Is there any method so that I can emulate
a serial port to the other application providing it as if it is writing to serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I don’t know of any way to emulate a serial port from user mode. If you discover a method please let me know too!

To solve a similar problem, I wrote a serial port emulator for NT 4.0 last year. The driver provides two interfaces; one is standard serial port the other “backdoor” . Using this driver an application which which uses a serial port can open the serial interface and read / write normally, then another application can open the “backdoor”, read the data written to the serial interface and write data to be read from the serial interface.

The driver was fairly easy to write starting from the DDK serial driver sample.

Larry

-----Original Message-----
From: ntdev [mailto:xxxxx@yahoo.com]
Sent: Wednesday, October 03, 2001 10:46 AM
To: NT Developers Interest List
Subject: [ntdev] Very Critical - Serial Ports

I have two windows applications monitoring two devices on two serialports.

In the above two applications one is written by me and other is from some other vendor.

I want to use a single serialport for both the applications by having some compromise in my application
that whenever the other application wants to send some data I have to stop my communication and give
it the port.

At the device level I can take care and combine the packets from two devices and can send packets with
distinguition as to which packet has to go to which application which is decoded by my application.

Windows won’t allow two processes to use same serialport. Is there any method so that I can emulate
a serial port to the other application providing it as if it is writing to serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.

You are currently subscribed to ntdev as: xxxxx@diebold.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi, my name is Gary Little. What’s yours?

Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com

-----Original Message-----
From: ntdev [mailto:xxxxx@yahoo.com]
Sent: Wednesday, October 03, 2001 8:22 AM
To: NT Developers Interest List
Subject: [ntdev] Very Critical - Serial Ports

I have two windows applications monitoring two devices on two serialports.

In the above two applications one is written by me and other is from some
other vendor.

I want to use a single serialport for both the applications by having some
compromise in my application
that whenever the other application wants to send some data I have to stop
my communication and give
it the port.

At the device level I can take care and combine the packets from two devices
and can send packets with
distinguition as to which packet has to go to which application which is
decoded by my application.

Windows won’t allow two processes to use same serialport. Is there any
method so that I can emulate
a serial port to the other application providing it as if it is writing to
serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.

You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Simply develop a virtual port which redirects requests to the real port.

Pete
Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of ntdev
Sent: Wednesday, October 03, 2001 9:22 AM
To: NT Developers Interest List
Subject: [ntdev] Very Critical - Serial Ports

I have two windows applications monitoring two devices on two serialports.

In the above two applications one is written by me and other is from some
other vendor.

I want to use a single serialport for both the applications by having some
compromise in my application
that whenever the other application wants to send some data I have to stop
my communication and give
it the port.

At the device level I can take care and combine the packets from two
devices and can send packets with
distinguition as to which packet has to go to which application which is
decoded by my application.

Windows won’t allow two processes to use same serialport. Is there any
method so that I can emulate
a serial port to the other application providing it as if it is writing to
serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.

You are currently subscribed to ntdev as: xxxxx@home.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hai,

I am

Vallabhaneni Chandra Sekhar
Sr. Software Engineer
MIC Electronics Limited
Hyderabad
----- Original Message -----
From: Gary Little
To: NT Developers Interest List
Sent: Wednesday, October 03, 2001 11:27 PM
Subject: [ntdev] RE: Very Critical - Serial Ports

Hi, my name is Gary Little. What’s yours?

Gary G. Little

Staff Engineer

Broadband Storage, Inc.

xxxxx@broadstor.com

-----Original Message-----
From: ntdev [mailto:xxxxx@yahoo.com]
Sent: Wednesday, October 03, 2001 8:22 AM
To: NT Developers Interest List
Subject: [ntdev] Very Critical - Serial Ports

I have two windows applications monitoring two devices on two serialports.

In the above two applications one is written by me and other is from some other vendor.

I want to use a single serialport for both the applications by having some compromise in my application
that whenever the other application wants to send some data I have to stop my communication and give
it the port.

At the device level I can take care and combine the packets from two devices and can send packets with
distinguition as to which packet has to go to which application which is decoded by my application.

Windows won’t allow two processes to use same serialport. Is there any method so that I can emulate
a serial port to the other application providing it as if it is writing to serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.


You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hai Larry,

Can you send me the driver? I haven’t written any driver until now. I have just gone through some chapters of art bakers book and still I am at the beginning stage.

Please help me

Chandu
----- Original Message -----
From: Harmon, Larry CT
To: NT Developers Interest List
Sent: Wednesday, October 03, 2001 10:54 PM
Subject: [ntdev] RE: Very Critical - Serial Ports

I don’t know of any way to emulate a serial port from user mode. If you discover a method please let me know too!

To solve a similar problem, I wrote a serial port emulator for NT 4.0 last year. The driver provides two interfaces; one is standard serial port the other “backdoor” . Using this driver an application which which uses a serial port can open the serial interface and read / write normally, then another application can open the “backdoor”, read the data written to the serial interface and write data to be read from the serial interface.

The driver was fairly easy to write starting from the DDK serial driver sample.

Larry
-----Original Message-----
From: ntdev [mailto:xxxxx@yahoo.com]
Sent: Wednesday, October 03, 2001 10:46 AM
To: NT Developers Interest List
Subject: [ntdev] Very Critical - Serial Ports

I have two windows applications monitoring two devices on two serialports.

In the above two applications one is written by me and other is from some other vendor.

I want to use a single serialport for both the applications by having some compromise in my application
that whenever the other application wants to send some data I have to stop my communication and give
it the port.

At the device level I can take care and combine the packets from two devices and can send packets with
distinguition as to which packet has to go to which application which is decoded by my application.

Windows won’t allow two processes to use same serialport. Is there any method so that I can emulate
a serial port to the other application providing it as if it is writing to serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.

You are currently subscribed to ntdev as: xxxxx@diebold.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Can you give me some example.
----- Original Message -----
From: Pete Scott
To: NT Developers Interest List
Sent: Thursday, October 04, 2001 12:54 AM
Subject: [ntdev] RE: Very Critical - Serial Ports

Simply develop a virtual port which redirects requests to the real port.

Pete
Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of ntdev
Sent: Wednesday, October 03, 2001 9:22 AM
To: NT Developers Interest List
Subject: [ntdev] Very Critical - Serial Ports

I have two windows applications monitoring two devices on two serialports.

In the above two applications one is written by me and other is from some other vendor.

I want to use a single serialport for both the applications by having some compromise in my application
that whenever the other application wants to send some data I have to stop my communication and give
it the port.

At the device level I can take care and combine the packets from two devices and can send packets with
distinguition as to which packet has to go to which application which is decoded by my application.

Windows won’t allow two processes to use same serialport. Is there any method so that I can emulate
a serial port to the other application providing it as if it is writing to serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.

You are currently subscribed to ntdev as: xxxxx@home.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I would start with the serial example in the DDK …

Pete
Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of ntdev
Sent: Wednesday, October 03, 2001 10:19 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Very Critical - Serial Ports

Can you give me some example.
----- Original Message -----
From: Pete Scott
To: NT Developers Interest List
Sent: Thursday, October 04, 2001 12:54 AM
Subject: [ntdev] RE: Very Critical - Serial Ports

Simply develop a virtual port which redirects requests to the real port.

Pete
Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of ntdev
Sent: Wednesday, October 03, 2001 9:22 AM
To: NT Developers Interest List
Subject: [ntdev] Very Critical - Serial Ports

I have two windows applications monitoring two devices on two
serialports.

In the above two applications one is written by me and other is from
some other vendor.

I want to use a single serialport for both the applications by having
some compromise in my application
that whenever the other application wants to send some data I have to
stop my communication and give
it the port.

At the device level I can take care and combine the packets from two
devices and can send packets with
distinguition as to which packet has to go to which application which
is decoded by my application.

Windows won’t allow two processes to use same serialport. Is there any
method so that I can emulate
a serial port to the other application providing it as if it is
writing to serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.

You are currently subscribed to ntdev as: xxxxx@home.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@home.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

What you need is a comm filter.

-frank
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Pete Scott
Sent: Thursday, October 04, 2001 7:41 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Very Critical - Serial Ports

I would start with the serial example in the DDK …

Pete
Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of ntdev
Sent: Wednesday, October 03, 2001 10:19 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Very Critical - Serial Ports

Can you give me some example.
----- Original Message -----
From: Pete Scott
To: NT Developers Interest List
Sent: Thursday, October 04, 2001 12:54 AM
Subject: [ntdev] RE: Very Critical - Serial Ports

Simply develop a virtual port which redirects requests to the real
port.

Pete
Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of ntdev
Sent: Wednesday, October 03, 2001 9:22 AM
To: NT Developers Interest List
Subject: [ntdev] Very Critical - Serial Ports

I have two windows applications monitoring two devices on two
serialports.

In the above two applications one is written by me and other is from
some other vendor.

I want to use a single serialport for both the applications by
having some compromise in my application
that whenever the other application wants to send some data I have
to stop my communication and give
it the port.

At the device level I can take care and combine the packets from two
devices and can send packets with
distinguition as to which packet has to go to which application
which is decoded by my application.

Windows won’t allow two processes to use same serialport. Is there
any method so that I can emulate
a serial port to the other application providing it as if it is
writing to serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.

You are currently subscribed to ntdev as: xxxxx@home.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@home.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@airmail.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Ok, you can write a filter driver to capture all the writes it is making to the port. But here I am using only one port for two applications. where, the controller is my application and if it receives a packet related to the other application it has to send it to the other application to make it the same feeling as when the application is reading from the port.

What I am intending to do is say create a device with COM4 which is not there in system and make the other application to use that and handle all the reads and write to it in the driver level.

Any suggessions…

Chandu

----- Original Message -----
From: frank
To: NT Developers Interest List
Sent: Friday, October 05, 2001 8:41 AM
Subject: [ntdev] RE: Very Critical - Serial Ports

What you need is a comm filter.

-frank
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Pete Scott
Sent: Thursday, October 04, 2001 7:41 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Very Critical - Serial Ports

I would start with the serial example in the DDK …

Pete
Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of ntdev
Sent: Wednesday, October 03, 2001 10:19 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Very Critical - Serial Ports

Can you give me some example.
----- Original Message -----
From: Pete Scott
To: NT Developers Interest List
Sent: Thursday, October 04, 2001 12:54 AM
Subject: [ntdev] RE: Very Critical - Serial Ports

Simply develop a virtual port which redirects requests to the real port.

Pete
Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of ntdev
Sent: Wednesday, October 03, 2001 9:22 AM
To: NT Developers Interest List
Subject: [ntdev] Very Critical - Serial Ports

I have two windows applications monitoring two devices on two serialports.

In the above two applications one is written by me and other is from some other vendor.

I want to use a single serialport for both the applications by having some compromise in my application
that whenever the other application wants to send some data I have to stop my communication and give
it the port.

At the device level I can take care and combine the packets from two devices and can send packets with
distinguition as to which packet has to go to which application which is decoded by my application.

Windows won’t allow two processes to use same serialport. Is there any method so that I can emulate
a serial port to the other application providing it as if it is writing to serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.

You are currently subscribed to ntdev as: xxxxx@home.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@home.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@airmail.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I can’t send you my driver, it is proprietary. But I can describe its development to you.

Start with the serial driver sample which comes with the DDK (downloadable from MS)
Cut out all the code which referenced hardware, I/O and IRQs
Modify IOCTL code to do nothing when requested to set COM Port I/O controls (RTS/CTS DTS/DSR…), except record the virtual state
Created linked list to queue write and IRPs in the device extension

Add code and variables in the device extension to create a second symbolic link for each device, you can use any name you like.
NOTE: Had I to do it over again I would create the second interface with a com port link also - then I would have a virtual loopback!
This second interface shares the device extension with the first interface, therefor when driver requests come in the driver must determine which interface the request is comming from

The logic for the second interface kind of hooks into where the serial driver ISR & DPC routines were used.
Writes to the com port are queued to a linked list - when the second interface is read, IRP’s are pulled off this list, completed and the data passed back. Reads to the com port are handled exactly the opposite.

Hope this helps

Larry

-----Original Message-----
From: ntdev [mailto:xxxxx@yahoo.com]
Sent: Thursday, October 04, 2001 12:18 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Very Critical - Serial Ports

Hai Larry,

Can you send me the driver? I haven’t written any driver until now. I have just gone through some chapters of art bakers book and still I am at the beginning stage.

Please help me

Chandu

----- Original Message -----
From: Harmon, Larry mailto:xxxxx CT
To: NT Developers mailto:xxxxx Interest List
Sent: Wednesday, October 03, 2001 10:54 PM
Subject: [ntdev] RE: Very Critical - Serial Ports

I don’t know of any way to emulate a serial port from user mode. If you discover a method please let me know too!

To solve a similar problem, I wrote a serial port emulator for NT 4.0 last year. The driver provides two interfaces; one is standard serial port the other “backdoor” . Using this driver an application which which uses a serial port can open the serial interface and read / write normally, then another application can open the “backdoor”, read the data written to the serial interface and write data to be read from the serial interface.

The driver was fairly easy to write starting from the DDK serial driver sample.

Larry

-----Original Message-----
From: ntdev [mailto:xxxxx@yahoo.com]
Sent: Wednesday, October 03, 2001 10:46 AM
To: NT Developers Interest List
Subject: [ntdev] Very Critical - Serial Ports

I have two windows applications monitoring two devices on two serialports.

In the above two applications one is written by me and other is from some other vendor.

I want to use a single serialport for both the applications by having some compromise in my application
that whenever the other application wants to send some data I have to stop my communication and give
it the port.

At the device level I can take care and combine the packets from two devices and can send packets with
distinguition as to which packet has to go to which application which is decoded by my application.

Windows won’t allow two processes to use same serialport. Is there any method so that I can emulate
a serial port to the other application providing it as if it is writing to serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.

You are currently subscribed to ntdev as: xxxxx@diebold.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@diebold.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:xxxxx></mailto:xxxxx>

Thankyou larry.
I will try to do as you have suggested.

Chandu
----- Original Message -----
From: Harmon, Larry CT
To: NT Developers Interest List
Sent: Friday, October 05, 2001 6:52 PM
Subject: [ntdev] RE: Very Critical - Serial Ports

I can’t send you my driver, it is proprietary. But I can describe its development to you.

Start with the serial driver sample which comes with the DDK (downloadable from MS)
Cut out all the code which referenced hardware, I/O and IRQs
Modify IOCTL code to do nothing when requested to set COM Port I/O controls (RTS/CTS DTS/DSR…), except record the virtual state
Created linked list to queue write and IRPs in the device extension

Add code and variables in the device extension to create a second symbolic link for each device, you can use any name you like.
NOTE: Had I to do it over again I would create the second interface with a com port link also - then I would have a virtual loopback!
This second interface shares the device extension with the first interface, therefor when driver requests come in the driver must determine which interface the request is comming from

The logic for the second interface kind of hooks into where the serial driver ISR & DPC routines were used.
Writes to the com port are queued to a linked list - when the second interface is read, IRP’s are pulled off this list, completed and the data passed back. Reads to the com port are handled exactly the opposite.

Hope this helps

Larry

-----Original Message-----
From: ntdev [mailto:xxxxx@yahoo.com]
Sent: Thursday, October 04, 2001 12:18 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Very Critical - Serial Ports

Hai Larry,

Can you send me the driver? I haven’t written any driver until now. I have just gone through some chapters of art bakers book and still I am at the beginning stage.

Please help me

Chandu
----- Original Message -----
From: Harmon, Larry CT
To: NT Developers Interest List
Sent: Wednesday, October 03, 2001 10:54 PM
Subject: [ntdev] RE: Very Critical - Serial Ports

I don’t know of any way to emulate a serial port from user mode. If you discover a method please let me know too!

To solve a similar problem, I wrote a serial port emulator for NT 4.0 last year. The driver provides two interfaces; one is standard serial port the other “backdoor” . Using this driver an application which which uses a serial port can open the serial interface and read / write normally, then another application can open the “backdoor”, read the data written to the serial interface and write data to be read from the serial interface.

The driver was fairly easy to write starting from the DDK serial driver sample.

Larry
-----Original Message-----
From: ntdev [mailto:xxxxx@yahoo.com]
Sent: Wednesday, October 03, 2001 10:46 AM
To: NT Developers Interest List
Subject: [ntdev] Very Critical - Serial Ports

I have two windows applications monitoring two devices on two serialports.

In the above two applications one is written by me and other is from some other vendor.

I want to use a single serialport for both the applications by having some compromise in my application
that whenever the other application wants to send some data I have to stop my communication and give
it the port.

At the device level I can take care and combine the packets from two devices and can send packets with
distinguition as to which packet has to go to which application which is decoded by my application.

Windows won’t allow two processes to use same serialport. Is there any method so that I can emulate
a serial port to the other application providing it as if it is writing to serialport, and handle all
the reads and write on to that with my application.

Any help will be very very usefull for me.

You are currently subscribed to ntdev as: xxxxx@diebold.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@diebold.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com