But is there a general recomendation from MS not to install applications
on SDcards? You'd think it should work like a harddrive on a normal
computer.
You never suspend your PC like you do a device. A CE device turns off the
processor and puts RAM in self refresh. When it wakes, it reinitializes all
hardware, but the RAM contents remain. External storage is especially tough
becasue the controller is shut down and the volume is unmounted. When you
power back up it's repoered and mounted. Expecting the OS to be able to
keep track of a handle is a lot to ask. It's essntially like asking in XP
that you can open a program from a USB storage device - while it's running,
pull the storage at random, plug it back in, and expect no adverse effects.
Is there a higher probability that the OS would Page if the unit is turned
off for a longer period of time?
Nope. It's simply how the driver is set up - to either pull the whole app
into RAM or to page as necessary. Most OEMs opt for paging, since pulling
the whole thing into RAM is expensive when you don't need it.
Chris, would you ever install a application/database on a storage card?
I hate to say "never" but I'd lean strongly against it. If it must be on
external storage (which due to size it sometimes must) then I recommend all
data transactions be connect/change/close operations. You cannot keep the
DB open. Then your window for error gets a lot smaller. Beyond that you
need to add power event handling to know when you come back up from suspend.
I never run apps from storage. If the customer wants it there for
safekeeping, then I make a launcher that copies the actual app to RAM and
runs it from there.
--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--