News:

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

DialogBoxParam causes excessive CPU usage??

Started by Shooter, December 15, 2010, 04:36:09 PM

Previous topic - Next topic

jj2007

Quote from: Farabi on December 16, 2010, 05:46:54 AM
I bet you access a wrong memory address. Maybe you should replace the "[variable]" with "variable".
See replies #12 and #14 ("Btw..").

MichaelW

Quote from: Shooter on December 15, 2010, 04:36:09 PM
Using OllyDbg I've found that the program never exits from this line (it gets stuck between kernel32 and ntdll if I use Animate Trace):

invoke DialogBoxParam,[hInstance],IDD_DLG1,0,ADDR DlgProc,0


DialogBoxParam, like the other functions that create modal dialogs, does not return until the dialog is destroyed.
eschew obfuscation

Shooter

Quote from: MichaelW on December 16, 2010, 05:32:17 PM
DialogBoxParam, like the other functions that create modal dialogs, does not return until the dialog is destroyed.

Oh, that makes sense. Thanks.

I still haven't figured out why when I launch it from within RadASM the CPU usage is so high, and the dialog box never appears; yet from Windows Explorer it launches just fine. Strange. I wonder if it changed RadASM somehow.

-Shooter
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.