dllexport doesn't work if linking against a static library with its own copy of snprintf.
looks good, can you add a comment to explain why it's inlined though.