Should I store the WIA Device or just the WIA Device ID in a C# application?
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 wou开发者_开发知识库ld be the best practice here?
Thanks!
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.
精彩评论