prevent peekmessage from crashing when msg == NULL
Eric Frias
efrias at syncad.com
Thu Nov 18 08:19:50 CST 2004
"Juan Lang" <juan_lang at yahoo.com> wrote:
> > Somewhere, for some reason, our client code was calling
> > PeekMessage(NULL, ...), basically asking windows to
> > discard a single message without returning it. From the
> > MSDN docs, this seems like an illegal use of the function,
> > but Windows does the right thing when we do it and wine
> > crashes.
>
> This sounds like a good place to write a test case.
I must admit I've never looked at the test suite. What kinds of things
should have tests? Are they intended to verify implementations of the
undocumented or poorly-documented parts of the windows API? I guess by that
standard, the other patch I posted which fixed the behavior of two
consecutive calls to OpenClipboard() would be another good candidate for a
test case.
I'll take a look at the test code when I get a chance and see if I can make
a proper test for this when I get a chance. It might take me a while to get
around to it, right now I'm under pressure to get winelib working on HPUX.
Until this week, we've been working with a version of winelib that was over
a year old so we were never able to submit reasonable patches. We've been
sitting on most of these changes for the better part of a year, so I wanted
to get them out in the open before we fall behind again.
> p.s. and I'll call that bluff: how _do_ you know what happens when you
> have more than 500 printers defined? ;)
One of our customers, of course, wanted to run our software on a machine
with nearly 600 printers installed. I kept looking at the debugging logs
and thinking that there *must* be an infininte loop in the printcap
parser... I'm still having a hard time wrapping my head around that one; I
have two printers installed and I still print to the wrong one more than I
care to admit.
Eric
More information about the wine-devel
mailing list