Re: Notification of Driver Unloading



Hill Bill,

I am not sure if you can force a driver not to unload, but potentially this
can be implemented, if you do not supply an entry point for this function
( DeInit() or something like this).
However, you can set up hook in your sowftware module to monitor specific
driver loading or unloading, by specifying that driver class or ID to watch
for. Then, when the culprit driver is ebing called to unload, you will get a
call as well. PB help describes an example ho wimplement this.

Best wishes
SergeiR

"Bill T" <billthe@xxxxxxxxxxx> wrote in message
news:ulBsN2teGHA.4892@xxxxxxxxxxxxxxxxxxxxxxx
We are using using an FDTI USB to serial adapter with our proprietry X86
hardware running CE 5.0 and everything works geat until the adapter is
disconnected while the COM port is communicating. There are exceptions,
the system hangs and ultimately our hardware watchdog resets. It appers
that this happens becuase the applications is communicating with the COM
port while the USB to servir drive is attempting to unload. Since we can
not prevent our users from disconnecting at will, we need to find a
programatic solution. We have several ideas but don't know if they are
viable, please comment on these ideas and offer new ones if you have any.
1. Prevent the USB to serial driver from unloading, Would this prevent
the crash? Is there any way to do it?
2. Stop communicating with the adapter when the app is notified that the
driver is unloading. Is there any notification like this? Would it be
fast enough?




.



Relevant Pages

  • Re: 1394 + WinXP SP2
    ... >> all unload paths for your device. ... My own drivers do very light async I/O, ... I did not do extensive SP2 testing. ... you try your device with CUV and driver verifier with SP1? ...
    (microsoft.public.development.device.drivers)
  • Re: Self-removing driver
    ... I ended up following Volodymyr M. Shcherbyna's suggestion: ... Incremented HandleCount on IRP_MJ_CREATE ... to my Unload routine to prevent a closing conflict as suggested by Pavel A. ... Windows Filesystem and Driver Consulting ...
    (microsoft.public.development.device.drivers)
  • Re: WdfControlDeviceInitSetShutdownNotification
    ... why wouuldn't you just do it on device unload as well? ... Please do not send e-mail directly to this alias. ... I tried using EvtDeviceD0Exit but my driver gets called when it is unloaded, ... register shutdown notification. ...
    (microsoft.public.development.device.drivers)
  • Re: newbus integration of MOD_QUIESCE
    ... an unload request is treated as a blocking quiesce request. ... such as "State transition driver into 'shutting ... load overlap? ... it" may mean one thing for a driver, but something else for a file system. ...
    (freebsd-arch)
  • usbser.dll cant work. IssueBulkTransfer function returns USB_DEVICE_NOT_RESPONDING_ERROR
    ... I am communicating with a USB modem device on WinCE 5.0. ... driver. ...
    (microsoft.public.windowsce.platbuilder)