Log in

View Full Version : Problem with reading from Storage Card after resume


rapidlord
08-09-2004, 02:56 PM
I am working on some kind of alarm app so i have problem that when i set to wake up my app using CeRunAppAtTime func. and when the app is on the Storage Card and when device is off, after waking up device in specify time i get error saying it can find App.

When device is turn on and app is on the storage card, every thing is ok, app is been called ok, or when the app is in internal storage mem. and device is off, it`s ok to.

I know that after wakening device is set in suspend power mode, so i set device in full power mode as in article: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppc2k/html/ppc_layoff.asp
but that didn`t help to.

It seams that Storage Card don`t work some short time after resuming device, so notification system can`t see app, is there some solution for this.

The PocketTV Team
08-10-2004, 03:31 AM
I think you should read http://www.pocketpcthoughts.com/forums/viewtopic.php?t=27614

especially the last posting that explains the workaround.

rapidlord
08-11-2004, 12:51 PM
Sorry but this doesn`t solve my problem, it seems that things in my case are little different, i dont`t have open file handlers, because application isn`t running when device is turn off.

When the 'CeRunAppAtTime' is set, PPC is off and the application is in the Storage Card in the specific time i get error: "Notification Error - cannot execute \CF Card\Alarm.exe" or sometimes hapen that device freeze and i can even turn it on, so i have to soft reset it. And think that i am not the only one having this problem.

Same problem is with 'CeSetUserNotificationEx'

So it`s basicly this: CeRunAppAtTime wont work when application is in the Storage Card and device is off.

The PocketTV Team
08-11-2004, 11:16 PM
I see... apparently CeRunAppAtTime tries to execute the application from the Storage Card before the Storage Card has been fully powered-up, after a power resume.

But still you should try the fix, maybe it will cause CeRunAppAtTime to wait a bit longer before lauching the app for the Storage Card.

If it does not, then it's another bug, clearly.

rapidlord
08-12-2004, 09:12 AM
Yes i tried fix and it`s not working, So this is what i do:
I created one more small background application called 'RunAlarm.exe' and put it in the '\WINDOWS' directory, and instead of calling Alarm app with 'CeRunAppAtTime' i call 'RunAlarm.exe', the only thing the 'RunAlarm.exe' is doing is wait for couple of sec. and then call Alarm app.
The thing is working great the device is wake up by 'CeRunAppAtTime' and start runing 'RunAlarm.exe', and after couple of sec when Storage Card is full powered Alarm app is being called from 'RunAlarm.exe'.

Of course every time the alarm is started in the registry is written the full path to the application so 'RunAlarm.exe' can find Alarm app that need to be started.

I consider this for now only way to fix this problem, and it`s working when application is in main Memory or Storage Card.