[英]convert String of c# to java using JNA
I am using JNA to deal with dll build in C#. 我正在使用JNA处理C#中的dll构建。 I have
我有
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
public String serialNumber;
code in dll dll中的代码
How to match serialNumber in java? 如何在java中匹配serialNumber?
Did you try Java's String
? 您尝试过Java的
String
吗?
It looks like C#'s string
is the adequate translation to C's char*
, and as Java's string
is the adequate translation of C's char*
, I would suppose it would work. 看起来C#的
string
是对C的char*
的适当转换,而Java的string
是对C的char*
的适当转换,我想它会起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.