The return type is MCDataRef so you have to create one: MCDataCreateWithBytesAndRelease(...)