Application priority

  • Thread starter Thread starter KNC
  • Start date Start date
K

KNC

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
 
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

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.

-- John
 
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
 
Back
Top