469,899 Members | 1,435 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,899 developers. It's quick & easy.

how to create thread with callback

How does .NET in VC++ create a new thread. I need to be able to run a
procedure within a thread that will notify me when that procedure is done so
that I can continue with the next procedure. I can't go to the next
procedure until the first one is completely through. I believe it is called
a callback.

Daniel
Jul 19 '08 #1
7 2069

System : :Threading namespace

Carlos.

"Daniel" <ne******@cableone.netescreveu na mensagem
news:Op**************@TK2MSFTNGP04.phx.gbl...
How does .NET in VC++ create a new thread. I need to be able to run a
procedure within a thread that will notify me when that procedure is done
so that I can continue with the next procedure. I can't go to the next
procedure until the first one is completely through. I believe it is
called a callback.

Daniel

Jul 19 '08 #2
What is it called when I have the thread notify me that it's done? In
visual basic it's called raising an event. Win32 API calls it callback. I
need to know how to do that. I need to have a word to search the MSDN
documentation.

Daniel

"Carlos" <a@b.cwrote in message
news:u3**************@TK2MSFTNGP06.phx.gbl...
>
System : :Threading namespace

Carlos.

"Daniel" <ne******@cableone.netescreveu na mensagem
news:Op**************@TK2MSFTNGP04.phx.gbl...
>How does .NET in VC++ create a new thread. I need to be able to run a
procedure within a thread that will notify me when that procedure is done
so that I can continue with the next procedure. I can't go to the next
procedure until the first one is completely through. I believe it is
called a callback.

Daniel


Jul 19 '08 #3

this could help you, process.waitforexit();
its placed on system :: diagnostics namespace, its clearly independent
of threads creation, u can conbine its use with threads so you obtain
parallel processes working at the same time.
I ve used all I say only once, so take care please.
hope this helps, Carlos.

"Daniel" <ne******@cableone.netescreveu na mensagem
news:ub**************@TK2MSFTNGP03.phx.gbl...
What is it called when I have the thread notify me that it's done? In
visual basic it's called raising an event. Win32 API calls it callback.
I need to know how to do that. I need to have a word to search the MSDN
documentation.

Daniel

"Carlos" <a@b.cwrote in message
news:u3**************@TK2MSFTNGP06.phx.gbl...
>>
System : :Threading namespace

Carlos.

"Daniel" <ne******@cableone.netescreveu na mensagem
news:Op**************@TK2MSFTNGP04.phx.gbl...
>>How does .NET in VC++ create a new thread. I need to be able to run a
procedure within a thread that will notify me when that procedure is
done so that I can continue with the next procedure. I can't go to the
next procedure until the first one is completely through. I believe it
is called a callback.

Daniel



Jul 19 '08 #4
excuseme, now I have not my things here, I cant verify
I used what I ve told u.

"Carlos" <a@b.cescreveu na mensagem
news:Om**************@TK2MSFTNGP06.phx.gbl...
>
this could help you, process.waitforexit();
its placed on system :: diagnostics namespace, its clearly independent
of threads creation, u can conbine its use with threads so you obtain
parallel processes working at the same time.
I ve used all I say only once, so take care please.
hope this helps, Carlos.

"Daniel" <ne******@cableone.netescreveu na mensagem
news:ub**************@TK2MSFTNGP03.phx.gbl...
>What is it called when I have the thread notify me that it's done? In
visual basic it's called raising an event. Win32 API calls it callback.
I need to know how to do that. I need to have a word to search the MSDN
documentation.

Daniel

"Carlos" <a@b.cwrote in message
news:u3**************@TK2MSFTNGP06.phx.gbl...
>>>
System : :Threading namespace

Carlos.

"Daniel" <ne******@cableone.netescreveu na mensagem
news:Op**************@TK2MSFTNGP04.phx.gbl...
How does .NET in VC++ create a new thread. I need to be able to run a
procedure within a thread that will notify me when that procedure is
done so that I can continue with the next procedure. I can't go to the
next procedure until the first one is completely through. I believe it
is called a callback.

Daniel



Jul 19 '08 #5
Perhaps this code could help u

ProcessStartInfo ^prData;
prData = new ProcessStartInfo();
prData->Verb = "open";
prData->FileName = "c:\\file.txt";
Process ^pr = Process::Start(prInfo);

.... I havent a compiler now, I believe from here
you can call pr::Waitforexit( ) the way u want

Carlos.

"Carlos" <a@b.cescreveu na mensagem
news:%2****************@TK2MSFTNGP02.phx.gbl...
excuseme, now I have not my things here, I cant verify
I used what I ve told u.

