Hi im on tutorial no. 13 and im just playing around with it and making some changes to help me learn. Originally
all you are meant to be able to do is save a file as a different name but i wanted to make it so you could edit it as well. So i tried this...

invoke CreateFile,ADDR buffer,\
mov hFileWrite,eax

invoke MapViewOfFile,hMapFile,FILE_MAP_READ,0,0,0
mov pMemory,eax

new bit --> invoke SendMessage,hwndEdit,WM_GETTEXTLENGTH,NULL,NULL <--- Get no of characters 2 write
new bit --> invoke SendMessage,hwndEdit,WM_GETTEXT,eax,pMemory <--- Write text from edit box to memory

invoke GetFileSize,hFileRead,NULL
invoke WriteFile,hFileWrite,pMemory,eax,ADDR SizeWritten,NULL
invoke UnmapViewOfFile,pMemory
call CloseMapFile
invoke CloseHandle,hFileWrite
invoke SetWindowText,hWnd,ADDR AppName
invoke EnableMenuItem,hMenu,IDM_OPEN,MF_ENABLED
invoke EnableMenuItem,hMenu,IDM_SAVE,MF_GRAYED

but is crashes, anyone got any ideas?


Simon :confused:
Posted on 2002-11-20 21:58:21 by SNDHearn
Dunno but it's time to download a debugger ;)
Posted on 2002-11-20 22:21:42 by Axial
how do u mean?

Posted on 2002-11-20 22:22:58 by SNDHearn

Note : debuggers *often* prevents asking "why does it crash ?"

Posted on 2002-11-20 22:28:07 by Axial
ah, ok thanks.

Posted on 2002-11-20 22:37:12 by SNDHearn
SoftIce Is Better, if you can find it :grin:
Posted on 2003-01-02 13:08:59 by Tempus
SoftIce is NOT free! OllyDbg is a great free debugger....
Posted on 2003-01-02 13:15:04 by Gunner
You Have a reason.:cool:
In This Way do you know how to compile the masm programs to use with the OllyDbg like the tute in the masm32 pakage for softice by Lord Lucifer or is any way to make the OllyDbg to show the symbols and the source code. Thanks
Posted on 2003-01-03 06:13:11 by Tempus