I have an old program that I use to remotely control a digital camera to automatically take photos and transfer them to a PC. The program is based on WIA and, as I recall, it was originally developed and used in Windows XP.
Recently I left the archives and tried to get it to work on 64-bit Windows 7 using the same camera. Finding a camera and starting capture is no problem. However, when executing this line:
//device of type WIA.Device Item item = device.ExecuteCommand(CommandID.wiaCommandTakePicture);
Coming back
null, leaving no reference to the image for transmission. They were looking for a high and low solution, but could not come up with anything. Found another QA site where the answer suggested using:
//manager of type WIA.DeviceManager, device of type WIA.Device manager.RegisterEvent(EventID.wiaEventItemCreated, device.DeviceID); manager.OnEvent += new _IDeviceManagerEvents_OnEventEventHandler(manager_OnEvent);
one could receive events containing ItemID after image capture. They tried it, and no event came up.
source share