Alas, I can't help with those issues.
I looked up plugindoc.pdf (for version 7), but that won't help, as IDE_GetSelectedText() has issue #1, too.