https://bugs.winehq.org/show_bug.cgi?id=51213
--- Comment #4 from Esme Povirk madewokherd@gmail.com --- The corefx code accounts for failure in those calls, but it expects an "invalid parameter" code, not an "unimplemented function" code which Wine returns. Treating Wine's failure the same way works around the exception, but I don't think it works correctly, because the program incorrectly reports it doesn't have write access to its location.