setupapi: fix string conversion in SetupGetInfInformationA()

Jacek Caban jacek at codeweavers.com
Sun Feb 8 14:34:52 CST 2015


Hi Pierre,

That's interesting, I always assumed it does :/ Sorry for the comment 
then. BTW, it seems that Wine does the right thing here.

Cheers,
Jacek

On 08/02/15 20:16, Pierre Schweitzer wrote:
> Hi Jacek,
>
> If this is the Wine behavior, then it's wrong [1].
> MSDN states [1]: "If the function fails, it does not call SetLastError.
> An application cannot call GetLastError for extended error information."
>
> [1]:
> https://msdn.microsoft.com/en-us/library/windows/desktop/aa366597%28v=vs.85%29.aspx
>
> Cheers,
>
> On 08/02/2015 20:02, Jacek Caban wrote:
>> Hi Pierre,
>>
>> On 02/08/15 19:59, Pierre Schweitzer wrote:
>>>           inf = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
>>> +        if (!inf)
>>> +        {
>>> +            SetLastError(ERROR_NOT_ENOUGH_MEMORY);
>>> +            return FALSE;
>> You don't need to call SetLastError here. It's already set by HeapAlloc
>> on failure.
>>
>> Jacek
>>
>>
>




More information about the wine-devel mailing list