setupapi: fix string conversion in SetupGetInfInformationA()
Pierre Schweitzer
pierre at reactos.org
Sun Feb 8 13:16:07 CST 2015
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
>
>
--
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3940 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150208/8bda90d2/attachment.bin>
More information about the wine-devel
mailing list