hello,
I need a little help with 32bit ASM (using MASM).
I made a small program that deletes a file. I want to add some code that will detect if the file was deleted or if an error occured. I know I can use "invoke GetLastError" but then what?
I already checked a Win API help file but it wasn't very helpfull.
Thanks in advance for any help.
32bit ASM help
Re:32bit ASM help
DeleteFile will return TRUE (1) if the file was deleted, or FALSE (0) otherwise. (This value is returned in EAX.) Only call GetLastError if you know DeleteFile failed. DeleteFile will not set the LastError if it succeeds.
GetLastError returns a Win32 error code in EAX. See <winerror.h> for a list of codes, or call FormatMessage to convert an error code to text.
For definitive documentation on these functions, see http://msdn.microsoft.com/library/ -- make sure you can read C!
GetLastError returns a Win32 error code in EAX. See <winerror.h> for a list of codes, or call FormatMessage to convert an error code to text.
For definitive documentation on these functions, see http://msdn.microsoft.com/library/ -- make sure you can read C!