[Mono-list] Mono embedding: invoke c code with char*
Ing. Francesco Carsana
francescocarsana at ds4.it
Wed Apr 9 03:43:25 EDT 2008
Hi,
I'm working with mono embedding, and I'm trying
to invoke a c function that accepts two
parameters:
[MethodImpl(MethodImplOptions.InternalCall)]
private unsafe extern static void
OnConnectHandler(char* _ipAddress, bool _connected);
This function is invoked inside this method:
private static void OnConnect(string _ip, bool _conn);
The problem is: how can I convert string to char*?
Is it possible to invoke mono_string_to_utf8?
Thank You.
Francesco.
More information about the Mono-list
mailing list