Solved

resume and suspend thread

Posted on 2004-08-12
1
783 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 13

Accepted Solution

by:
SteH earned 100 total points
ID: 11781815
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 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