Home > Back-end >  JNA related problems: how to turn into a structure of type String parameters
JNA related problems: how to turn into a structure of type String parameters

Time:10-03

Younger brother now in developing a small brands of thermal imaging cameras, had been in hai kang, relatively stable, the company suddenly changed in order to save the cost for a small brand, the development process met the following problems:
To obtain the temperature loads in the process of a callback ,
below
 
Interface FMessCallBack extends StdCallCallback {
Void invoke (int MSG, String pbufs, int dwBufLen);
}

Among them, the MSG is message types, pbufs is the message content,

And then need to complete an operation is to create a structure tagTempMessage , writing pbufs in the structure, the written in c + + way as follows:
 
Pbufs tagTempMessage * tempMessage=(tagTempMessage *);


So how do you use a JAVA implementation to this type String data into ways to structure?

Before my camera in hai kang treated with similar problems in the development process, is converting Pointer type of data structure, the operation is as follows:


The eldest brother to help the younger brother, thank you!
  • Related