Symbian-Developers
The Official Developers Section => Symbian Software Development Discussions => The Developers Section => Symbian Java/C++ Application Development => Topic started by: huellif on November 03, 2013, 10:20:14 pm
-
Symbian provides an easy class to shutdown or reboot the device, you can implement this e.g. into a copy protection :P
1. link against StarterClient.lib in your .mmp and add PowerMgmt cap:
LIBRARY StarterClient.lib
CAPABILITY PowerMgmt
for Qt users add LIBS += -lStarterClient
TARGET.CAPABILITY += PowerMgmt
into your .pro
2. in your class include the related header:
#include <starterclient.h>
3.
a) the method to reboot:
RStarterSession starter;
User::LeaveIfError(starter.Connect());
starter.Reset(starter.ELanguageSwitchReset);
starter.Close();
b) the method to shutdown:
RStarterSession starter;
User::LeaveIfError(starter.Connect());
starter.Shutdown();
starter.Close();
really simple.
It looks wrong because there's no CleanupStack but for me it doesn't work with CleanupStack.
Thanks CODeRUS for hinting me the class name :)
Source: http://www.symlab.org/main/documentation/reference/s3/pdk/GUID-A8449386-F424-3357-940C-149250890AD8.html
-
What you mean by "copy protection"?
-
protecting from warez
-
How can i use it for protection?.I don't get it.This just shutdown or reboot so how can it protect from warez.
-
you can include a reboot in your copy protection system to annoy crackers/retailers
-
??????Don't get you.It doesn't check if the copy is legal or pirated and even if I use it,it will also affect legal copy.Symbian currently don't have any method to check if the copy is legal or not.
-
It has plenty of methods to check.
-
??????Don't get you.It doesn't check if the copy is legal or pirated and even if I use it,it will also affect legal copy.Symbian currently don't have any method to check if the copy is legal or not.
did I write you can use this as an copy protection ???
You can inlude this code into your own protection to annoy retailers/crackers, nothing else.
-
I'll probably use this if anyone can tell me the header and lib for CAppUi.
Any ideas which it could be Fabian?
-
CAppUi for what?Why you don't write it yourself.
-
CAppUi for what?Why you don't write it yourself.
It's a Symbian c++ class
-
CAknAppUi i see before.Are you sure you are not confused CAknAppUi with CAppUi.Never see such header file before.Like I say you could write your own if know symbia c++ well.
-
Nope, I'm sure, but I don't know c++ very well
-
read here: http://www.symlab.org/main/documentation/reference/s3/pdk/GUID-77329067-34D9-3698-B764-294535E660EB.html
I would include:
avkon.h
avkon.hrh
aknappui.h
eikenv.h
eikappui.h
aknenv.h
and link against lavkon leikcore lcone
-
Nope, I'm sure, but I don't know c++ very well
Why you want the header files.What function does the header provide that you need it specifically