Not responsing while plug-in/out an USB device form several times

Win2K, VC, USB

Hi all:

I found a problem while I was developing an USB application.

My USB devices are in 2 types. One’s reading/writing speed is much faster than another. When my application is reading from the slow one and I plug in several this type devices into the USB hub, my application can get the notification from the USB driver and read new data from the new USB devices. After I do this plug-in operation for several times (while my application is reading data from the removed device or others), the application stops responsing to the user. In the VC IDE, I found the program stops in NTDLL on ‘ret 14h’. And sometimes, SoftICE catches the faults of usbhub.sys.
As I mentioned, this problem does not occur on the faster device’s operation.

Does here anyone meet this problem? And has any hints?
Or this is a bug of windows (usb)?

-Ray Yang
EMail: xxxxx@yahoo.com

???y˫???+.n?+???u?ڲ˛??^r*D???kN???r??zǧu??jy???^j???ׯ??? 0?j?b??(??(

I’ve tested it for several times, and the last instruction in the stack in SoftICE is ’ usbhub!.text+2145’.
Does here anyone have any idea?

-Ray Yang
xxxxx@yahoo.com

In your mail 2001-04-22 21:23:00

Win2K, VC, USB

Hi all:

I found a problem while I was developing an USB application.

My USB devices are in 2 types. One’s reading/writing speed is much faster than another. When my application is reading from the slow one and I plug in several this type devices into the USB hub, my application can get the notification from the USB driver and read new data from the new USB devices. After I do this plug-in operation for several times (while my application is reading data from the removed device or others), the application stops responsing to the user. In the VC IDE, I found the program stops in NTDLL on ‘ret 14h’. And sometimes, SoftICE catches the faults of usbhub.sys.
As I mentioned, this problem does not occur on the faster device’s operation.

Does here anyone meet this problem? And has any hints?
Or this is a bug of windows (usb)?

-Ray Yang
EMail: xxxxx@yahoo.com


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

Hello,

When your User mode application talk’s with your driver than two
things are important.

  • your driver must register a GUID
  • Use RegisterDeviceNotification() in your user mode application
  • When the device is removed the user application is the first
    signaled instance for this event.

now close the driver instance !!

  • when the usb driver receives the IRP_MN_REMOVE_DEVICE IRP request
    all is fine and the driver is successfully unloaded

  • when the device is plugged in the user mode application signaled
    again and you can open the usb driver instance again.

elli


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