I’m having a problem passing a byte array through the JSB layer to my C++ file implementation which does file saving and reading.
The data arrives as an ArrayBuffer, so I tried to save it as a char pointer as below:
int FileOperation::saveFile(string fileName, unsigned char* file, double size)
However in the JSB file it seems to not be able to convert this.
ok &= jsval_to_std_string(cx, argv, &arg0);
#pragma warning NO CONVERSION TO NATIVE FOR unsigned char*;
ok &= JS_ValueToNumber(cx, argv, &arg2);
I notice that this is the case, because it chops my picture files down to 20480 bytes maximum.
Any hints will be appreciated,
else I will post the answer when Ive crawled to an answer