Solved

resume and suspend thread

Posted on 2004-08-12
1
755 Views
Last Modified: 2013-11-20
Hi all

I had created my thread with CREATE_SUSPENDED flag.
When I resumed it with ResumeThread, it works. And stop it with SuspendThread, it also works.
But when I tried to resume again, the thread cannot be restarted. Any advice? Thanks in advance.
0
Comment
Question by:mwcmp
1 Comment
 
LVL 13

Accepted Solution

by:
SteH earned 100 total points
Comment Utility
What is the return value of ResumeThread/SuspendThread? When SuspendThread is called multiple times a matching number ResumeThread calls are needed.

See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_cwinthread.3a3a.resumethread.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_cwinthread.3a3a.suspendthread.asp
for information from MS.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
WinWaitActive parameters 12 31
move a line in eclipse 3 60
abstract class with all non abstract mentods 6 71
sumHeights2  challenge 7 75
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now