I don't think i tested this when i originally wrote this. Unsure if this is going to work as it doesn't convert from UTF-16 to ASCII. Considering the implementation of CallLoadLibrary*Callbacks GetModuleFileName might be better suited for the job.
Originally posted by @F1F7Y in #665 (comment)