tags:

views:

193

answers:

2

I was wondering if there was a way to simulate a plug and play event through software only. We are testing a driver and we wanted to test the installation of a driver from the start of a pnp event, but we don't want to have a real printer hooked up.

A: 

I'm just going to throw this out there because it's the first thing that popped in my head.

Could you have someone create a USB dongle that registers as the printer? That way it wouldn't be inconvenient to unplug/plug.

toast
+1  A: 

Not really. Drivers (pretty much by definition) operate so close to the hardware that the Operating System has some major challenges faking things. This is especially the case on Real Operating Systems, where performance matters. Performance is the best argument for efficiency, and that in turn is a very good argument against abstraction.

For "smart" devices like printers, the driver might very well send a series of queries. Like, "What firmware do you have installed?" Because if the firmware is 1.0, the driver might have to apply a few workarounds. That's fair game in Plug and Play driver design. Again, this will be non-trivial to fake.

MSalters