Solved

resume and suspend thread

Posted on 2004-08-12
1
760 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 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

24 Experts available now in Live!

Get 1:1 Help Now