locked
how to check if the USB in suspend or resume mode? RRS feed

  • Question

  • Hi All, 

    I am developing a USB client driver in which needs to know if the USB itself in suspend/resume mode. Do you know which function can be invoked to check such information?

    Many thanks
    Alex
    Monday, June 15, 2009 9:50 AM

All replies

  • Hi All, 

    I am developing a USB client driver, and need to know the current power state of USB device in Wince. Somehow, i don't have IOCTL_XXX in the code. 
    Any other function/mechinisam can obtain the current power state of USB device (D0 ~ D4)?

    Thanks a lot.
    Alex
    • Merged by warrentang Friday, June 19, 2009 2:27 AM duplicate
    Monday, June 15, 2009 8:08 AM
  • Try to read about:
    http://msdn.microsoft.com/en-us/library/aa925829.aspx
    http://msdn.microsoft.com/en-us/library/aa932427.aspx

    And pay attention that the name of the device should include the appropriate power GUID.

    Hope this is what you meant.

    Shai
    Monday, June 15, 2009 10:44 AM
  • Hi Shaihi,

    i have checked the threads you have post before. However, i didn't see which function to input the name of the device, only are these for system power notification? I expect to check the suspend/resume state of USB.

    Please help.

    Many thanks
    Alex
    Monday, June 15, 2009 2:07 PM
  • All what I am talking about refers to an OS with Power Manager (included in WM)
    Suspend is power state D4 usually and D1 and D0 are ON states, so this should give you what you are looking for.
    as for the name you should pass:
    {8DD679CE-8AB4-43c8-A14A-EA4963FAA715}\DSK1: - for a block device
    {A32942B7-920C-486b-B0E6-92A702A99B35}\XXX#: - for a general power manageable device.
    Monday, June 15, 2009 3:04 PM
  • Hi Shaihi,

    As far as i know, devices like serial ports have name e.g. {A32942B7-920C-486b-B0E6-92A702A99B35}\COM1, however, USB device doesn't have a name like that. How to set the name of device? and which function do you mean to pass into the name as parameter, POWER_BROADCAST or RequestPowerNotifications?


    Thanks
    Monday, June 15, 2009 3:39 PM