OK, now it's getting comical...
I removed the second mathscript node from clasclap.vi and created a dummy LV math operation to replace it. Called the new vi clasclap_part.vi (attached) and added it to the project in place of clasclap.vi. Built the dll as usual. BTW, I'm using the standard calling convention here, not the C language convention.
RESULTS: All of the called functions return zeros, even clasclap_part.vi. But some good news: the dll isn't crashing Visual Studio anymore.
Now I'm realizing that the functions returning zeros issue greatly overshadows the reason I originally started this thread. If I don't get any response, I'll start an independent thread that someone might take an interest in....
What might be helpful here would be if someone could (hopefully easily) take the summer .vis and the clasclap_part.vi and build their own dll. Then, try to call it from VB6 and/or any other language or compiler. What do you get?
(FWIW, I never mentioned that I'm not a fan of VB or Visual Studio. LabVIEW is far superior IMHO)
Here is the revised VB code which calls the dll:
Private Declare Function Summer Lib "summerlib" (ByVal a As Long, ByVal b As Long) As Long
Private Declare Function Mathscriptsummer Lib "summerlib" (ByVal a As Long, ByVal b As Long) As Long
Private Declare Function Doublesummer Lib "summerlib" (ByVal x As Double, ByVal y As Double) As Double
Private Declare Function Clasclap_part Lib "summerlib" (ByVal x As Double) As Double
Sub Form_Load()
Dim x, y, fx As Double
Dim a, b, sum As Long
a = 1#
b = 2#
x = 1.2345
y = 2.3456
fx = 1
sum = Summer(a, b)
fx = Doublesummer(x, y)
sum = Mathscriptsummer(a, b)
y = Clasclap_part(290.01)
End Sub
Thanks,
Ted