Is it possible to use CApSettingsHandler-like class in exe?
| Tue, 2004-09-28 05:30 | |
|
Dears,
I am in development of a exe(just a normal exe, not a background server) capable of some networking functionality without UI. Here I want to implement a feature that when the first time my exe connect the network, it will remember the IAP the user choosed in the pop-up windows, and never to bother user again for the next time my exe connect the network. Here is the code to select Access Point: Code: // Create Ap Settings Handler. See SDK Help for parameters. CApSettingsHandler* settingsHandler = CApSettingsHandler::NewLC( ETrue, EApSettingsSelListIsListPane, EApSettingsSelMenuSelectNormal, KEApIspTypeAll, EApBearerTypeAll, KEApSortNameAscending); ... It seems my exe can not run the code aboe: 1. In simulator, it crash, with error message: "access violation"(EUser.dll) 2. on device, it leave without any notification:-( Thus, is it possible to use CApSettingsHandler-like class in exe? Is there a way to initialize something(basic UI component?) to let it works? Thank you for your help! |
|






Forum posts: 10
Would really appreciate any technical insight.
- jalpesh
Forum posts: 42
1. CleanupStack
2. ActiveScheduler
3. CONE/EIKON-Environment
1 and 2 you can instantiate on your own, but I don't know what all is to
do for a full CONE/EIKON-Environment. As I don't know if it's public?
Something like CCoeEnv::ConstructL(), CCoeEnv::ConnectToFileServerL(), CCoeEnv::ConnectToWindowsServerL(), CEikonEnv::LoadLibrariesL()...
(see book "symbian os c++ for mobile phones vol 2, 3.2.1)
--
Tobias
www.hbufc.com
Tobias.Stoeger
Forum posts: 723
1. CleanupStack
2. ActiveScheduler
3. CONE/EIKON-Environment
1 and 2 you can instantiate on your own, but I don't know what all is to
do for a full CONE/EIKON-Environment. As I don't know if it's public?
Something like CCoeEnv::ConstructL(), CCoeEnv::ConnectToFileServerL(), CCoeEnv::ConnectToWindowsServerL(), CEikonEnv::LoadLibrariesL()...
(see book "symbian os c++ for mobile phones vol 2, 3.2.1)
--
Tobias
www.hbufc.com
You're right. The UI environment is not available for an EXE. I would say that the EXE itself should take care of installing the UI, but I'm afraid that it's technically impossible - I suspect that there are so many dependencies in Symbian OS that you either couldn't figure out how you should install the UI or it's simply not available for SDK users.
Therefore using this class is not possible in an EXE: it requires UI. But, even in a program that has no UI, it's possible to make a connection and when you're about to establish a connection, the user is presented a dialog asking her to select an AP. This is done by the built-in Agent Dialog, which is a notifier indeed. What comes to notifiers: you can write a global dialog and show it from anywhere (APP, EXE) - it's what notifiers do (among a few other things). But, to tell the truth, it's not quite straightforward how to write a notifier.
As to Agent Dialog: AFAIK, it's used by the system, when some comms components detect that there is no AP defined for the connection currently being established. That is, it's not you, who will use the Agent Dialog and thus, it's not you who will be given the selected AP. But, you may be able to query the selected AP for the connection once it's up. I can't give you more technical details on it, but you can hunt for it in the help.
Cheers,
tOtE
Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/
Forum posts: 1
you can use ui in your exe, just take a look at http://www.pushl.com/developers/exectrl.html
Symbian Security Studio
Forum posts: 1155
If you need the UI framework, easiest (and most futureproof) is probably to implement the normal UI-classes and then just call EikStart::RunApplication to start it up.
That is, create an app. Shouldn't be that much overhead.
Definitely saving a lot of time.
Creating the CEikonEnv from scratch is a pain, and seems to change slightly between versions...
You can add any other things you want in the thread, like a CServer2 to make a system service or whatever other IPC and extra threads you'd like.