关于vb.net中未处理COMException
[local]2[/local]Private Sub StopLive1(ByVal Cam_handle As Object)
If Live1 = False Then
'*************************************************************
'停止
Pylon.DeviceExecuteCommandFeature(Cam_handle, "AcquisitionStop")
' ... Switch off the events.
Pylon.DeviceFeatureFromString(Cam_handle, "EventSelector", "ExposureEnd")
Pylon.DeviceFeatureFromString(Cam_handle, "EventNotification", "Off")
Pylon.StreamGrabberCancelGrab(hStreamGrabber)
'上面三句话偶尔出现未处理COMException错误,有时是好的
Do
isReady = Pylon.StreamGrabberRetrieveResult(hStreamGrabber, GrabResult)
Loop While isReady