Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

serial.sys - non-exlusive IoCreateDevice

9 views
Skip to first unread message

Jens Mander

unread,
Aug 21, 2002, 10:49:23 AM8/21/02
to
Hi!

I'm working with the serial.sys example provided with the Windows DDK to do
some monitoring on the serial port. On each write-request I fill a buffer
which I want to read out with an IOCTL-call.

When I try to send the IOCTL to read the buffer, CreateFile says that the
device (COM1) is already opened. In this special case I have to open COM1
_twice_. I tried to set the creation in IoCreateDevice (in
SerialCreateDevObj, pnp.c) to non-exclusive with no success.

Has anybody an idea how to solve it?

TIA!


Doron Holan [MS]

unread,
Aug 21, 2002, 3:18:45 PM8/21/02
to
serial.sys only allows one open. it enforces this in the irp_mj_create
dispatch function. If you are trying to open the port when it first shows
up, you might be conflicting with serenum which opens up the port to
enumerate any devices on it. if you set a short timer and retry, it should
work.

--
d

This posting is provided "AS IS" with no warranties, and confers no rights.
"Jens Mander" <nos...@hotmail.com> wrote in message
news:3d63a71b$0$35156$3b21...@aconews.univie.ac.at...

0 new messages