Click here to Skip to main content
15,892,927 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralA beginner needs help. Pin
Mcshizzle20-Aug-02 23:05
Mcshizzle20-Aug-02 23:05 
GeneralRe: A beginner needs help. Pin
markkuk20-Aug-02 23:18
markkuk20-Aug-02 23:18 
QuestionHow to put App Icon in System Tray? Pin
Anonymous20-Aug-02 22:55
Anonymous20-Aug-02 22:55 
AnswerRe: How to put App Icon in System Tray? Pin
JohnJ20-Aug-02 23:08
JohnJ20-Aug-02 23:08 
AnswerRe: How to put App Icon in System Tray? Pin
Nish Nishant20-Aug-02 23:12
sitebuilderNish Nishant20-Aug-02 23:12 
GeneralRe: How to put App Icon in System Tray? Pin
Anonymous21-Aug-02 0:04
Anonymous21-Aug-02 0:04 
GeneralEnding thread and ReadFile is still trying to read Pin
Janine20-Aug-02 22:27
Janine20-Aug-02 22:27 
GeneralRe: Ending thread and ReadFile is still trying to read Pin
Daniel Lohmann20-Aug-02 23:51
Daniel Lohmann20-Aug-02 23:51 
Janetta,

I am a bit confused about the scenario you described. Your worker thread calls first ReadFile(), then AfxEndThread() but ReadFile() continues to execute Confused | :confused: Confused | :confused:

Are we talking about one or two threads here? If we are talking about one thread, you are using overlapped IO. In this case you could cancle the IO with CancleIO().

If we are talking about two threads, you misunderstood the function of AfxEndhread(). It could be called only from inside the thread that wants to end and it is not possible to end a foreign thread this way. (Ending a foreign thread would be possible with TerminatThread(), however, using TerminateThread() is a big no-no!)

Or am I completly on the wrong path?

--

Daniel Lohmann

http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there Big Grin | :-D )
GeneralRe: Ending thread and ReadFile is still trying to read Pin
Janine21-Aug-02 0:51
Janine21-Aug-02 0:51 
GeneralRe: Ending thread and ReadFile is still trying to read Pin
Janine21-Aug-02 1:46
Janine21-Aug-02 1:46 
GeneralRe: Ending thread and ReadFile is still trying to read Pin
Daniel Lohmann21-Aug-02 2:25
Daniel Lohmann21-Aug-02 2:25 
GeneralRe: Ending thread and ReadFile is still trying to read Pin
Janine21-Aug-02 2:38
Janine21-Aug-02 2:38 
GeneralRe: Ending thread and ReadFile is still trying to read Pin
Max Santos22-Aug-02 1:14
Max Santos22-Aug-02 1:14 
GeneralColour fonts Pin
wong190720-Aug-02 22:15
wong190720-Aug-02 22:15 
GeneralRe: Colour fonts Pin
Anonymous20-Aug-02 22:35
Anonymous20-Aug-02 22:35 
GeneralRe: Colour fonts Pin
wong190720-Aug-02 23:03
wong190720-Aug-02 23:03 
QuestionHow to export templates from an extension DLL ? Pin
Jonathan de Halleux20-Aug-02 22:00
Jonathan de Halleux20-Aug-02 22:00 
AnswerRe: How to export templates from an extension DLL ? Pin
Lakitu20-Aug-02 23:18
Lakitu20-Aug-02 23:18 
GeneralThanks. Pin
Jonathan de Halleux21-Aug-02 0:00
Jonathan de Halleux21-Aug-02 0:00 
GeneralOutlook-like menu control Pin
Dominik Reichl20-Aug-02 21:56
Dominik Reichl20-Aug-02 21:56 
GeneralRe: Outlook-like menu control Pin
Rashid Thadha21-Aug-02 6:34
Rashid Thadha21-Aug-02 6:34 
GeneralRe: Outlook-like menu control Pin
Dominik Reichl22-Aug-02 6:11
Dominik Reichl22-Aug-02 6:11 
GeneralDLL's, the Heap, and CDocument Pin
makom4220-Aug-02 21:55
makom4220-Aug-02 21:55 
GeneralRe: DLL's, the Heap, and CDocument Pin
Lakitu20-Aug-02 23:21
Lakitu20-Aug-02 23:21 
GeneralRe: DLL's, the Heap, and CDocument Pin
makom4221-Aug-02 3:16
makom4221-Aug-02 3:16 

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.