Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Use std::string and std::array or std::list /.../

While nothing is modern about this approach, if we're going the WINAPI route, there's very little to be gained by using std::string instead of the LPWSTR that WINAPI offers (and plays nicely with). I would definitely avoid plain C strings (char[]) but rather use the wide version (which is what LPWSTR is under the hood). But for std::array or std::list, I don't see how the codebase would vastly benefit from them.



In that case, make yourself a favour and use WIL, aka Windows Implementation Library.

https://github.com/microsoft/wil




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: