Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2008

Tip: Looking for answers? Try searching our database.

how to create thread with callback

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel - 19 Jul 2008 01:00 GMT
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
Carlos - 19 Jul 2008 01:47 GMT
System : :Threading namespace

Carlos.

> 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
[quoted text clipped - 3 lines]
>
> Daniel
Daniel - 19 Jul 2008 10:39 GMT
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

> System : :Threading namespace
>
[quoted text clipped - 7 lines]
>>
>> Daniel
Carlos - 19 Jul 2008 13:59 GMT
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.

> 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.
[quoted text clipped - 14 lines]
>>>
>>> Daniel
Carlos - 19 Jul 2008 14:14 GMT
excuseme, now I have not my things here, I cant verify
I used what I ve told u.

> this could help you, process.waitforexit();
> its placed on system :: diagnostics namespace, its clearly independent
[quoted text clipped - 21 lines]
>>>>
>>>> Daniel
Carlos - 19 Jul 2008 15:20 GMT
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.

> excuseme, now I have not my things here, I cant verify
> I used what I ve told u.
[quoted text clipped - 24 lines]
>>>>>
>>>>> Daniel
Carlos - 19 Jul 2008 15:52 GMT
wrong copy-paste on last post

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

> Perhaps this code could help u
>
[quoted text clipped - 40 lines]
>>>>>>
>>>>>> Daniel
Ben Voigt [C++ MVP] - 21 Jul 2008 18:19 GMT
> 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
>
[quoted text clipped - 9 lines]
>>>
>>> Daniel

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.