The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: skywalker on May 18, 2007, 12:32:36 PM

Title: Error 12
Post by: skywalker on May 18, 2007, 12:32:36 PM
How can I check for Error 12, No_More_Files.

Thanks.
Title: Re: Error 12
Post by: Tedd on May 18, 2007, 12:45:54 PM
..?
invoke GetLastError
.IF (eax==ERROR_TOO_MANY_OPEN_FILES)
    ;..whine..
.ENDIF


..though ERROR_TOO_MANY_OPEN_FILES has the value 4, and 12 is ERROR_INVALID_ACCESS

Where does "Error 12" come from - what function causes it?
Title: Re: Error 12
Post by: sinsi on May 19, 2007, 02:14:31 AM
Quote from: Tedd on May 18, 2007, 12:45:54 PM
..though ERROR_TOO_MANY_OPEN_FILES has the value 4, and 12 is ERROR_INVALID_ACCESS
...and ERROR_NO_MORE_FILES is 18 (12h)
Title: Re: Error 12
Post by: skywalker on May 19, 2007, 02:34:14 AM
Here's a screenshot.



[attachment deleted by admin]
Title: Re: Error 12
Post by: sinsi on May 19, 2007, 02:55:35 AM
Presumably this is from your killbart program?

Process32First/Process32Next in MSDN say
QuoteThe ERROR_NO_MORE_FILES error value is returned by the GetLastError function if no processes exist or the snapshot does not contain process information.

Title: Re: Error 12
Post by: skywalker on May 19, 2007, 03:14:33 AM
I would like it to tell me if the program isn't in memory for error checking. I put in message boxes in several places, but couldn't get any to work. I hope that makes sense.