DBT_DEVICEARRIVAL events, access to a number of equipment at the same time, can only capture two, who had tried? Is 3 ~ 4 U disk inserted at the same time, can only capture two DBT_DEVICEARRIVAL events
CodePudding user response:
Didn't try, dare not speak
CodePudding user response:
reference 1st floor gz_qmc response: didn't try, dare not speak This news closed, if it is below 2, there is no problem, access to three at the same time, always lose 1, access to 4 at the same time, always lost two CodePudding user response:
Get the number of more than 2 But at the same time insert is what mean? A few people together to put this test? CodePudding user response:
reference boylafong reply: 3/f can obtain the number of more than 2 But at the same time insert is what mean? A few people together to put this test? For, according to the sequential access, as long as there is time difference, can receive, but at the same time access, is almost a loss under the condition of time, I am looking for a usb hub to do experiments, filled it with U disk, and then put the hub connected to the usb port CodePudding user response:
Haven't tried all of a sudden quick pulling/insert so many USB devices,, Guess: The system broadcasts The DBT_DEVICEARRIVAL device event when a device or piece of media has had been inserted and becomes available. It is also the thing reaction cycle? It is recommended to use DBT_DEVNODES_CHANGED to test, CodePudding user response:
reference 5 floor easunlee reply: haven't tried all of a sudden quick pulling/insert so many USB devices,, Guess: The system broadcasts The DBT_DEVICEARRIVAL device event when a device or piece of media has had been inserted and becomes available. It is also the thing reaction cycle? Recommended DBT_DEVNODES_CHANGED to detect, I am win10 development environment, then run under Windows 7, than win10 effect is better CodePudding user response:
reference 5 floor easunlee reply: haven't tried all of a sudden quick pulling/insert so many USB devices,, Guess: The system broadcasts The DBT_DEVICEARRIVAL device event when a device or piece of media has had been inserted and becomes available. It is also the thing reaction cycle? Recommended DBT_DEVNODES_CHANGED to detect, And this DBT_DEVNODES_CHANGED, can't get U disk drive CodePudding user response:
No one knows, no one tried it, to be exact, DBT_DEVTYP_VOLUME not receive CodePudding user response:
Personal advice, sweep after the message is received, the GetDriveType ==DRIVE_REMOVABLE (szDrv) CodePudding user response:
references 9 f zgl7903 response: personal advice, sweep after the message is received, the GetDriveType (szDrv)==DRIVE_REMOVABLE I got any news? DBT_DEVICEARRIVAL this? CodePudding user response:
references to the tenth floor jackyleu response: Quote: references 9 f zgl7903 response: Personal advice, sweep after the message is received, the GetDriveType (szDrv)==DRIVE_REMOVABLE I got any news? DBT_DEVICEARRIVAL this WM_DEVICECHANGE CodePudding user response:
11 references zgl7903 response: Quote: reference to the tenth floor jackyleu response: Quote: references 9 floor zgl7903 response: Personal advice, sweep after the message is received, the GetDriveType (szDrv)==DRIVE_REMOVABLE I got any news? DBT_DEVICEARRIVAL this WM_DEVICECHANGE Can say some detailed? What's the purpose, I want to drive, can only be DBT_DEVTYP_VOLUME this? CodePudding user response:
11 references zgl7903 response: Quote: reference to the tenth floor jackyleu response: Quote: references 9 floor zgl7903 response: Personal advice, sweep after the message is received, the GetDriveType (szDrv)==DRIVE_REMOVABLE I got any news? DBT_DEVICEARRIVAL this WM_DEVICECHANGE This also tried, or access 3 USB storage devices at the same time, can only handle one, four, can handle only two CodePudding user response:
Type dbcv_unitmask out look, and in the calculator in binary view how a few bit is set to 1, added several volumes, case WM_DEVICECHANGE: The switch (wParam) { Case DBT_DEVICEARRIVAL: If (((PDEV_BROADCAST_HDR) lParam) - & gt; Dbch_devicetype==DBT_DEVTYP_VOLUME) { PDEV_BROADCAST_VOLUME pdvol=(lParam PDEV_BROADCAST_VOLUME); Printf (" % 0 x 8 x \ n ", pdvol - & gt; Dbcv_unitmask); } break; Case DBT_DEVICEREMOVECOMPLETE: If (((PDEV_BROADCAST_HDR) lParam) - & gt; Dbch_devicetype==DBT_DEVTYP_VOLUME) { PDEV_BROADCAST_VOLUME pdvol=(lParam PDEV_BROADCAST_VOLUME); Printf (" % 0 x 8 x \ n ", pdvol - & gt; Dbcv_unitmask); } break; Default: break; } break; CodePudding user response:
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull