<DllImport("tira2.dll", CharSet:=CharSet.Auto)> _
Private Shared Function tira_get_captured_data(ByRef data As IntPtr, ByRef size As Integer) As Integer
End Function
<DllImport("tira2.dll", CharSet:=CharSet.Auto)> _
Private Shared Function tira_delete(ByVal ptr As IntPtr) As Integer
End Function
Sub Tira()
Dim data As IntPtr = IntPtr.Zero
Dim dataSize As Integer = 0
Dim res As Integer = 0
res = tira_get_captured_data(data, dataSize)
'//TODO: Work with (data) pointer.
If data.ToInt32 <> 0 Then
' free heap memory
res = tira_delete(data)
End If
End Sub
|