Mode command doesn't recognize emulated serial port

Hi,
The serial ports emulated by my driver work well with terminal,
hyperterminal, and other similar applications, but for some reason are not
recognized by the mode command. Using SysInternals PortMon utility, I see
the following dialog when issuing the mode command for a true serial port:

0 2:01:43 PM mode.com IRP_MJ_CREATE Serial0 Options: Open
0 2:01:43 PM SUCCESS
1 2:01:43 PM mode.com IRP_MJ_CLEANUP Serial0
1 2:01:43 PM SUCCESS
2 2:01:43 PM mode.com IRP_MJ_CLOSE Serial0
2 2:01:43 PM SUCCESS
3 2:01:43 PM mode.com IRP_MJ_CREATE Serial0 Options: Open
3 2:01:43 PM SUCCESS
4 2:01:43 PM mode.com IOCTL_SERIAL_GET_BAUD_RATE Serial0
4 2:01:43 PM SUCCESS
5 2:01:43 PM mode.com IOCTL_SERIAL_GET_LINE_CONTROL Serial0
5 2:01:43 PM SUCCESS
6 2:01:43 PM mode.com IOCTL_SERIAL_GET_CHARS Serial0
6 2:01:43 PM SUCCESS
7 2:01:43 PM mode.com IOCTL_SERIAL_GET_HANDFLOW Serial0
7 2:01:43 PM SUCCESS
8 2:01:43 PM mode.com IOCTL_SERIAL_GET_TIMEOUTS Serial0
8 2:01:43 PM SUCCESS
9 2:01:43 PM mode.com IRP_MJ_CLEANUP Serial0
9 2:01:43 PM SUCCESS
10 2:01:43 PM mode.com IRP_MJ_CLOSE Serial0
10 2:01:43 PM SUCCESS

However, when I issue the command for one of my emulated serial ports, it
looks like only the initial create, cleanup, and close irps are sent:

11 2:01:51 PM mode.com IRP_MJ_CREATE NGpsSer0 Options: Open
11 2:01:51 PM SUCCESS
12 2:01:51 PM mode.com IRP_MJ_CLEANUP NGpsSer0
12 2:01:51 PM SUCCESS
13 2:01:51 PM mode.com IRP_MJ_CLOSE NGpsSer0
13 2:01:51 PM SUCCESS

Any ideas?
Linda

Never mind. I found the bug in my driver. In my call to IoCreateDevice I
was specifying FILE_DEVICE_UNKNOWN instead of FILE_DEVICE_SERIAL_PORT
(d-oh!).

“Linda Marcellus” wrote in message
news:xxxxx@ntdev…
>
> Hi,
> The serial ports emulated by my driver work well with terminal,
> hyperterminal, and other similar applications, but for some reason are not
> recognized by the mode command. Using SysInternals PortMon utility, I see
> the following dialog when issuing the mode command for a true serial port:
>
> 0 2:01:43 PM mode.com IRP_MJ_CREATE Serial0 Options: Open
> 0 2:01:43 PM SUCCESS
> 1 2:01:43 PM mode.com IRP_MJ_CLEANUP Serial0
> 1 2:01:43 PM SUCCESS
> 2 2:01:43 PM mode.com IRP_MJ_CLOSE Serial0
> 2 2:01:43 PM SUCCESS
> 3 2:01:43 PM mode.com IRP_MJ_CREATE Serial0 Options: Open
> 3 2:01:43 PM SUCCESS
> 4 2:01:43 PM mode.com IOCTL_SERIAL_GET_BAUD_RATE Serial0
> 4 2:01:43 PM SUCCESS
> 5 2:01:43 PM mode.com IOCTL_SERIAL_GET_LINE_CONTROL Serial0
> 5 2:01:43 PM SUCCESS
> 6 2:01:43 PM mode.com IOCTL_SERIAL_GET_CHARS Serial0
> 6 2:01:43 PM SUCCESS
> 7 2:01:43 PM mode.com IOCTL_SERIAL_GET_HANDFLOW Serial0
> 7 2:01:43 PM SUCCESS
> 8 2:01:43 PM mode.com IOCTL_SERIAL_GET_TIMEOUTS Serial0
> 8 2:01:43 PM SUCCESS
> 9 2:01:43 PM mode.com IRP_MJ_CLEANUP Serial0
> 9 2:01:43 PM SUCCESS
> 10 2:01:43 PM mode.com IRP_MJ_CLOSE Serial0
> 10 2:01:43 PM SUCCESS
>
> However, when I issue the command for one of my emulated serial ports, it
> looks like only the initial create, cleanup, and close irps are sent:
>
> 11 2:01:51 PM mode.com IRP_MJ_CREATE NGpsSer0 Options: Open
> 11 2:01:51 PM SUCCESS
> 12 2:01:51 PM mode.com IRP_MJ_CLEANUP NGpsSer0
> 12 2:01:51 PM SUCCESS
> 13 2:01:51 PM mode.com IRP_MJ_CLOSE NGpsSer0
> 13 2:01:51 PM SUCCESS
>
> Any ideas?
> Linda
>
>