Programatically ejecting/re-inserting one of the devices from a USB composite device.

I would want to know how i can programatically eject/reinsert a flash media from a USB composite device without actually affecting the device stack of the other device.

I have tried DEVCON provided in the DDK… It only removes the logical partition from the explorer but the LED on the flash will be ON.

Pointers or suggestion are highly appreciated.

raghu wrote:

I would want to know how i can programatically eject/reinsert a
flash media from a USB composite device without actually
affecting the device stack of the other device.

Based on what you write below, it seems like you already know how to do this.

I have tried DEVCON provided in the DDK… It only removes the
logical partition from the explorer but the LED on the flash
will be ON.

It sounds like you really want the LED to turn on and off. If the generic parent is loaded and still controlling the other interface, and the LED is controlled by the port being powered up, this will never work.

xxxxx@mindtree.com wrote:

I would want to know how i can programatically eject/reinsert a flash media from a USB composite device without actually affecting the device stack of the other device.

To the best of my knowledge, there is simply no way to do this. You can
remove the logical partition, as you saw, but then I don’t know of any
way to force it to come back to life. You can do IOCTL_USB_CYCLE_PORT,
but that’s going to restart both interfaces.

Remember that interfaces are just a software convenience – a way of
grouping endpoints and helping operating systems to manage drivers. The
USB wire protocol does not use the interface concept at all. It’s only
in the descriptors. That’s why endpoint numbers must be unique across
the entire configuration.

I have tried DEVCON provided in the DDK… It only removes the logical partition from the explorer but the LED on the flash will be ON.

Right. The LED says that the thing has power. As long as you are
plugged in, you have power.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

hi,
We have tried to use Devcon utility for device disable and enable features. But when the device is plugged out the host still considers it to be surprise removal.

Is there any way to avoid this surprise removal?

Also is there any way to power off and power on the ports from the application?

I want to achieve this without physically removing the device from the port.

No, you cannot control the power state of the port from UM.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@mindtree.com
Sent: Friday, July 20, 2007 12:15 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Programatically ejecting/re-inserting one of the
devices from a USB composite device.

hi,
We have tried to use Devcon utility for device disable and enable
features. But when the device is plugged out the host still considers it
to be surprise removal.

Is there any way to avoid this surprise removal?

Also is there any way to power off and power on the ports from the
application?

I want to achieve this without physically removing the device from the
port.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Inline.


David J. Craig
Engineer, Sr. Staff Software Systems
Broadcom Corporation

wrote in message news:xxxxx@ntdev…
> hi,
> We have tried to use Devcon utility for device disable and enable
> features. But when the device is plugged out the host still considers it
> to be surprise removal.
>
Remove the driver might do it, but seems a little over the top. PnP devices
are generally controlled by physical presence and not turned on and off by
software.

> Is there any way to avoid this surprise removal?
>
Don’t remove it.

> Also is there any way to power off and power on the ports from the
> application?
>
> I want to achieve this without physically removing the device from the
> port.
>

Hi,
I want to use devcon utility in an application I am developing.
Please let me know if I can use the one provided in DDK, as-is, without violating copyright?

You can use it as the basis for your utility w/out an issue, but don’t
distribute it with the name devcon.exe

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@mindtree.com
Sent: Monday, July 23, 2007 3:06 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Programatically ejecting/re-inserting one of the
devices from a USB composite device.

Hi,
I want to use devcon utility in an application I am developing.
Please let me know if I can use the one provided in DDK, as-is, without
violating copyright?


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

No, just add SetupDiCallClassInstaller calls to your app.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> Hi,
> I want to use devcon utility in an application I am developing.
> Please let me know if I can use the one provided in DDK, as-is, without
violating copyright?
>
>
>
>
>