O
Ondona
Guest
Hi there im trying to create a function in visual studio and compile it as a dll (using visual studio 2019) then call that function from within GMS2.
I am able to get integers to work and return correctly but strings dont seem to return correctly
these are two functions that i've ust made to test if it will take and return the values
the sum() funciton works as expects but when i try the txttest() it seems to have a hissy fit and return a random string of characters like this "(!ļæ½"
i dont really have much understanding/experience in c/c++ so more then likely im doing something wrong but can't seem to find any examples of code that returns a string to be used inside GMS2.
I am able to get integers to work and return correctly but strings dont seem to return correctly
these are two functions that i've ust made to test if it will take and return the values
C++:
#define DevDLL extern "C" __declspec(dllexport)
DevDLL double sum(double a, double b)
{
return a + b;
}
DevDLL char* txttest()
{
return (char*)"testing";
}
i dont really have much understanding/experience in c/c++ so more then likely im doing something wrong but can't seem to find any examples of code that returns a string to be used inside GMS2.