i was going to post this in the VC++ forum but im having problems viewing it, anyways.
i wrote a DLL in VC++ with a bunch of functions that i wanted to call from VB, this part is fine.
however when i test my code from VB, i get different results from testing within VC++
i wont post all the code but ill give a brief snapshot.
VBModule
VBFormCode
[/code]
now this produces
however when i call from my testC++ program the same ofset(13) produces
the only difference i can see is that my VB app uses the release version of the DLL and the C++ app uses the debug version
this has got me totaly stumped, so any input is greatly appreciated.
If somethings hard to do, its not worth doing - Homer Simpson
i wrote a DLL in VC++ with a bunch of functions that i wanted to call from VB, this part is fine.
however when i test my code from VB, i get different results from testing within VC++
i wont post all the code but ill give a brief snapshot.
VBModule
Code:
Public Type myType
A As Long
B As Long
C As Long
'...
K As Long
End Type
Public Declare Function FunctionCall Lib "D:\Visual C++\TestDLL\Release\TestDLL.dll" (ByVal hOffset As Long, ByRef theType As myType) As Long
VBFormCode
Code:
public sub command1_Click()
dim ret as long
dim myOffset as long
dim fred as myType
myOffset=13
ret = FunctionCall (myOffset, fred)
end sub
now this produces
4,557,2668,33924....638550
however when i call from my testC++ program the same ofset(13) produces
4,557,2668,47124....402930
the only difference i can see is that my VB app uses the release version of the DLL and the C++ app uses the debug version
this has got me totaly stumped, so any input is greatly appreciated.
If somethings hard to do, its not worth doing - Homer Simpson