Re: Serial Upper Filter Driver Help Required
From: Old Codger (OldCodger101_at_hotmail.com)
Date: 09/28/04
- Next message: rex: "about HCT 12.0"
- Previous message: Bob: "Re: Data corruption in IoCompleteRequest"
- In reply to: Maxim S. Shatskih: "Re: Serial Upper Filter Driver Help Required"
- Next in thread: Maxim S. Shatskih: "Re: Serial Upper Filter Driver Help Required"
- Reply: Maxim S. Shatskih: "Re: Serial Upper Filter Driver Help Required"
- Messages sorted by: [ date ] [ thread ]
Date: 28 Sep 2004 01:05:35 -0700
"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message news:<#2#G0bJpEHA.3668@TK2MSFTNGP15.phx.gbl>...
> > > No. You need to shutdown the stack to detach the driver.
> >
> > What does IoDetachDevice do then?
>
> Part of disassembling the stack. WDM drivers must call it in MN_REMOVE_DEVICE
> path only.
>
> > Does this not return the stack to the same state it was in before I
> > attached my device?
>
> Yes. And for PnP stacks, this occurs only of devnode disabling or surprise
> removal.
Hi Maxim,
MUST call it in MN_REMOVE_DEVICE - why?
This driver is dynamically loaded by it's associated application by
means of the Service Control Manager then "started" (attached to the
correct COM port) and "stopped" (detached) by means of special IOCTLS
sent via the DeviceIoControl function. The device will never be
"removed" so why can't I detach the driver dynamically myself? There
are commercial products that I am sure use this same method and make
the serial port available for other applications afterwards.
BTW This part is not fully working yet, once I have attached my driver
and dereferenced the file object (to free the serial port) I can
successfully open the port from another applciation (Hyperterminal),
but when I detach the driver the port is no longer available, I have
not found the reason for this yet, maybe that is related to this same
point.
Thanks
O.C.
P.S. Any ideas about my other question "Same IRP appearing more than
once" - I'm behind schedule with this one and urgently need some
answers! :-)
- Next message: rex: "about HCT 12.0"
- Previous message: Bob: "Re: Data corruption in IoCompleteRequest"
- In reply to: Maxim S. Shatskih: "Re: Serial Upper Filter Driver Help Required"
- Next in thread: Maxim S. Shatskih: "Re: Serial Upper Filter Driver Help Required"
- Reply: Maxim S. Shatskih: "Re: Serial Upper Filter Driver Help Required"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|