FW: Re: A Query about SERIAL_EV_RXCHAR

Hi
Thanks for the information. This was exactly how I had implemented it, with
exception that I don’t use the IoBuildDeviceIoControlRequest as I get the
IRP from the I/O Manager( my driver is registered as a portdriver). My
situation is complicated by the fact IoCallDriver returns STATUS_PENDING,
when I pass the ioctl, IOCTL_SERIAL_WAIT_ON_MASK. Now do I return the
STATUS_PENDING back to the upper driver and if so, will the completion
routine still be called. I seem to be getting page faults in my completion
routine. Do I have to go the way of IostartPacket and IoMarkIrpPending? In
this case, how would I know the event has been set/reset from my StartIo
routine.
Shail

----- Original Message -----
From: “Shailender Kesha” mailto:xxxxx >
To: “George Tony” mailto:xxxxx >
Sent: Tuesday, December 12, 2000 12:36 AM
Subject: FW: [ntdev] Re: A Query about SERIAL_EV_RXCHAR

> -----Original Message-----
> From: Malcolm Hannah [SMTP:xxxxx@mhannah.co.uk]
mailto:
> mailto:mailto: >
> Sent: Monday, December 11, 2000 11:36 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: A Query about SERIAL_EV_RXCHAR
>
> At 20:53 11/12/00 +0500, Shail wrote:
> >
> >I am writing a filter driver in which, I need to know how
I can
> wait on an
> >event mask(say, SERIAL_EV_RXCHAR ). Particularily on
which
> KEVENT object
> >should I wait on.
>
> Shail, my driver waits on EV_RXCHAR but doesn’t really use a
KEVENT
> object.
> This is how I do it.
> Create an IRP with:
> Irp = IoBuildDeviceIoControlRequest (IOCTL_SERIAL_SET_WAIT_MASK,
etc.)
> Nominate a function that you wish to be called when your IRP is
> completed (when EX_RXCHAR happens):
> IoSetCompletionRoutine (Irp, FunctionToBeCalled, ReferenceData,
etc.)
> Send this IRP to the serial driver:
> IoCallDriver (Extension->SerialPort, Irp)
>
> When the serial driver received a character, the IoManager will
call
> your FunctionToBeCalled, passing ReferenceData as a parameter.
(It will
> also pass the pointer to your IRP, so you can re-use it, and wait
for
> another EV_RXCHAR, if you like.)
> Hope this is useful,
> Malcolm Malcolm Hannah Limited, Glasgow,
> Scotland
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@hpsblr.soft.net
mailto:xxxxx
> mailto:xxxxxmailto:xxxxx >
> To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com mailto:leave-ntdev-
> mailto:leave-ntdev-mailto:leave-ntdev- >


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:leave-ntdev-></mailto:leave-ntdev-></mailto:leave-ntdev-></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:></mailto:></mailto:></mailto:xxxxx></mailto:xxxxx>