V
Vorreiter Johann \(IFDA\)
Hi,
following problem:
in my EXCEL VBA-code I try to call a function from a C++ DLL which has the
following declaration:
long TestFunc( char* TestStr );
In this function the TestStr is modified.
VBA-code:
Declare Function TestFunc& lib "TestDll.dll" ( VBAString as String )
Dim DummyStr as String
DummyStr = "this is a test"
ret = TestFunc( DummyStr )
BUT, after calling TestFunc EXCEL crashes...
As long as I don't touch the string in the C++ funtion everything is ok.
Any other idea how to return a string from a DLL?
Thanks,
Johann
following problem:
in my EXCEL VBA-code I try to call a function from a C++ DLL which has the
following declaration:
long TestFunc( char* TestStr );
In this function the TestStr is modified.
VBA-code:
Declare Function TestFunc& lib "TestDll.dll" ( VBAString as String )
Dim DummyStr as String
DummyStr = "this is a test"
ret = TestFunc( DummyStr )
BUT, after calling TestFunc EXCEL crashes...
As long as I don't touch the string in the C++ funtion everything is ok.
Any other idea how to return a string from a DLL?
Thanks,
Johann