Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
hi,
 
As part of my project, i need to measure the USB enumeration time in OS and display to the user. I'm not sure whether that's already implemented in Windows 7. So, if it's not implemented, can i use Python to get the same, or which is the good language to get those values?
 
Please help.
 
Thanks,
Pramod
Posted 12-Feb-12 23:09pm
Comments
Jochen Arndt at 13-Feb-12 8:00am
   
What exactly do you mean by USB enumeration time? The time from pluggin in an USB device until its presence is signalled by Windows?
pramod037 at 13-Feb-12 11:24am
   
Yes, that is the time i need to measure in Windows.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hope this helps
 
http://www.teamwavelength.com/permanent/usb/docs/api/src/cs-win-001.html[^]
 
Accept and vote this if helps
--Rahul D.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

As far as I know, Windows does not measure the time itself. There is no reason to do so.
 
If there is any solution to measure the time, C++ would be the best choice. Because you need to add some kind of low-level handler that is triggered by the plugin event. When an USB device is plugged in, a WM_DEVICECHANGE / DBT_DEVICEARRIVAL message is posted to all top level windows when the device is ready for use. This can be used to detect the end time. But detection of start time requires hooking deep into the kernels USB driver.
 
This link describes what happens upon plugin [^].
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 504
1 Maciej Los 349
2 Kornfeld Eliyahu Peter 325
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,303
1 DamithSL 4,764
2 Maciej Los 4,306
3 Kornfeld Eliyahu Peter 3,914
4 Sergey Alexandrovich Kryukov 3,538


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 13 Feb 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100