Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

resume and suspend thread

Posted on 2004-08-12
1
Medium Priority
?
802 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 300 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

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

604 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