"Carlos" <a@b.cescreveu na mensagem
news:Om**************@TK2MSFTNGP06.phx.gbl...
>>
this could help you, process.waitforexit();
its placed on system :: diagnostics namespace, its clearly independent
of threads creation, u can conbine its use with threads so you obtain
parallel processes working at the same time.
I ve used all I say only once, so take care please.
hope this helps, Carlos.

"Daniel" <ne******@cableone.netescreveu na mensagem
news:ub**************@TK2MSFTNGP03.phx.gbl...
>>What is it called when I have the thread notify me that it's done? In
visual basic it's called raising an event. Win32 API calls it callback.
I need to know how to do that. I need to have a word to search the MSDN
documentation.

Daniel

"Carlos" <a@b.cwrote in message
news:u3**************@TK2MSFTNGP06.phx.gbl...

System : :Threading namespace

Carlos.

"Daniel" <ne******@cableone.netescreveu na mensagem
news:Op**************@TK2MSFTNGP04.phx.gbl...
How does .NET in VC++ create a new thread. I need to be able to run a
procedure within a thread that will notify me when that procedure is
done so that I can continue with the next procedure. I can't go to
the next procedure until the first one is completely through. I
believe it is called a callback.
>
Daniel
>






Jul 19 '08 #6
wrong copy-paste on last post

ProcessStartInfo ^prData;
prData = gcnew ProcessStartInfo();
prData->Verb = "open";
prData->FileName = "c:\\file.txt";
Process ^pr = Process::Start(prData);

"Carlos" <a@b.cescreveu na mensagem
news:OW**************@TK2MSFTNGP02.phx.gbl...
Perhaps this code could help u

ProcessStartInfo ^prData;
prData = new ProcessStartInfo();
prData->Verb = "open";
prData->FileName = "c:\\file.txt";
Process ^pr = Process::Start(prInfo);

... I havent a compiler now, I believe from here
you can call pr::Waitforexit( ) the way u want

Carlos.

"Carlos" <a@b.cescreveu na mensagem
news:%2****************@TK2MSFTNGP02.phx.gbl...
>excuseme, now I have not my things here, I cant verify
I used what I ve told u.

"Carlos" <a@b.cescreveu na mensagem
news:Om**************@TK2MSFTNGP06.phx.gbl...
>>>
this could help you, process.waitforexit();
its placed on system :: diagnostics namespace, its clearly independent
of threads creation, u can conbine its use with threads so you obtain
parallel processes working at the same time.
I ve used all I say only once, so take care please.
hope this helps, Carlos.

"Daniel" <ne******@cableone.netescreveu na mensagem
news:ub**************@TK2MSFTNGP03.phx.gbl...
What is it called when I have the thread notify me that it's done? In
visual basic it's called raising an event. Win32 API calls it
callback.
I need to know how to do that. I need to have a word to search the
MSDN
documentation.

Daniel

"Carlos" <a@b.cwrote in message
news:u3**************@TK2MSFTNGP06.phx.gbl...
>
System : :Threading namespace
>
Carlos.
>
"Daniel" <ne******@cableone.netescreveu na mensagem
news:Op**************@TK2MSFTNGP04.phx.gbl.. .
>How does .NET in VC++ create a new thread. I need to be able to run
>a
>procedure within a thread that will notify me when that procedure is
>done so that I can continue with the next procedure. I can't go to
>the next procedure until the first one is completely through. I
>believe it is called a callback.
>>
>Daniel
>>
>
>






Jul 19 '08 #7
Daniel wrote:
What is it called when I have the thread notify me that it's done? In
visual basic it's called raising an event. Win32 API calls it
callback. I need to know how to do that. I need to have a word to
search the MSDN documentation.
Try BackgroundWorker class.
>
Daniel

"Carlos" <a@b.cwrote in message
news:u3**************@TK2MSFTNGP06.phx.gbl...
>>
System : :Threading namespace

Carlos.

"Daniel" <ne******@cableone.netescreveu na mensagem
news:Op**************@TK2MSFTNGP04.phx.gbl...
>>How does .NET in VC++ create a new thread. I need to be able to
run a procedure within a thread that will notify me when that
procedure is done so that I can continue with the next procedure. I
can't go to the next procedure until the first one is completely
through. I believe it is called a callback.

Daniel

Jul 21 '08 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Travis Berg | last post: by
1 post views Thread by scott ocamb | last post: by
31 posts views Thread by AlexeiOst | last post: by
8 posts views Thread by Mountain Bikn' Guy | last post: by
9 posts views Thread by Marc Miller | last post: by
7 posts views Thread by Roemer | last post: by
4 posts views Thread by Edwin Gomez | last post: by
6 posts views Thread by HolyShea | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.