All pastes #4394 Raw Edit

AgiNamu

public c v1 · immutable
#4394 ·published 2005-01-17 22:45 UTC
rendered paste body
//The native wrapper:static int ast_mono_wrapper_ast_cli_command(int fd, MonoString * s){	char *s_charptr = mono_string_to_utf8(s);	int retval = ast_cli_command(fd, s_charptr);	g_free(s_charptr); // PASSBYREF? -- FREEIT?	return retval;}// The wireupmono_add_internal_call("Telefinity.ManagedAsterisk.Core.Cli.Native::ast_cli_command", ast_mono_wrapper_ast_cli_command);// In my Cli.Native.cs class:[MethodImplAttribute(MethodImplOptions.InternalCall)]internal extern static int ast_cli_command(int fd, string s);// And then as part  of the Cli object:public int Command(int fd, string s){    return Cli.Native.ast_cli_command(fd, s);}