As far as I know this is a pointer to an unsigned int variable.
Via b4r_main::_encrypted_len = olen; all works but I want to drop that extra step and use/cast the variable directly to a B4R variable. I tried (uint8_t*) and other things but it didn't work.
to store a byte in B4R in a variable accessible in c++ by pointer for read/write: i think it can be done with ArrayByte
in B4R:
Dim datx(1) as byte
datx(0) = 111
in wrapper c++
uint8_t * varx = datx->data;
xxx = &varx[0];
===> xxx will be a pointer to your variable in B4R and a modification under c++ will change B4R variable value
As in the other B4X tools you can embed C or C++ code in the project. Example: Sub Process_Globals Public Serial1 As Serial Private Result, N1, N2 As Int 'ignore End Sub Private Sub AppStart Serial1.Initialize(115200) Log("AppStart") N1 = 10 N2 = 20 RunNative("Add", Null)...
Thanks for your reply. I tried several things (uint/Int), cast to uint_16t* and even unsigned_int* or size_t*. Either it didn't compile (x cannot be casted to y) or it compiled and then I go a kernal panic/crash (memory violation).