Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

6570 add function in VB DLL

Solved!
Go to solution

 

Hope to add a new function in VB 6570 DLL,detail information as follow

Public Declare Function niDigital_GetTimeSetPeriod Lib "C:\Program Files (X86)\IVI Foundation\IVI\Bin\niDigital_32.dll" ( _

   ByVal vi As Long, _

   ByVal Timeset As String, _

   ByVal period As Double) As long

but run with error "Bad DLL calling convention"? why ?

 

 

0 Kudos
Message 1 of 2
(3,021 Views)
Solution
Accepted by topic author zquan452199

I'm not super familiar with how to call C functions from VB6, but this function is stdcall. One thing that looks incorrect though with what you have is that the period argument should not be ByVal. It's an output parameter.

0 Kudos
Message 2 of 2
(2,958 Views)