News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

What's the theory behind the "Message Pump"?

Started by CoR, January 31, 2007, 06:19:43 AM

Previous topic - Next topic

u

ic2, take note of the stack - the parameters are already pushed (hWnd,msg,wParam,lParam), the return address-value points to inside the code of DispatchMessage - so it's better than pushing the same parameters and doing and extra "ret".
DefWindowProc is a Win32 API function.
Please use a smaller graphic in your signature.

ic2

#31
Thanks Ultrano for explaining the un-seen.

I playing with it to understand what's going on with Olly.  But it crash after Olly execute the window "only" when I run the mouse over the window tooltips buttons displaying Close, Maximize, Minimize it crash Windows98 completely.  I don't have Olly experience.  Maybe that what happen with any program after Olly execute it.  Maybe that extra "ret" is needed.  If not,  I just thought I should mention it.

Anyway Olly do show  DefWindowProc being used even when there is no label for it. But I think I see what you mean and will be exploring it all today.  WoW ... this is going to be really interesting for my knowledge of ASM. When I come out of this i should really finally be on the ball a whole lot better  :)  Not to take away from others people efforts around here but  Lingo style is    ....  Awesome!!!   .... Thanks CoR

u

Or maybe it's just an effect of the lack of "emms" ? I don't have a win98 to test it on - could you try the same with a compilation, where there's emms after the group of mmx instructions?
Please use a smaller graphic in your signature.

ic2

Quotecould you try the same with a compilation, where there's emms after the group of mmx instructions?

I don't have a clue of where to start other than starting all over  to learn about dos and work my way up to win32 asm as I should had done in the first place.  That show you what i really know . ..

Anyway, if it's don't take much time for you to put it together I can't test it on Win98se and Win95b and post the results in minutes .  It will be tested on a Intel Pentium(r) II, 128MB machine.  If i see it than I have a idea of how to use it and  modify it if i have a problem. Shame on me, all I am is a code monkey.  Not a true coder in my mind as of yet... but i can usually modify like a pro when needed.

ic2

I did a search here to get an idea of how to use EMMS and see it's as simple as placing the line below the MMX code like you said.  I never played with MMX code before and had no idea of what you meant by technical way of speaking.  I thought it was a major operation...

Anyway, I put the line under "both" blocks of MMX code and now Olly don't  crash  anymore  at the mouseover but it will now crash if  i click the close button.  What an amazing improvement.  Hummmm going to try to find the other correct places to use EMMS to eliminate the close crash if possible...  I may need more guidance, but i will make the effort to read about EMMS and the study the code that i found using it... in a few minutes...