The data type for /com/TextEntry
is a bit tricky, it requires an LPSTR. Which is a raw 8-bit encoded string pointer. You can do this by passing a char[] for the argument. Fix:
meta.SetQuery("/com/TextEntry", "xxx".ToCharArray());
Do note that text encoding might be an issue if you use non-ASCII characters, you'll get text encoded in the machine's default code page (Encoding.Default).