Hello all!
i have a question regarding a messagebox that looks weird (see mbox.gif).
the code before the MessageBox call reads the com-port, fetching a number then putting it into a buffer:
ive written a driver that changes the IOPM so this process can access the comport (thank you Four-F =).
i have a question regarding a messagebox that looks weird (see mbox.gif).
the code before the MessageBox call reads the com-port, fetching a number then putting it into a buffer:
.data
...
tmpbuf db 30 dup(0)
tmp db 'Det h?r talet togs emot! %i',0
...
.code
...
mov dx,3f8h
in al,dx
invoke wsprintf,addr tmpbuf,addr tmp,al
invoke MessageBox,NULL,addr tmpbuf,addr DNamn,MB_OK
...
ive written a driver that changes the IOPM so this process can access the comport (thank you Four-F =).
wsprintf takes DWORD parameters, you are passing a byte. The message box is not being displayed properly because the stack is corrupt.
this kind of message box and dialogboxes can also be seen in nt systems when you dont have the xor eax,eax, ret (mov eax,FALSE) (mov eax,TRUE) statements at the end of your dlg proc when you return to system
and if you open up task mgr youll see that it has hogged 100%cpu and all other functions will be noticeably slower
and if you open up task mgr youll see that it has hogged 100%cpu and all other functions will be noticeably slower
thanks donkey. and i promise to read the reference more properly before posting any more dumb questions!
there are no dumb questions. If it is, it's no longer a question but a statement. :grin: