i have coded the function in c++ like this
#include <string>
using namespace std;
#define Dllexport _declspec(dllexport)
Dllexport string _stdcall reversestring(string instring);
Dllexport string _stdcall reversestring(string instring)
{
return instring;
}
the function call in VB looks like this
Declare Function sayhello Lib "C:\c++\samples\dll\passstring\Debug\passstring.dll" Alias "?reversestring@@YG?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@Z" (ByVal instring As String) As Integer
When I access the function VB crashes If i do the same thing coding it for integer values i have no problems
I'm New to C++ what am i missing ?
Is there a way to make the function names more readable ?
#include <string>
using namespace std;
#define Dllexport _declspec(dllexport)
Dllexport string _stdcall reversestring(string instring);
Dllexport string _stdcall reversestring(string instring)
{
return instring;
}
the function call in VB looks like this
Declare Function sayhello Lib "C:\c++\samples\dll\passstring\Debug\passstring.dll" Alias "?reversestring@@YG?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@Z" (ByVal instring As String) As Integer
When I access the function VB crashes If i do the same thing coding it for integer values i have no problems
I'm New to C++ what am i missing ?
Is there a way to make the function names more readable ?