How to use unsigned int to be able to use a function for JNA (Java Native Interface)? -
i'm using jna in order use c++ library in java application. using interface in java use these functions. function uses 3 arguments in c++: unsigned int, const char*, , long*. jna implements strings (according documents) in java pass in char*. likewise, uses long[] pass in long*. i'm confused, however, type should pass in unsigned int. char* passed in represents name of file, , no matter type use first argument, not seem recognize file. furthermore, last, long type returns value after function executed. if use short or int type first argument, number seems correct, however, if use long type first argument, incorrect. can help?
for example, here's actual prototype in c++ followed have interface prototype in java:
int jrconnect(unsigned int id, const char* config_file, long* handle); public int jrconnect(int[] id, string[] config_file, long[] handle);
use jna's intbyreference.
Comments
Post a Comment