Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor lingxiao6815's Avatar
    Join Date
    Sep 2008
    Posts
    51
    iConnect.EnumerateConnections(connectionCount)
    TPckgBuf<TConnectionInfo> connectionInfo;

    iConnect.GetConnectionInfo(i, connectionInfo);//i
    iConnect.Attach(connectionInfo, RConnection::EAttachTypeNormal);
    iConnect.Stop();//return -18

    Above is my code, but it can not accomplish to close or stop IAP running by other program.
    What shall I do?

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Negative numbers are here: http://wiki.forum.nokia.com/index.php/Error_codes
    Note that the other methods you use may also return error codes, you should check them.
    And Stop-ing an Internet connection is a "bigger" thing that Start-ing, you will need NetworkControl (instead of the user-grantable NetworkServices) capability for that.

  3. #3
    Regular Contributor lingxiao6815's Avatar
    Join Date
    Sep 2008
    Posts
    51
    Quote Originally Posted by wizard_hu_ View Post
    Negative numbers are here: http://wiki.forum.nokia.com/index.php/Error_codes
    Note that the other methods you use may also return error codes, you should check them.
    And Stop-ing an Internet connection is a "bigger" thing that Start-ing, you will need NetworkControl (instead of the user-grantable NetworkServices) capability for that.
    Could you tell me a way? I'm developing S60 2nd.

  4. #4
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Hmm, the capability limitations I have mentioned apply to Symbian 9 / S60 3rd edition.
    You should still check the result of Attach, and you may experiment with the possible arguments of RConnection::Stop.

  5. #5
    Registered User sriky27's Avatar
    Join Date
    Dec 2005
    Posts
    1,236
    Hi, if you want to know about capabilities in symbian you could follow this link
    http://www.symbian.com/developer/tec...022/index.html
    I hope it useful you could understand what capabilities you need to use an api.

  6. #6
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    You may consider reading threads prior to posting into them. Then you would know that Lingxiao6815 develops for S60 2nd edition.

  7. #7
    Regular Contributor lingxiao6815's Avatar
    Join Date
    Sep 2008
    Posts
    51
    use s60 2nd
    iConnect.EnumerateConnections(connectionCount)
    TPckgBuf<TConnectionInfo> connectionInfo;

    iConnect.GetConnectionInfo(i, connectionInfo);//i
    iConnect.Attach(connectionInfo, RConnection::EAttachTypeNormal);//return-34 connect failed
    iConnect.Stop();//return -18 not ready

    above is my code, there are some error confuse me...
    How to close or stop the active IAP?

  8. #8
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    hi lingxiao6815,

    iConnect.Attach(connectionInfo,RConnection::EAttachTypeNormal) will attaches the RConnection object to an existing interface if it exists. It will not start a new interface. So value of i in iConnect.GetConnectionInfo(i, connectionInfo) must be in between 1 and value of connectionCount returned from iConnect.EnumerateConnections(connectionCount).So if iConnect.Attach return -34 connect failed, iConnect.Stop() will definately return -18.

    savaj..

  9. #9
    Super Contributor Paul.Todd's Avatar
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    The other to consider is to make sure the RConnection opject is opened and started.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

Similar Threads

  1. CommDB - Which IAP Id is the right IAP Id??
    By hoopsman in forum Symbian Networking & Messaging (Closed)
    Replies: 8
    Last Post: 2009-09-09, 20:52
  2. Close IAP??
    By lingxiao6815 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2008-09-11, 06:37
  3. IAP query
    By kumar_sai123 in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2008-07-21, 14:16
  4. Choose IAP for video streaming session
    By molst in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2006-12-05, 08:01
  5. Iap Creation and Connection.
    By shashishaw in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2005-07-20, 09:06

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