all groups > dotnet compact framework > november 2005 >
You're in the

dotnet compact framework

group:

Application priority


Application priority KNC
11/16/2005 11:08:26 PM
dotnet compact framework:
Hi all,

Our application is usually facing the problem of quitting
unexpectedly. At first the application is allocated in pda machine.
Then because of memory and compact problem, we suggest our customer to
move out application and big database to SD card. Even that the
quitting problem is still there.
I notice that in any case, Active sync application never quit. When
we open over 10 applications concurrently, Active sync is still there
while IE or other app will be killed.

So my questions are:
1) Is that by Active sync has a highest pripority?
2) Could we set our app to higest priority?
3) Is that the API of CeGetThreadPriority and CeSetThread?

Thanks in advance,
KNC
Re: Application priority John Socha-Leialoha
11/17/2005 9:16:34 AM
[quoted text, click to view]

Windows CE will start to close applications if memory available drops
below a certain threshold. Standard applications (not written in .NET)
can decline to be closed. However the .NET CF runtime doesn't provide a
way to decline being closed. This is how ActiveSync stays in memory and
any .NET application won't.

Re: Application priority Chris Tacke, eMVP
11/17/2005 12:34:43 PM
Priority has nothing to do with it. When the memory manager tries to close
you, deny it's ability to do so by handling the WM_CLOSE yourself in an
IMessageFilter.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


[quoted text, click to view]

AddThis Social Bookmark Button