Using TlsGetValue internally
javatroubadour at yahoo.com
Fri May 22 08:14:07 CDT 2009
I'm playing with user32/cursoricon.c and winex11.drv/mouse.c and have noticed that one of the TODOs is that SetCursor (and probably lots others) clear the last error when they do not do so in windows. I tracked down the cause and winex11.drv's primary function for retrieving its per-thread data, x11drv_thread_data() calls the public kernel32 function TlsGetValue, which must set the last error to zero by specification.
So, should we be using some internal function to get the TLS data that does not alter SetLastError or should we just save the last error in winex11.drv, call TlsGetValue and then restore the last error state? The later seems hack-ish, but the former sounds like a pain.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wine-devel