×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    39

    RConnection::Start never retrun

    Hello,
    on hardware
    TInt connstat = iConnection.Start (iPreference);

    never return if there is no network. (return an error on emulator)
    Please help! I need to have a non connectivity in my app. I've try to use timer but at this line the app is totaly bloced.. and if i use the asynchronous Start the iStatus stay pending...

    How can I see if there is connectivity or not without blocking the phone??

  2. #2
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Mumbai
    Posts
    212

    Re: RConnection::Start never retrun

    hi ,

    Use this code
    Code:
    TBool  CHTTPExampleEngine::CheckConnection(TUint32& aIAPId)
    {
    		if(!iConnected)
    		{
    			#ifndef __WINS__ 
    			TCommDbConnPref prefs;
        		prefs.SetBearerSet(ECommDbBearerUnknown);
        		prefs.SetDirection(ECommDbConnectionDirectionOutgoing);
    			prefs.SetIapId(aIAPId);
    			prefs.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    			if (!IsActive())
    			{ 
    				iConnection.Start(prefs, iStatus);
    				iIAPID=aIAPId;
    				SetActive();
    			}		
    			#endif
    		}
    		#ifndef __WINS__
    		return iConnected;
    		#else
    		return ETrue;
    		#endif
    }

Similar Threads

  1. Difference between RConnection::Start and ::Attach?
    By kosjanne in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2009-01-20, 12:04
  2. RConnection::Start error codes
    By GuusDavidson in forum Symbian
    Replies: 4
    Last Post: 2008-09-15, 13:54
  3. RConnection::Start error -2008
    By chenfi in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2005-12-20, 15:33

Posting Permissions

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