473,484 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2214

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3351
by: Travis Berg | last post by:
I'm running into a problem when trying to perform a callback to a Python function from a C extension. Specifically, the callback is being made by a pthread that seems to cause the problem. If I...
1
7109
by: scott ocamb | last post by:
hello I have implemented a solution using async methods. There is one async method that can be invoked multiple times, ie there are multiple async "threads" running at a time. When these...
31
2431
by: AlexeiOst | last post by:
Everywhere in documentation there are recommendations to use threads from thread pooling for relatively short tasks. As I understand, fetching a page or multiple pages (sometimes up to 50 but not...
1
2601
by: johnny | last post by:
In a multi-threaded application, say a worker thread makes an asynchronous call and specifies a callback method. But before the callback is executed, the thread is aborted by its creator. What is...
8
2369
by: Mountain Bikn' Guy | last post by:
I'm using async delegate calls. I would like to re-enter my initial thread after the callback. (I'm not using UI controls, so Control.Invoke is not the solution.) How can I manually implement...
9
2288
by: Marc Miller | last post by:
Hi all, I have 2 dev. machines, the 1st is Win 2000 with .NET 7.0 and the 2nd is XP Pro with .NET 2003. My Web Server is Win 2000 Server with IIS 5.0. I can create a new project on my test...
7
3204
by: Roemer | last post by:
Hi all I stumbled over a new problem: I have a programm with just a class that is asynchronous listening for network connections. As soon as someone connected, a new form needs to be created....
4
4775
by: Edwin Gomez | last post by:
I'm a C# developer and I'm new to Python. I would like to know if the concept of Asynchronous call-backs exists in Python. Basically what I mean is that I dispatch a thread and when the thread...
6
5099
by: HolyShea | last post by:
All, Not sure if this is possible or not - I've created a class which performs an asynchronous operation and provides notification when the operation is complete. I'd like the notification to be...
0
7079
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6949
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7103
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7194
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5403
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4838
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4527
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3038
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1355
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.