How to update Native Object pointed to by Pointer

17 views
Skip to first unread message

CoolGuy

unread,
May 23, 2017, 10:04:46 AM5/23/17
to NativeLibs4Java

I have a special situation where I want to update my C memory structure pointed to by variable Pointer<NativeStruct> pInfo in java. So i want to update few members of this structure, I am using following code,

NativeStruct info = pInfo.get();

info.x= 2048;
info.y =2048;
...
...
pInfo->SetNativeObject(info, NativeStruct.class);

But above statement is not making any updates to the C structure. I also tried pInfo->set() but unfortunately it is leading to crash.

I am using Bridj 0.7.0 along with java 8.
Help needed.


Reply all
Reply to author
Forward
0 new messages