odbccp32: Implement SQLGetPrivateProfileString (try 4)
Nikolay Sivov
bunglehead at gmail.com
Sat Jun 13 05:55:38 CDT 2015
On 13.06.2015 12:41, Alistair Leslie-Hughes wrote:
> + ret = SQLGetPrivateProfileStringW(sect, entry, string, retval, cbRetBuffer, file);
> + if(ret)
> + {
> + int i, len;
> +
> + len = ret < cbRetBuffer ? ret : cbRetBuffer;
> + for (i=0; i < len; i++)
> + RetBuffer[i] = retval[i];
> + RetBuffer[i] = 0;
> + }
You can't convert it like that, the idea is to do A->W conversion for
inputs and W->A for output. Inputs are handled by heap_strdupAtoW(), so
you need a single WideCharToMultiByte for retbuffer.
More information about the wine-devel
mailing list