All unicode API functions are supposed to support paths longer than `MAX_PATH` if prepended with the extended-path prefix `\?`. As of writing this function in particular doesn't.
This is causing problems with Unreal Engine shader preprocessing when running under Wine.