Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

pass 2d array of TD1HDL from labview dll to VB.net

Hello,

 

I'm trying to turn the STFTptbypt routine into a dll and call it via VB.net.  The 2d output array is of datatype TD1HDL.  I created the shared library in labview and the function prototype looks like this(i took the error output out):

 

void STFTSpectrogramPtByPt(double x, long sampleLength, long timeIncrement, long windowLength, LVBoolean *initialize, long windowSelector, TD1Hdl *STFTSpectrogramX)

 

Here is the VB.net declaration:

 

    Declare Sub STFTSpectrogramPtByPt Lib "C:\Documents and Settings\Bradley.Bumgardner\Desktop\labview dll\Dll Build\STFT.dll" _
    (ByVal X As Double, _
    ByVal Slength As Long, _
    ByVal TimeIncrement As Long, _
    ByVal Windowlength As Long, _
    ByRef Initialize As Boolean, _
    ByVal WindowSelect As Long, _
    ByRef DoubleArray As Object)

 

So, to test i generate a sine wave (X) with 500 elements and pass it to the dll:

 

 

 Dim mwindowlen As Long = mlen / 2
 Dim mtimeinc As Long = 1
 Dim minit As Boolean = False
 Dim SpecOutArray As object

 Dim Wsel As Long = 1
  

 

 STFTSpectrogramPtByPt (X(0), mlen, mtimeinc, mwindowlen, minit, Wsel, SpecOutArray )

 

I don't get any errors, but I don't get any results either.  any Ideas would be greatly appreciated!  Thanx, B

0 Kudos
Message 1 of 1
(3,715 Views)