Not sure about `FFI::MemoryPointer.from_string` on a wide character string. You might be able to do something like:

<pre>
ptr = FFI::MemoryPointer.new(:byte, 2 * (utf16.length + 1))
ptr.write_bytes(utf16, 0, 2 * utf16.length)
</pre>

Or make a helper method that does that.