×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    May 2007
    Posts
    91

    Event loop in console application....

    Dear All,

    S60 3rd ed.
    I have created (console) .exe which access a HTTP server & get the response.
    But the problem is that as soon as I send the request code comes out of the function & application ends normally, but I want all the HTTP events to handle i.e. EGotResponseBodyData etc.
    So I want to have event loop to run in the application.

    So can anyone guide me?

    Thanx & Regards,
    Vinod.

  2. #2
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    280

    Re: Event loop in console application....

    You need to install and run an active scheduler (CActiveScheduler). Many of the samples in the SDK do this.

  3. #3
    Regular Contributor
    Join Date
    May 2007
    Posts
    91

    Re: Event loop in console application....

    thank you...

    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
    CleanupStack::PushL(scheduler);
    CActiveScheduler::Install(scheduler);
    // My code goes here....

    // below line destroys the scheduler...
    //but I want it to live untill all my events are handled...
    CleanupStack::PopAndDestroy(scheduler);

    so how to achive this?

  4. #4
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    280

    Re: Event loop in console application....

    After you install the active scheduler and add one or more active objects you call CActiveScheduler::Start, which doesn't return until you stop it.
    There is a bit of reading/understanding required when you first use active objects. There is info on this all over the web and SDKs, but start at: http://www.symbian.com/developer/tec...tive%2dobjects

  5. #5
    Registered User
    Join Date
    Oct 2007
    Posts
    24

    Re: Event loop in console application....


Similar Threads

  1. How to send a key event to foreground application?
    By wanglele76 in forum Symbian Media (Closed)
    Replies: 7
    Last Post: 2007-09-20, 14:11
  2. catch menu event background application
    By stefano.garusi in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-11-28, 10:19
  3. Replies: 0
    Last Post: 2005-10-06, 15:52
  4. Send an event to the event loop
    By thedawn1977 in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-12-21, 12:41
  5. Automatic launch of application on "busy" event?
    By anupam_mathur in forum Symbian
    Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

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