Paramters passing when calling to "Invoke" in RLP / RLPLight


i saw few examples that call to invoke with incompatible params…
C native code function is:
int StartLEDBlink(unsigned int *generalArray, void **args, unsigned int argsCount, unsigned int *argSize)

and the call from C# is:

RLP.Procedure StartLEDBlink = RLP.GetProcedure(elf_file, “StartLEDBlink”);
StartLEDBlink.Invoke(48, false);

Can someone help me with this? what will be *generalArray and **args and so, in C code?

@ shm3 - The example you have shown is using the full RLP, in this case the values are passed as members of the args array, argsCount will be 2 and the generalArray* will be null. The native code should then only be handling the expected data.

All overloads of Procedure.Invoke(Ex) map to the same native function signature. The example that you showed will resolve to Procedure.Invoke(params object[]) which maps all the arguments to the args parameter and associated metadata to argCount and argSize.

To pass an array to generalArray you need to call Procedure.InvokeEx() and the rest of the arguments map to the args parameter as with Procedure.Invoke().