[4420] in java-interest

home help back first fref pref prev next nref lref last post

How to use makeJavaString ?

daemon@ATHENA.MIT.EDU (Ramprasad Golla)
Fri Dec 22 19:06:57 1995

Date: Fri, 22 Dec 1995 15:41:54 -0700
From: Ramprasad_Golla@novell.com (Ramprasad Golla)
To: java-interest@java.sun.com

Hai,

I have been trying to return a string from my native method.
the code is very simple:
Hjava_lang_String *NDS_GetContext(HNDS *Hthis)
{
   char *ptr = "Hello";
   return makeJavaString(ptr, strlen(ptr));
}
I am using MS Visual C++ 4.0, as a step over the makeJavaString()
statement the debugger exits with code 3 (0x3)!

What am I doing wrong here?
My understanding is makeJavaString() expects a "C" string not
a unicode string!

Thanks in advance,
Have a nice holidays,
Ram


-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post