odbccp32: Implement SQLGetPrivateProfileString (try 7)

Hugh McMaster hugh.mcmaster at outlook.com
Tue Jul 7 08:47:47 CDT 2015

On Tuesday, 7 July 2015, 10:31 pm UTC+10, Nikolay Sivov wrote:

>On 07.07.2015 11:15, Alistair Leslie-Hughes wrote:
>> +    retval = heap_alloc(cbRetBuffer*sizeof(WCHAR));
>> +
>> +    ret = SQLGetPrivateProfileStringW(sect, entry, string, retval, cbRetBuffer, file);
>cbRetBuffer is A-buffer length, you're still using it as W-buffer length.

Unless I'm reading MSDN [1] incorrectly, this should work.

cbRetBuffer is the size, in characters, of RetBuffer (i.e. the A-buffer).

retval is the W-buffer. Its allocated byte size is double that of RetBuffer,
but its size, in characters, is still the same.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150707/ea40cc21/attachment.html>

More information about the wine-devel mailing list