Log in

View Full Version : Stop WM_TIMER messages to an app that uses 100% cp


Mac
September 15th, 2004, 16:46
Hi folks,

Just stumbled across this forum and dlownloaded the debugger that everyone seems to like so well. It looks great, but unfortunately the app I'd like to modify is 16-bit.

It's a word game that my wife plays A LOT. It uses 100% cpu which hasn't bothered her comp so far, but am gonna give her another (slightly faster) one which runs a little warmer.

The game constantly gets WM_TIMER messages (I hooked it), but using a sleep in the hook only delays user actions, and cpu still remains at 100%.

I've dabbled with "AttachThreadInput" some but no luck so far (not sure it would even be useful here).

Any idea how to shut off those WM_TIMER messages?

BTW, I do some C programming but know very little about ASM.

Thanks, Mac

Mac
September 22nd, 2004, 13:11
50+ views and no replies... any ideas on this?

Possible? Impossible?

Tried some other versions (scrabble btw), but she REALLY likes this one.

Thanks, Mac

xtreem
September 28th, 2004, 20:30
I think its unlikely the WM_TIMER messages are causing the 100% cpu usage. If you want to turn them off or slow them down though, find the SetTimer call and adjust the interval amount. The game is likely to behave strangely afterwards though.

Try running the game and pausing it now and then (or profile it with tracing) to see where the tight loop is. You could try putting a sleep or msgwaitformultipleobjects type call in there to stop it spinning.

I am not sure if this applies to 16bit apps though, I havent had much experience with those.