如何取DLL返回值?
function Java_com_gsxunjiansys_CommDLL_BeanDLL_termcommopen(PEnv: PJNIEnv; Obj: JObject;Port: JString;Var OPort:String):Jint;
var //;Var i:JString
JVM: TJNIEnv;
DPort:Pchar;
Begin
result:=0;
JVM := TJNIEnv.Create(PEnv);
DPort:=PChar(JVM.UnicodeJStringToString(Port));
OPort:=Port;
JVM.Free;
if Term_CommOpen(Pchar(DPort)) then
Begin
Application.MessageBox(pchar(DPort), '提示', MB_IconInformation);
result:=1;
End;
End;
----------
DELPHI写的DLL函数,想在JAVA里返回OPort这个参数的值,怎么写这个函数?另外函数已经返回0或1。