Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I define a data type as an "IMG_ERR"?

For instance

 

imaq1394ConfigureAcquisitionCW (sessionId As SESSION_ID, continuous As Long, bufferCount As Long) As IMG_ERR

 

 

0 Kudos
Message 1 of 6
(8,090 Views)

Dim errorVariable As IMG_ERR

 

Have you added imaq1394.dll as a reference

Message Edited by CXB on 10-29-2008 02:00 PM
Chris Bolin
LabVIEW Partner Program, CLA
Message 2 of 6
(8,060 Views)

yes, i have added it as a reference

 

 

when i type the following

Public Declare Function imaq1394ConfigureAcquisitionCW Lib "imaq1394.dll" (ByVal sessionId As Integer, ByVal continuous As Integer, ByVal bufferCount As Integer) As IMG_ERR

 

the DE tells me that

 

'type IMG_ERR is not defined' 

0 Kudos
Message 3 of 6
(8,021 Views)

Also, is

'-2067990495' a valid session ID number?

0 Kudos
Message 4 of 6
(8,019 Views)

Hi Timmkish,

 

Can you run the "Low Level Grab1394.vbp" example (probably in C:\Documents and Settings\All Users\Documents\National Instruments\NI-IMAQ for IEEE-1394\Examples\VB\Low Level Grab1394)? This example References "NI-IMAQ for IEEE 1394" (imaq1394.dll) and sets a variable to IMG_ERR. It also uses imaq1394ConfigureAcquisitionCW.

 

Just a snippet...

 

Dim sid As SESSION_ID
Dim errorCode As IMG_ERR
Dim myImage As New CWIMAQImage
Dim BufferNumber As Long


Private Sub GrabButton_Click()
    CWIMAQViewer1.Attach myImage
   
    errorCode = imaq1394CameraOpen2(CameraName.Text, IMG1394_CAMERA_MODE_CONTROLLER, sid)
    If (errorCode <> IMG1394_ERR_GOOD) Then
        GoTo Error
    End If
   
    '  Configure a continuous acquisition (continuous = 1)
    '  using 3 hardware buffers (bufferCount = 3).
    errorCode = imaq1394ConfigureAcquisitionCW(sid, 1, 3)
    If (errorCode <> IMG1394_ERR_GOOD) Then
        GoTo Error
    End If

Message Edited by CXB on 11-04-2008 02:57 PM
Chris Bolin
LabVIEW Partner Program, CLA
Message 5 of 6
(8,000 Views)

'-2067990495' should be a valid session ID.  Mine were '-2081623455' and '-2083720607'.

Chris Bolin
LabVIEW Partner Program, CLA
Message 6 of 6
(7,991 Views)