AnsweredAssumed Answered

Transfer file to ENA without Visa with VB6

Question asked by IronMarco on Jun 4, 2010
Latest reply on Dec 2, 2011 by odanzy
I'm trying to transfer status file (.sta) to my Ena 5070B in order to share same setup on many instruments but I have found some problem.
I have start to write code using this post:
but without using VISA command
look the code here

Private Sub cmdLoad_Click()
    'Load file from PC
    CommonDialogEna.Filter = "Sta Files (*.sta)|*.sta"

    If Len(CommonDialogEna.FileName) = 0 Then Exit Sub
    PC_File = CommonDialogEna.FileName
    fileSize = FileLen(PC_File)
    ReDim byteData(fileSize - 1)
    PtrData = VarPtr(byteData(0))
    E5061B_File = "D:\pippo.sta"
    hFile = FreeFile()
    Open PC_File For Binary Access Read Shared As hFile
    isOpen = True
    Get #hFile, , byteData

    If isOpen Then Close #hFile
    strBuf = ":MMEM:TRAN " & E5061B_File & "," & "%#" & CLng(fileSize - 1) & "b" & vbLf
    'Initialize the communication with instrument
    Call initENA
    'trasfer the file to ENA
    'Call viVPrintf(Age506x, strBuf, PtrData)
    Call ilwrt(mDevice, strCMD, lngCount)
    'recall the status on ENA
End Sub

The main problem is the return error to function ilwrt, it is a standard function in '   NI-488.2 DLL entry function declarations
Anyone know the equivalent function of viVPrintf under '   NI-488.2 DLL entry function declarations?