Is it possible to use CApSettingsHandler-like class in exe?

Login to reply to this topic.
Tue, 2004-09-28 05:30
Joined: 2004-08-03
Forum posts: 33
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!

Tue, 2004-10-26 20:45
Joined: 2004-10-15
Forum posts: 10
Is it possible to use CApSettingsHandler-like class in exe?
Would be great to know a reason behind this "access violation in euser.dll".  I get this on Exit().  Of course, in a context of using other UI components.  But since I cannot debug the Exit() into next level of constructor - there is no way I can find, where is the problem.

Would really appreciate any technical insight.

- jalpesh
Tue, 2004-10-26 23:16
Joined: 2004-05-21
Forum posts: 42
Is it possible to use CApSettingsHandler-like class in exe?
In a exe's process there is no
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

Wed, 2004-10-27 20:26
Forum Nokia Champion
Joined: 2003-10-01
Forum posts: 723
Is it possible to use CApSettingsHandler-like class in exe?
Quote from: hbufc.com
In a exe's process there is no
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/

Thu, 2007-11-29 16:27
Joined: 2007-07-29
Forum posts: 1
Re: Is it possible to use CApSettingsHandler-like class in exe?

you can use ui in your exe, just take a look at http://www.pushl.com/developers/exectrl.html


Mon, 2007-12-03 22:45
Joined: 2004-11-29
Forum posts: 1155
Re: Is it possible to use CApSettingsHandler-like class in exe?

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.

  • Login to reply to this topic.