include "NSLog.incl" // FutureBasic function local fn Query( buffer as ptr, size as ^unsigned long ) as long CFStringRef string = @"Here am I" ptr p = fn StringCStringUsingEncoding( string, NSASCIIStringEncoding ) *size = len(string) BlockMoveData( p, buffer, *size ) end fn = 1 // C code BeginCCode char buffer[1024]; size_t Size = sizeof(buffer); if ( Query( buffer, &Size ) == 0 ) { // call FutureBasic function NSLog(@"failed to call Query\n"); } else { NSLog(@"%s",buffer); } EndC HandleEvents