Quote Originally Posted by VladimirF View Post
wrapping it into CString just to attach to a message is absolutely unnecessary. Just use strdup().
unnecessary... maybe... But I'd prefer it to strdup/free, neither of which should ideally be anywhere in a C++ application.

wrapping it in a vector<char> or std::string would be equally acceptable alternatives (and preferable to strdup/free).