×

Discussion Board

Results 1 to 4 of 4

Thread: Default AP

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    23

    Default AP

    Hi,
    this is my code
    void t()
    {
    CCommsDatabase* pDb1 = CCommsDatabase::NewL(EDatabaseTypeIAP);
    CApDataHandler* pApHandler = CApDataHandler::NewLC(*pDb1);
    TUint32 aip = pApHandler->DefaultL(ETrue);
    aip = 25;//HARD CODE HERE, IT DEFINATELY MY WLAN AIP
    pApHandler->SetAsDefaultL(aip, EIspTypeInternetOnly) ;//IAP, WAP, Both

    struct hostent *phe = gethostbyname("www.google.com");
    }

    I just want to avoid AP select dialog when call gethostbyname.
    I found SetAsDefaultL cause my program fail.
    BTW:
    I have signed my program with devcert and capibility
    NetworkServices ReadDeviceData ReadUserData WriteDeviceData WriteUserData

    Is there anyting I wrong?

    Lin

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,750

    Re: Default AP

    You should rather use the Symbian version of of "gethostbyname", which is called RHostResolver::GetByName. In this case you can use the RHostResolver::Open accepting an RConnection, which you can Start without prompting for access point (in fact you could have searched for your thread-title Default AP in the Wiki).

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    23

    Re: Default AP

    Quote Originally Posted by wizard_hu_ View Post
    You should rather use the Symbian version of of "gethostbyname", which is called RHostResolver::GetByName. In this case you can use the RHostResolver::Open accepting an RConnection, which you can Start without prompting for access point (in fact you could have searched for your thread-title Default AP in the Wiki).
    Thanks, but
    I am actually portal my linux project to symbian.
    I can not change everywhere's call.

  4. #4
    Regular Contributor
    Join Date
    Dec 2007
    Location
    Banglore,India
    Posts
    64

    Re: Default AP

    you can try,
    TCommDbConnPref connectPref;
    connectPref.SetDialogPreference (ECommDbDialogPrefDoNotPrompt);

Similar Threads

  1. Java App Midlet certification (new thread)
    By mocad_tom in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2008-06-24, 04:12
  2. OMA CP : Setting DEFAULT APN
    By w3ncy in forum OMA DM/DS/CP
    Replies: 1
    Last Post: 2008-03-25, 07:18
  3. What's the default call priority of controller plugins?
    By w30449 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2007-11-28, 09:03
  4. Replies: 2
    Last Post: 2007-03-06, 16:33
  5. Replies: 0
    Last Post: 2006-10-16, 17:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×