I'm calling a CAPL function from a C# function and I'm expected to get in C# the value that the CAPL function returns but it always return the same value that has nothing to do with the one I'm assigning inside the CAPL function. Is there something I need to add in my CAPL function so it can pass the correct value to the C# function I'm calling it from? This is how I'm calling the CAPL function from C# and assigning the return value to a variable:
int var = (int)this.SendRawDiagnosticF.Call(id, bytestosend[0], bytestosend[1], bytestosend[2], bytestosend[3], bytestosend[4], bytestosend[5], bytestosend[6], bytestosend[7]);
This is the way the CAPL function looks:
int ReturnRXIDMessage(long ID, long DLC, long a, long b, long c, long d, long e, long f, long g, long h)
{
long o = 0;
if (messageID == ID + 0x40)
{
o = messageID;
}
return (o);
}