Deactivate Event - UnauthroizedAccessException

  • Thread starter Thread starter Jon Credit
  • Start date Start date
J

Jon Credit

I have put code in my deactivate event to save some
inforamtion to an xml file. It works fine during normal
operation of the unit, changeing apps, etc.
It appears that when the PPC is going into power save mode
I get an UnauthorizedAccessException. I am saving the xml
to the Storage Card (not sure if that makes a difference).
I think I can recreate this anytime now by loading the
app, turn the unit off, turn the unit on and hit the X to
minimize the app immediately. I have Try Catch blocks in
my code but the error message I get is:
A managed UnauthorizedAccessException occurred at
Application::Run+0xf

Does anyone have any ideas?

TIA
--Jon
 
Jon,

Most likely it means file is already opened, probably by your own
application.
Are you opening this file somewhere else while application is running?
If yes, make sure it is closed before opening it again in deactivate event.

If not, it might be read only for some reason.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top