Returning unicode string through function argument.
Hi all,
I have following function written in a C++ dll. I need to be able to call it from Java using JNI. This function expects to receive a buffer pointed by wchar_t * of "int len" length. It will copy write some text in to this buffer and i need to be able to get this updated Unicode string in Java code. please let me know how to write Java code to call this function.
int getWString(wchar *ch,int len)
{
wcsncpy( ch, L"Hello unicode world", len);
return 1;// no error
}
Best Regards
Noman Khan

