Click here to Skip to main content
15,890,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get started in win32 api Pin
Mark Salsbery25-Sep-07 14:50
Mark Salsbery25-Sep-07 14:50 
AnswerRe: How to get started in win32 api Pin
Stephen Hewitt25-Sep-07 14:57
Stephen Hewitt25-Sep-07 14:57 
AnswerRe: How to get started in win32 api Pin
Nishad S25-Sep-07 17:36
Nishad S25-Sep-07 17:36 
AnswerRe: How to get started in win32 api Pin
Hamid_RT25-Sep-07 20:41
Hamid_RT25-Sep-07 20:41 
AnswerRe: How to get started in win32 api Pin
David Crow26-Sep-07 3:28
David Crow26-Sep-07 3:28 
AnswerRe: How to get started in win32 api Pin
Jeremy Falcon26-Sep-07 5:25
professionalJeremy Falcon26-Sep-07 5:25 
QuestionResumeThread not calling function Pin
rp_suman25-Sep-07 14:10
rp_suman25-Sep-07 14:10 
AnswerRe: ResumeThread not calling function [modified] Pin
Mark Salsbery25-Sep-07 14:29
Mark Salsbery25-Sep-07 14:29 
SuspendThread() will stop the thread at an arbitrary location in the thread's code.
When you call ResumeThread(), execution will resume at the location the thread was
suspended.  The thread procedure is NOT a function that gets re-called.

Because of this, SuspendThread() shouldn't be used like this - unless you can figure
out a way to completely control the execution location in the thread.

You really should be doing this another way - communicating with the thread in some
fashion to ensure it's in the state you expect when you pause and restart it.

Also, if you're using any MFC stuff in your thread, you should be using AfxBeginThread()
instead of the CreateThread() API.
If you are not using MFC but you're using any CRT functions in your thread you should be
using _beginthread[ex]() instead of CreateThread().

Mark

*edited for grammar/spleling*

Last modified: 22mins after originally posted --


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

AnswerRe: ResumeThread not calling function Pin
Stephen Hewitt25-Sep-07 14:49
Stephen Hewitt25-Sep-07 14:49 
GeneralRe: ResumeThread not calling function Pin
rp_suman25-Sep-07 15:05
rp_suman25-Sep-07 15:05 
Questionif problems Pin
dellthinker25-Sep-07 12:19
dellthinker25-Sep-07 12:19 
AnswerRe: if problems Pin
Mark Salsbery25-Sep-07 13:09
Mark Salsbery25-Sep-07 13:09 
GeneralRe: if problems Pin
dellthinker25-Sep-07 14:02
dellthinker25-Sep-07 14:02 
GeneralRe: if problems Pin
Mark Salsbery25-Sep-07 14:17
Mark Salsbery25-Sep-07 14:17 
GeneralRe: if problems Pin
dellthinker25-Sep-07 14:20
dellthinker25-Sep-07 14:20 
GeneralRe: if problems Pin
Mark Salsbery25-Sep-07 14:38
Mark Salsbery25-Sep-07 14:38 
QuestionRe: if problems Pin
David Crow26-Sep-07 3:38
David Crow26-Sep-07 3:38 
AnswerRe: if problems Pin
dellthinker26-Sep-07 14:24
dellthinker26-Sep-07 14:24 
QuestionRe: if problems Pin
David Crow26-Sep-07 16:27
David Crow26-Sep-07 16:27 
AnswerRe: if problems Pin
dellthinker30-Sep-07 15:53
dellthinker30-Sep-07 15:53 
QuestionCan't write files with large filenames onto CD/DVD Pin
vijay_aroli25-Sep-07 9:39
vijay_aroli25-Sep-07 9:39 
AnswerRe: Can't write files with large filenames onto CD/DVD Pin
Jeremy Falcon25-Sep-07 10:44
professionalJeremy Falcon25-Sep-07 10:44 
GeneralRe: Can't write files with large filenames onto CD/DVD Pin
vijay_aroli25-Sep-07 10:53
vijay_aroli25-Sep-07 10:53 
QuestionDLL export library ( .lib file) Pin
act_x25-Sep-07 5:35
act_x25-Sep-07 5:35 
AnswerRe: DLL export library ( .lib file) Pin
Jeremy Falcon25-Sep-07 5:44
professionalJeremy Falcon25-Sep-07 5:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.