This is not an initialized string object. It's a STRING pointer pointing to a CString. What you need is str_create or just pass a pointer to a STRING object to the function.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com