Discussion Board

Results 1 to 15 of 30

Hybrid View

  1. #1
    Registered User nstapleton's Avatar
    Join Date
    Apr 2009
    Posts
    43
    I am using TCommDbConnPref to discover the different IAPs available.

    When I run my app in phone debug mode my TCommDbConnPref object is described as Invalid Format.

    When I run it in emulator mode it is ok.

    I notice that the first phase constructor is not called in Phone debug mode but it is called in emulator mode.

    CHTTPEngine::CHTTPEngine(MClientObserver& aObserver)
    : iObserver(aObserver),
    iPostData(NULL),
    iRunning(EFalse),
    iConnectionSetupDone(EFalse),
    iPrevProfileId(-1)
    {

    }
    // Now we have the iap Id. Use it to connect for the connection
    TCommDbConnPref connectPref;
    // Setup preferences
    connectPref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    // Sets the CommDb ID of the IAP to use for this connection
    connectPref.SetIapId(iSelectedIap);
    // Start connection
    ------> User::LeaveIfError(iConnection.Start(connectPref)); //<------------------failing here
    Appreciate any guidance

  2. #2
    Regular Contributor mrudulpen's Avatar
    Join Date
    Feb 2007
    Location
    Tampere
    Posts
    368
    Hi,

    Are the variables iSelectedIap & iConnection initialized?

    Also what is the error you get?
    Regards

    - MVP
    "Dare To Dream" - A.P.J.Kalam

  3. #3
    Registered User nstapleton's Avatar
    Join Date
    Apr 2009
    Posts
    43
    Hi

    iSelectedIap is initialized; in this case to 3

    iConnection is also Invalid format. It is of type RConnection

    Not getting any error; just a panic and the application aborts.

    thanks

  4. #4
    Regular Contributor mrudulpen's Avatar
    Join Date
    Feb 2007
    Location
    Tampere
    Posts
    368
    Hi,

    You need to open a connection to SocketServe and then open a RConnection before you can use it further(iConnection.Start).

    Have a look at the code over here
    Regards

    - MVP
    "Dare To Dream" - A.P.J.Kalam

  5. #5
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,748
    Quote Originally Posted by nstapleton View Post
    Not getting any error; just a panic and the application aborts.
    "just a panic"... http://wiki.forum.nokia.com/index.ph...ded_panic_code

  6. #6
    Registered User nstapleton's Avatar
    Join Date
    Apr 2009
    Posts
    43
    Yes - I do that already:

    // IAP Selected
    // Open socket server and start the connection
    User::LeaveIfError(iSocketServ.Connect());
    User::LeaveIfError(iConnection.Open(iSocketServ));
    // Now we have the iap Id. Use it to connect for the connection
    TCommDbConnPref connectPref;
    // Setup preferences
    connectPref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    // Sets the CommDb ID of the IAP to use for this connection
    connectPref.SetIapId(iSelectedIap);
    // Start connection
    User::LeaveIfError(iConnection.Start(connectPref));
    I am convinced it is to with the "Invalid Format" of connectPref and iConnection. Can anyone explain that?

  7. #7
    Regular Contributor mrudulpen's Avatar
    Join Date
    Feb 2007
    Location
    Tampere
    Posts
    368
    Hi,

    Just Out of curiosity, iSelectedIap what is this initialized to?
    You can look up into the table using following
    Code:
    // initialize a view
         CCommsDbConnectionPrefTableView* commDBView =
         commDB->OpenConnectionPrefTableInRankOrderLC(ECommDbConnectionDirectionOutgoing);
    
    
         // go to the first record
         User::LeaveIfError(commDBView->GotoFirstRecord());
    
         // Declare a prefTableView Object.
         CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref;
    
         // read the connection preferences
         commDBView->ReadConnectionPreferenceL(pref);
         //TUint32 iapID = pref.iBearer.iIapId;
         iIapID = pref.iBearer.iIapId;
    In case of your code iIAPID == iSelectedIap

    Also check if there are any valid accesspoints on your device/Emulator
    Regards

    - MVP
    "Dare To Dream" - A.P.J.Kalam

Similar Threads

  1. Cannot create sis package?
    By gomcoite in forum Themes/Carbide.ui
    Replies: 4
    Last Post: 2008-09-27, 17:54
  2. Error in packaging process :(
    By a-eqla3 in forum Themes/Carbide.ui
    Replies: 2
    Last Post: 2008-07-30, 22:03
  3. Error in packaging process :(
    By a-eqla3 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2008-07-24, 20:33
  4. ERROR IN CREATING THEME
    By ssmantri in forum Themes/Carbide.ui
    Replies: 5
    Last Post: 2008-05-29, 20:58
  5. Replies: 7
    Last Post: 2006-09-20, 23:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved