المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : WIA with Vista...



C# Programming
07-13-2009, 12:13 AM
Am I just crazy or is it kind of hard to find a sample on using WIA with a digital camera.. I also read something that you might not be able to do this with Vista?

I got my camera to take a picture...


Item pic;
ImageFile myImg;

pic = _Device.ExecuteCommand(CommandID.wiaCommandTakePicture);
myImg = (ImageFile)_Device.Items[0].Transfer(FormatID.wiaFormatJPEG);


PictureBox picBox = new PictureBox();
picBox.Dock = DockStyle.Fill;
picBox.Image = (Image)myImg.FileData;
this.Controls.Add(picBox);



But on trying to Transfer I get:

Exception from HRESULT: 0x8021006B