Detlef Riekenberg wine.dev@web.de writes:
- if (ret) {
needed = WideCharToMultiByte( CP_ACP, 0, InfoW, -1, (LPSTR)Info, cbBuf, NULL, NULL);
if (pcbNeeded) *pcbNeeded = needed;
ret = (needed > cbBuf) ? FALSE : TRUE;
This check is wrong, WideCharToMultiByte will return 0 if the buffer is too small.