views:

188

answers:

1

I'm working with a C# WIA application and it seems that I have two ways of accessing the WIA device 1) store the object after the initial call to Select Device or 2) store the device's id and use the manager to access the device only when I need it.

I'm assuming that I can keep hold of the device object for as long as I want but I'm unfamiliar with WIA so what would be the best practice here?

Thanks!

A: 

In my experience, storing the object itself can lead to threading issues, if that is a concern for you. I came across threading problems in C++, so I'm not sure if it's also a problem in C#.

Ultimately, I stored the device ID and ended up creating a WIA item object in each thread that handled the device.

mztan