SiberianGuy
SiberianGuy

Reputation: 25312

USB storage emulator

I need to emulate insertion and removal of SD cards to write tests. What is the best way/tool to implement it in .NET?

Upvotes: 2

Views: 352

Answers (1)

sehe
sehe

Reputation: 393134

From this page:

How can my application reset, disable, or restart a USB device?

The DevCon example in the WDK is a command-line utility that shows how to enable, disable, restart, update, remove and query devices using the SetupAPI and CfgMgr32 API functions.

I'm pretty sure this will cause insertion/removal events provided that a card is physically inserted.

Upvotes: 1

Related Questions