https://bugs.winehq.org/show_bug.cgi?id=50791
--- Comment #2 from Gijs Vermeulen gijsvrm@gmail.com --- I've sent https://source.winehq.org/patches/data/204017 for this.
Contrary to what MSDN states, it seems that retLen is not written in the case where buffer is NULL.
I removed the explicit test for this because the results where inconsistent. The 32bit tests set retLen to 0, while the 64bit tests just leaves it be. You can see this here: https://testbot.winehq.org/JobDetails.pl?Key=88883