Please take a look at the next code in C#:
CWIMAQImage img = new CWIMAQImage();
img.Type = CWIMAQImageTypes.cwimaqImageTypeRGB32;
CWIMAQAVISession avi = new CWIMAQAVISession();
avi.Open(@"c:\video.avi");
avi.ReadFrame(img, 1, null);axCWIMAQViewer1.Attach(img);
The readframe command throws a type mismatch exception,
Type mismatch (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH)).
but when I write it in VB.NET, it works correctly!
Dim img as New CWIMAQImage()
Dim avi as New avi CWIMAQAVISession()
img.Type = CWIMAQImageTypes.cwimaqImageTypeRGB32
avi.Open("c:\video.avi")
avi.ReadFrame(img, 1)axCWIMAQViewer1.Attach(img)
This code correctly displays image! I'm going crazy! Any ideas?
Mensaje editado por Alvaro Enriquez