A user was having problems where TN5250 v0.17.4 aborted reguarly.
After grilling the user, getting a trace from his session and googling for
WinXP and BitBlt, where the error ocurrs, I figured it all out.

In short: WinXP "protects" the screen while Ctr-Alt-Del panel shows, when
manually Locked by the user, when screensaver prompts for password. While
protected WinXP issues constant WM_PAINT events to the application. When
TN5250 tries to repaint the screen WinXP punishes it for trying to write
to a protected screen (BitBlt fails with 6 Invalid Handle). When the
screen is no longer protected everything works fine again.

I'm new to Windows screen handling so I'm not sure what the best way to
handle this is.
- Looping forever with a Sleep() worked fine but that doesn't sound like
good programming.
- Bailing from the above loop and ignoring the error worked fine. Sounds
- Bail out of the WM_PAINT (winterm.c) with a non-zero return code. Sounds
most proper but I can't even try that till next week.

Does someone with windows screen handling experience have advice on the
most proper way of correcting the problem?

------- Click on this link, and when the site opens, click on the purple
box that says: Feed an Animal for free.
Verification: http://www.snopes.com/inboxer/charity/animalrescue.asp

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].