sandheep
August 13, 2005, 03:02:02
I'm writing a VB.net 2k3 app and am having problems with the image capture.
My app displays live images just fine from my Sony XCD-X710 camera.
When I run the sub below, I get the following error:
An unhandled exception of type 'System.InvalidCastException' occurred in Cleaving Capture.exe
Additional information: Specified cast is not valid.
Here is the sub:
Private Sub cmdCapture_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCapture.Click
Dim Buf As ICImagingControl.ImageBuffer
Buf = icMain.ImageActiveBuffer 'error on this line
Buf.SaveAsJpeg(lblFileName.Text, 100)
End Sub
Any ideas what would cause this error?
Thanks,
Sandheep
My app displays live images just fine from my Sony XCD-X710 camera.
When I run the sub below, I get the following error:
An unhandled exception of type 'System.InvalidCastException' occurred in Cleaving Capture.exe
Additional information: Specified cast is not valid.
Here is the sub:
Private Sub cmdCapture_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCapture.Click
Dim Buf As ICImagingControl.ImageBuffer
Buf = icMain.ImageActiveBuffer 'error on this line
Buf.SaveAsJpeg(lblFileName.Text, 100)
End Sub
Any ideas what would cause this error?
Thanks,
Sandheep