×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    87

    connect () failed with RWsSession

    following is my code used in console application

    ///////////////////////////////////////
    RWsSession ws;

    User::LeaveIfError(ws.Connect());

    CleanupClosePushL(ws);

    TApaTaskList taskList(ws);

    TApaTask midlet = taskList.FindApp(KAppName);

    ///////////////////////////////////////

    ws.connect() return nothing and application will closed

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: connect () failed with RWsSession

    What you are describing seems to be a panic. See Extended panic code in the wiki.

    Also, a GUI application already has an open session that you can use if you need to enumerate tasks ...
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

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

    Re: connect () failed with RWsSession

    Quote Originally Posted by ltomuta View Post
    What you are describing seems to be a panic. See Extended panic code in the wiki.

    Also, a GUI application already has an open session that you can use if you need to enumerate tasks ...

    the Connect function returns -1.
    is there any way that i got the reason of -1 and solve the problem
    which run my code successfully instead closing the application.
    Thank You

  4. #4
    Super Contributor
    Join Date
    Oct 2005
    Location
    Hyderabad,India
    Posts
    1,156

    Re: connect () failed with RWsSession

    -1 means not found. Try using the CEikon's RWsSession.

    # // Access an RWsSession session instance
    CEikonEnv::Static()->WsSession()

    so that you need not connect to the server.

    - Priju

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: connect () failed with RWsSession

    It actually also matters where do you run this code. Emulator? (Which?) Device? (Which?)

  6. #6
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: connect () failed with RWsSession

    You need to intialize the FBS server before the windows server if running in the emulator with a console application as its not done automatically.

    Add FbsStartup() (as defined in fbs.h) to intialize the fbs server connection in the application bfore using the windows server otherwise the windows server can't connect to the fbs server
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  7. #7
    Registered User
    Join Date
    Jun 2008
    Posts
    87

    Re: connect () failed with RWsSession

    Quote Originally Posted by wizard_hu_ View Post
    It actually also matters where do you run this code. Emulator? (Which?) Device? (Which?)
    i m using UIQ 3.0 emulator and my target device is Sony Ericsson P1

Similar Threads

  1. S60 Connect to Agent Failed
    By davidmanpearl in forum Mobile Java Tools & SDKs
    Replies: 17
    Last Post: 2011-09-23, 10:34
  2. Failed to connect a TCP client app with a server
    By abolfoooud in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2008-08-24, 07:47
  3. Replies: 0
    Last Post: 2007-07-19, 12:37
  4. S60 2nd to 3rd/ PlatformSecurity / Capabilities
    By jarkoos in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 4
    Last Post: 2007-04-14, 14:08
  5. Connect failed
    By patbys in forum Bluetooth Technology
    Replies: 3
    Last Post: 2003-05-06, 11:47

Posting Permissions

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