mijq

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. Again thanks to Tetus, Now I have something that might become a program that works
  2. Thanks Tetus, I will try and modify this and see if it works in vb.net
  3. Got a little further: Imports System.Runtime.InteropServices Public Class frmMain <DllImport("dwf.dll")> Public Shared Function FDwfDeviceOpen(ByVal idxDevice As Integer, ByRef phdwf As IntPtr) As Integer End Function Dim hdwf As IntPtr Private Sub frmMain_Load(sender As Object, e As System.EventArgs) Handles Me.Load Try FDwfDeviceOpen(-1, hdwf) Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub End Class It seems that the <DllImport..> works, but the program throws an exception: A call to PInvoke function 'testAnalogDiscovery2!testAnalogDiscovery2.frmMain::FDwfDeviceOpen' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature. Please advise
  4. Thanks, but it does not bring me any further. I use vb.net and not vb 6.0. Do you have any example code where the c++ functions are imported into a vb.net or c#.net program?
  5. Just downloaded Waveforms and would like to use the dwf.dll in a vb.net program. When trying to include the dll as a reference I get an error that it is not recognized as a valid COM component or assembly. Do you have a compatible wrapper or other suggestion? Regards mijq