Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Pass a javascript string to a C unsigned char array

I have a javascript string in init.js that I would like to access as an unsigned char array in an FFI called function. I can get FFI working with simple variables, but I can't figure out how to do this with strings or arrays (or even if it can be done). Passing a pointer to where the string lives in javascript seems to be one way to do this, but I can't figure out the syntax. Has anyone seen this type of problem? Thanks for your help, JSW

Comments

Sign In or Register to comment.