[fpc-pascal] android JNI JString to String
herux
heruxi at gmail.com
Wed Apr 27 08:53:44 CEST 2011
Yes, there's bug. thanks you.
I using GetStringUTFChars
function JNI_JStringToString(Env: PJNIEnv; JStr: jstring): String;
var
IsCopy: Pjboolean;
Chars: PChar;
begin
if JStr = nil then
begin
Result := '';
Exit;
end;
Chars:= Env^.GetStringUTFChars(Env, JStr, IsCopy);
if Chars = nil then
Result := ''
else
Begin
Result := String(Chars);
Env^.ReleaseStringUTFChars(Env, JStr, Chars);
end;
end;
-----
-
--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/android-JNI-JString-to-String-tp4340388p4342883.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal
mailing list