News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

USB port on off

Started by starzboy, August 27, 2009, 11:39:10 AM

Previous topic - Next topic

starzboy

Hello

Does a function exist to do detect and power on or power off a USB port ?
If not, then what are alternatives ?

Please advise.

Astro

Hi,

You have to enumerate the USB and get down to the details before you can check that.

Start here: http://msdn.microsoft.com/en-us/library/ms791129.aspx

Has everything you need to get down to the specifics of the USB device you want to look at.

I would have working code you could use, but screwed it up and used another method for my needs.

The approximate order you need to call things in is:

SetupDiGetClassDevs
SetupDiEnumDeviceInterfaces
SetupDiEnumDeviceInterfaceDetail

Best regards,
Astro.