Hi,
I have a jagged array :
and because of performance issue I would like to use RLPLite C procedure to do the following :
C# version :
messageToDisplay[0] = (byte)(char)2;
messageToDisplay[1] = (byte)(char)1;
for (int i = 0; i < 32; i++)
{
for (int j = k; j < (192 + k); j++)
{
messageToDisplay[cptr] = message[i][j];
cptr++;
}
}
here is my C version :
int RLP_MemSet(void* par0, int * par1, unsigned char * par2)
{
int i=0;
int j=0;
// the passed arguments /////
unsigned char ** message = par0;
unsigned int cptr = par1[0];
unsigned int k = par1[1];
unsigned char * messageToDisplay = par2;
//////////////////////////////
messageToDisplay[0] = (char)2;
messageToDisplay[1] = (char)1;
for (i = 0; i < 32; i++)
for (j = k; j < (192 + k); j++)
{
messageToDisplay[cptr] = message[i][j];
cptr++;
}
return 0;
}
but I don’t know how to pass a 2D array to my rlplite procedure. all the Invoke method are expecting sinle array !?!
trying my code gave me the obvious following error :
GHI.OSHW.Native.RLPLite.Procedure.Invoke(byte[], int[], byte[])’ has invalid arguments
Any solution possible here ?