Hi , been at this all day

I guess I'm still missing something about using dialog boxes. I'm not that experience with debuggers either but I think I'm working with OllyDbg pretty well.

The Problem is that my lil' proggie goes from the entry point to call nt.dll.zwTerminateprocess.
Before the rest of the code is excuted I'm guessing it has something to do with


00401000 >/$ 6A 00 PUSH 0 ; /pModule = NULL


00401002 |. E8 4D030000 CALL <JMP.&kernel32.GetModuleHandleA> ; \GetModuleHandleA


OllyDbg keeps screaming about an access violation when reading FFFFFFFFh
Why would it be trying to read that addy? Dunno? I do not see it anywhere in Odbg :stupid:
 

Call stack of main thread
Address Stack Procedure / arguments Called from Frame
0012FEAC 77F62727 ? ntdll.77FA5554 ntdll.77F62722
0012FEB8 77E798CC ? <JMP.&ntdll.LdrShutdownProcess> kernel32.77E798C7
0012FFA8 77E7990F ? kernel32.77E79895 kernel32.77E7990A
0012FFBC 0040101F ? <JMP.&kernel32.ExitProcess> pe-info.<ModuleEntryPoint>+1 0012FFB8
0012FFC0 00000000 ExitCode = 0


Could anyone plz explain why it would jump to ExitProcess, been stabbing my brain since 8am on this one. Thanks donkey for info and bluffer for proc help :)
Posted on 2004-01-07 20:41:49 by Tweak
Hi, Tweak

I did some changes in your program. :grin:

The main problem was:

	.elseif uMsg==WM_COMMAND

.if lParam!=0
mov eax,wParam
.if ax==IDM_OPEN
invoke ShowExportFunctions,hDlg
.else ; if ax==IDM_EXIT
invoke SendMessage,hDlg,WM_CLOSE,0,0
.endif
.endif


and

DialogBoxParam function returning -1.

Please, read the
Iczelion Tutorial #10

:) Hope that helps
Posted on 2004-01-07 21:50:26 by Opcode
well there are no resources in your exe
so it will fail when executing dialogbox paramA

i did not check any othere thing
i just opened your exe in olly ---->view--.executable modules---->i dont find any resources
so i viewse executable file and scrolled all the way down to physically verify if res are present

but they are not there so add resoursces to your app before attempting to change any thing else

getlast error from olly on f9 it
ERROR_RESOURCE_DATA_NOT_FOUND (00000714)

btw i took a glance at you .asm again ah so you probalbly pushed all the params to your wsprintfa correctly it seems
but there is proto declaration to wsprintf

what do you mean by PROTO wsprintf C
i dunno never did it my self as you dont have to give protos to apis
as you have included the user32.inc

add resource first then do any other cahnges
Posted on 2004-01-08 09:51:19 by bluffer

well there are no resources in your exe
so it will fail when executing dialogbox paramA

i did not check any othere thing
i just opened your exe in olly ---->view--.executable modules---->i dont find any resources
so i viewse executable file and scrolled all the way down to physically verify if res are present

but they are not there so add resoursces to your app before attempting to change any thing else

getlast error from olly on f9 it
ERROR_RESOURCE_DATA_NOT_FOUND (00000714)



Thanks bluffer,

Thats what keep my head bobbing into Odbg.
Didn't understand what "ERROR_RESOURCE_DATA_NOT_FOUND (00000714)" meant. Guess exactly what it said forgive my ignorance plz.

Thxs, Opcode, but how did you see that Dlg proc was returning a negative #. I still didn't see it in OllyDbg
Posted on 2004-01-08 11:30:30 by Tweak
Hi, Tweak

I never used OllyDbg.
I'm using TRW2000 debugger in Windows 98.
Posted on 2004-01-08 12:16:02 by Opcode