Symbian
Symbian OS Library

FAQ-0908 What is the difference between CApaWindowGroupName::SetSystem() and RThread::SetSystem()?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: Base
Created: 07/29/2003 Modified: 07/30/2003
Number: FAQ-0908
Platform: Not Applicable

Question:
I've found two similar-sounding functions in Symbian OS - CApaWindowGroupName::SetSystem() and RThread::SetSystem(). What is the difference between them?

Answer:
CApaWindowGroupName::SetSystem() tells the UI running on top of Symbian OS (e.g. Series 60, UIQ) not to close this window group's application. For example, it will prevent the user from closing the application from the task list and also prevent the memory manager from closing the application under low memory situations. For this reason, it should be used very carefully and sparingly and only for very good reasons.

Note that to set your application as a system task you would normally call CEikonEnv::SetSystem() which in turn calls CApaWindowGroupName::SetSystem(), rather than calling CApaWindowGroupName::SetSystem() directly. The main reason for calling CApaWindowGroupName::SetSystem() directly is if your application has multiple RWindowGroups, all of which must be marked as system if the application itself is to be protected against closing (this is not done by the CEikonEnv::SetSystem() implementation).

RThread::SetSystem() is a legacy OS call used by the kernel only and should not be called by user-side code.