detach thread in c?

Discussion in 'C Programming' started by joe, Jan 9, 2004.

  1. joe

    joe Guest

    Hi i just converted a console app to a function, the code has a statement
    freeconsole() and after that the function does not work. If I take
    freeconsole out then i dont get out of the loop. Is there a way to launch
    the procedure in a separete console. so i can keep using my console. or put
    it in another thread. I am looking around now and the only thing that i can
    think of is CreateProcess, the function looks like this int
    oldmain(parametes);
    how can i launch it in a separete thread or console. thanks..

    when i use
    handle = (HANDLE) _beginthread(myfuction(),0,NULL(;
    and
    WaitForSingleObject(handle,INFINITE);

    i dont get past begin thread and my program halts after that line
    joe, Jan 9, 2004
    #1
    1. Advertising

  2. joe <> wrote in
    news:Xns946B738349013josephthecianet@207.69.154.205:

    > when i use
    > handle = (HANDLE) _beginthread(myfuction(),0,NULL(;


    This is not C. Try a newsgroup that discusses threads.

    --
    - Mark ->
    --
    Mark A. Odell, Jan 9, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Timo Nentwig
    Replies:
    0
    Views:
    868
    Timo Nentwig
    Feb 4, 2004
  2. Dmitry Teslenko
    Replies:
    2
    Views:
    346
    Dmitry Teslenko
    Nov 9, 2007
  3. Tamer Ibrahim

    Attach and Detach SQL Express Database

    Tamer Ibrahim, Jul 3, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    507
    Tamer Ibrahim
    Jul 3, 2008
  4. Tamer Ibrahim

    Attach and Detach

    Tamer Ibrahim, Jul 3, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    372
    Tamer Ibrahim
    Jul 3, 2008
  5. Fan Kai
    Replies:
    0
    Views:
    523
    Fan Kai
    Dec 30, 2008
Loading...

Share This Page