I'm need to pass a sting into some c++ code and convert the string
to a CFUrlRef. Does anyone have experience doing such a thing? It
doesn't need to be passed back. The c++ code will do what it needs
without returning any value.
I think the usual approach would be to convert the string to a char
or byte array which ever works better with what the native method
expects.
IIRC there is a version of the native routine to create a CFUrlRef
from a unicode character sequence directly, without having to muck
about with converting the Java unicode sequence to an 8-bit format,
and then have Core Foundation decode it back into unicode. There is
a JNI routine to get the unicode sequence directly. I recently had
to go the other way (CFUrlRef to a Java String), and did it directly
with the unicode sequence, and it worked well.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden