I've also noticed that the C:\test.bmp file seems to be locked even after closeing the handle to it. 
Posted on 2009-09-09 11:08:33 by GoldStar611
I don't think that's happening.... how did you conclude saying that the file is locked?  :O
Posted on 2009-09-10 01:31:27 by karthikeyanck
Run the program from within olly let it finish.  Without restarting the program try to delete C:\test.bmp. It says it is in usefor me
Posted on 2009-09-10 14:49:37 by GoldStar611
invoke CreateFile, ADDR lpFileName, GENERIC_WRITE or GENERIC_READ, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL

This obviously doesn't let other process to access the file?

May be quit Olly and try to open or delete the file, should work  ;)

Edit:

Actually, you should be calling printscreen.exe from another process (caller.exe) coz I had some problems in running it from the
Windows Folder Explorer shell... Load caller.exe in Olly, you then should be able to delete or open the file on the fly...



Caller.asm

invoke keybd_event, VK_SNAPSHOT, 0, 0, 0
invoke ShellExecute, NULL, ADDR lpOperation, ADDR lpFile, NULL, NULL, SW_HIDE
Posted on 2009-09-11 01:17:50 by karthikeyanck