Louis Young wrote: > Whenever I call Application.Terminate or close the main form in my app I > get the following error message: > > Project ReconSched.exe raised exception class EOSError with message > 'System Error. Code: 5. Access is denied'. Process stopped. Use Step or > Run to continue. > > What is the cause of this?
Where does the exception occur? (Actually, I already know the exception occurs in RaiseLastOSError, so more precisely, what does the call stack look like when that error occurs? Turn on "debug DCUs" if you haven't already. Tools like MadExcept or JclDebug can help generate a call stack even when the IDE can't.) Vahan is confusing "access denied" with "access violation." Your program is trying to use something it doesn't have access to, such as writing a read-only file, or updating a privileged registry key. You can get the error either by requesting more privileges than you're entitled to when you open the object, or by using more privileges than you initially requested. Sometimes the request is implicit; you ask for deletion rights to a file when you call DeleteFile, and if you don't have those rights, then the error code is Error_Access_Denied. -- Rob ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

