Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 291
  • Last Modified:

Killing a Thread

Okay... If you have an Apartment Model threaded application, and one thread hangs, can you kill it off with an API call? Or does it have to sit there until the app terminates...?
0
LadyVyxen
Asked:
LadyVyxen
1 Solution
 
MirkwoodCommented:
This should do it.

Private Declare Function TerminateThread Lib "kernel32" Alias "TerminateThread" (ByVal hThread As Long, ByVal dwExitCode As Long) As Long


0
 
LadyVyxenAuthor Commented:
Thank you... I'll check the WinAPI libs for the right ExitCode.
0

Featured Post

Technology Partners: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now