qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] tap-win32: disable broken async write path


From: Andrew Baumann
Subject: Re: [Qemu-devel] [PATCH 2/2] tap-win32: disable broken async write path
Date: Wed, 18 Nov 2015 18:33:01 +0000

From: Stefan Weil [mailto:address@hidden
Sent: Tuesday, 17 November 2015 23:40
> > +#ifdef DEBUG_TAP_WIN32
> > +        LPVOID msgbuf;
> 
> Does this also work ...
> 
>     char *msgbuf;
> 
> 
> > +        error = GetLastError();
> > +
> FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSA
> GE_FROM_SYSTEM,
> > +                      NULL, error, MAKELANGID(LANG_NEUTRAL,
> SUBLANG_DEFAULT),
> > +                      (LPTSTR)&msgbuf, 0, NULL);
> 
> ... and remove the type cast here? If it works without compiler
> warnings, I'd prefer that variant.

Thanks Stefan. I was able to change the declaration to LPTSTR and avoid the 
cast, but am reticent about changing it to a bare char *, because the 
definition of LPTSTR depends on #ifdef UNICODE. I also fixed a lurking bug I 
had accidentally introduced in the event that WriteFile completes synchronously.

Revised patch incoming shortly...

Andrew



reply via email to

[Prev in Thread] Current Thread [Next in Thread]