func (c *CGoSystem) WriteData(producerHandle uint32, buf []byte, flags uint32) (result uint32, bytesWritten uint32) { numBytes := C.uint32_t(len(buf)) r := C.MojoWriteData(C.MojoHandle(producerHandle), unsafe.Pointer(&buf[0]), &numBytes, C.MojoWriteDataFlags(flags)) return uint32(r), uint32(numBytes) }
func (c *CoreImpl) WriteData(producer MojoHandle, data []byte, flags MojoWriteDataFlags) (MojoResult, uint32) { num_bytes := (C.uint32_t)(len(data)) result := C.MojoWriteData(producer.cType(), cArrayBytes(data), &num_bytes, flags.cType()) return (MojoResult)(result), (uint32)(num_bytes) }