[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Killing a Thread

Posted on 2004-11-24
3
Medium Priority
?
251 Views
Last Modified: 2010-04-15
I have an application that is using DirectX's DirectShow through ComInterop.  The problem I am having is that it seems that one of the DirectShow interfaces is creating a worker thread that continues to exist event when I call Marshal.ReleaseComObject on the interface.  I am basically asking how can I kill a thread when I don't have a handle to it???

Thanks,
kendal
0
Comment
Question by:gvector1
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
Tom Knowlton earned 1000 total points
ID: 12722231
A guess:

If the process shows up in TaskManager -> Processes tab....you can kill it by name:

//stop the service if its running
System.Diagnostics.Process[] prs = System.Diagnostics.Process.GetProcessesByName("WINWORD");
foreach(System.Diagnostics.Process pr in prs)
{
      pr.Kill();
}

HTH,

Tom
0
 
LVL 6

Assisted Solution

by:viola123
viola123 earned 1000 total points
ID: 12723193
try
{
 MyThread.Join();
}
catch( ThreadAbortException a )
{
    //nop.
}
0
 
LVL 5

Expert Comment

by:Tom Knowlton
ID: 12737965
Thank you....and good luck!!

Tom
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month19 days, 9 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question