Click here to Skip to main content
15,917,329 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: Mixing managed/unmanaged in C++/CLI Pin
N a v a n e e t h12-Jan-09 1:47
N a v a n e e t h12-Jan-09 1:47 
GeneralRe: Mixing managed/unmanaged in C++/CLI Pin
Jon Hulatt12-Jan-09 1:49
Jon Hulatt12-Jan-09 1:49 
GeneralRe: Mixing managed/unmanaged in C++/CLI Pin
N a v a n e e t h12-Jan-09 2:08
N a v a n e e t h12-Jan-09 2:08 
AnswerRe: Mixing managed/unmanaged in C++/CLI Pin
teejayem12-Jan-09 9:28
teejayem12-Jan-09 9:28 
Questionthread.Abort() Pin
staticv12-Jan-09 0:53
staticv12-Jan-09 0:53 
AnswerRe: thread.Abort() [modified] Pin
N a v a n e e t h12-Jan-09 2:17
N a v a n e e t h12-Jan-09 2:17 
GeneralRe: thread.Abort() Pin
staticv12-Jan-09 2:44
staticv12-Jan-09 2:44 
GeneralRe: thread.Abort() Pin
N a v a n e e t h12-Jan-09 2:56
N a v a n e e t h12-Jan-09 2:56 
Following is your code
Thread ^thr = Thread::CurrentThread;
try
{
   for (int i = 0; i < 100; i++)
   {
       Console::WriteLine("{0} {1}", Name, i.ToString());
       Thread::Sleep(10);
   }
   return;
}
catch (ThreadAbortException^)
{
   Console::WriteLine("{0} Aborted", Name);
   // Reset the abort so that the meoth will continue processing
   thr->ResetAbort();
}
In this, when the thread abort exception is raised, the control will come out of the loop and enter into the catch block. Thread.ResetAbort puts the thread again in running state, but since the loop is finished, there is nothing to execute and the thread will return immediately. This is the reason why your code failed.


GeneralRe: thread.Abort() Pin
staticv12-Jan-09 2:58
staticv12-Jan-09 2:58 
GeneralRe: thread.Abort() Pin
N a v a n e e t h12-Jan-09 3:11
N a v a n e e t h12-Jan-09 3:11 
QuestionProblem about the visual 2008 c++ Pin
sai5611-Jan-09 21:39
sai5611-Jan-09 21:39 
QuestionVC++ event handling in ManagedC++ Pin
BicycleTheif9-Jan-09 18:23
BicycleTheif9-Jan-09 18:23 
QuestionHow can I include iframe to VC++? Pin
Azhar Rahi9-Jan-09 6:55
Azhar Rahi9-Jan-09 6:55 
AnswerRe: How can I include iframe to VC++? Pin
Aman Bhullar11-Jan-09 4:11
Aman Bhullar11-Jan-09 4:11 
GeneralRe: How can I include iframe to VC++? [modified] Pin
Azhar Rahi11-Jan-09 9:49
Azhar Rahi11-Jan-09 9:49 
QuestionNeed help for directory search in C++ Pin
Thilek8-Jan-09 5:35
Thilek8-Jan-09 5:35 
AnswerRe: Need help for directory search in C++ Pin
George L. Jackson8-Jan-09 6:27
George L. Jackson8-Jan-09 6:27 
QuestionInvoking a Web Service using Visual C++ .NET Pin
Thomas_Mathews8-Jan-09 1:42
Thomas_Mathews8-Jan-09 1:42 
QuestionRe: Invoking a Web Service using Visual C++ .NET Pin
Mark Salsbery8-Jan-09 5:05
Mark Salsbery8-Jan-09 5:05 
AnswerCP: Ignore cross post Pin
EliottA8-Jan-09 6:48
EliottA8-Jan-09 6:48 
AnswerRe: Invoking a Web Service using Visual C++ .NET OR Managed C++ Pin
Thomas_Mathews8-Jan-09 18:17
Thomas_Mathews8-Jan-09 18:17 
QuestionTrouble using namespace System Pin
linkfitz7-Jan-09 5:32
linkfitz7-Jan-09 5:32 
AnswerRe: Trouble using namespace System Pin
Mark Salsbery7-Jan-09 7:50
Mark Salsbery7-Jan-09 7:50 
Questionflicker free drawing [modified] Pin
staticv6-Jan-09 3:13
staticv6-Jan-09 3:13 
AnswerRe: flicker free drawing Pin
Mark Salsbery6-Jan-09 5:48
Mark Salsbery6-Jan-09 5:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.