PC Review Forums Newsgroups Windows XP Windows XP Logo surpriseremove test error

Reply

surpriseremove test error

 
Thread Tools Rate Thread
Old 02-08-2003, 06:51 AM   #1
steven
Guest
 
Posts: n/a
Default surpriseremove test error


My driver is for usb device. I try to test
surpriseremove. HCT simulates unpluging device. My driver
steps into PnpSurpriseRemove, PnpRemove and Unload
routine. Whwn HCT try to "insert" device, the device
manager shows :"Windows cannot load the device driver for
this hardware because a previous instance of the device
driver is still in memory. (Code 38)". Why?

  Reply With Quote
Old 02-08-2003, 07:50 AM   #2
steven
Guest
 
Posts: n/a
Default surpriseremove test error


>-----Original Message-----
>My driver is for usb device. I try to test
>surpriseremove. HCT simulates unpluging device. My

driver
>steps into PnpSurpriseRemove, PnpRemove and Unload
>routine. Whwn HCT try to "insert" device, the device
>manager shows :"Windows cannot load the device driver

for
>this hardware because a previous instance of the device
>driver is still in memory. (Code 38)". Why?
>
>.
>


After I restart computer and restart HCT, every thing is
OK! But it's not acceptable. It must work normally on the
first run of HCT. Help me!
  Reply With Quote
Old 12-08-2003, 11:17 PM   #3
Andy Wen [MSFT]
Guest
 
Posts: n/a
Default Re: surpriseremove test error

This could due to improper reference count or an race between load and
unload operations. Or the driver was referenced multiple time by the device.


"steven" <stevenl2003@hotmail.com> wrote in message
news:071b01c358ca$ad6c9b80$a301280a@phx.gbl...
>
> >-----Original Message-----
> >My driver is for usb device. I try to test
> >surpriseremove. HCT simulates unpluging device. My

> driver
> >steps into PnpSurpriseRemove, PnpRemove and Unload
> >routine. Whwn HCT try to "insert" device, the device
> >manager shows :"Windows cannot load the device driver

> for
> >this hardware because a previous instance of the device
> >driver is still in memory. (Code 38)". Why?
> >
> >.
> >

>
> After I restart computer and restart HCT, every thing is
> OK! But it's not acceptable. It must work normally on the
> first run of HCT. Help me!



  Reply With Quote
Old 21-08-2003, 01:09 AM   #4
Karl Foose [MSFT]
Guest
 
Posts: n/a
Default Re: surpriseremove test error

Or, it could also be because your driver is not unloading properly during
the Surprise Removal, and therefore it can't load again when it's
reconnected.

Thanks,
Karl

"Andy Wen [MSFT]" <______@online.microsoft.com> wrote in message
news:3f39757f$1@news.microsoft.com...
> This could due to improper reference count or an race between load and
> unload operations. Or the driver was referenced multiple time by the

device.
>
>
> "steven" <stevenl2003@hotmail.com> wrote in message
> news:071b01c358ca$ad6c9b80$a301280a@phx.gbl...
> >
> > >-----Original Message-----
> > >My driver is for usb device. I try to test
> > >surpriseremove. HCT simulates unpluging device. My

> > driver
> > >steps into PnpSurpriseRemove, PnpRemove and Unload
> > >routine. Whwn HCT try to "insert" device, the device
> > >manager shows :"Windows cannot load the device driver

> > for
> > >this hardware because a previous instance of the device
> > >driver is still in memory. (Code 38)". Why?
> > >
> > >.
> > >

> >
> > After I restart computer and restart HCT, every thing is
> > OK! But it's not acceptable. It must work normally on the
> > first run of HCT. Help me!

>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off