Click here to Skip to main content
15,918,211 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Kill a thread Pin
ThatsAlok1-Apr-05 18:35
ThatsAlok1-Apr-05 18:35 
GeneralRe: Kill a thread Pin
eli150219791-Apr-05 3:10
eli150219791-Apr-05 3:10 
GeneralRe: Kill a thread Pin
bouli1-Apr-05 3:17
bouli1-Apr-05 3:17 
GeneralRe: Kill a thread Pin
BadJerry1-Apr-05 3:47
BadJerry1-Apr-05 3:47 
GeneralRe: Kill a thread Pin
bouli1-Apr-05 3:50
bouli1-Apr-05 3:50 
GeneralRe: Kill a thread Pin
Blake Miller1-Apr-05 4:55
Blake Miller1-Apr-05 4:55 
GeneralRe: Kill a thread Pin
bouli1-Apr-05 5:05
bouli1-Apr-05 5:05 
GeneralRe: Kill a thread Pin
bouli1-Apr-05 5:05
bouli1-Apr-05 5:05 
Hi,

When I delete the thread from the m_pThread (CWinThread*) it crashes. So, I am using the simple Win32 API function CreateThread and TerminateThread and there is no memory leaks. Laugh | :laugh: Why doing complex as we can do simple?

Indeed, the driver is poorly implemented. It's a USB driver for HP calculators (shipped by HP) and it does not handle correctly the overlapped IO (the system crashes when I use overlapped IOs), if it would have handle them correctly, of course, overlapped IO would have been much more simple. But now, with this brutal algorithm of calling ReadFile in a thread and kill the thread after an amount of time and repeat the operation until something comes works fine now Smile | :) But I'm agree that overlapped IO should be the best choice. Of course, using overlapped IOs, is the first idea that came in mind. Wink | ;)

Thanks to all of you for the help Smile | :)

Best regards.




There is no spoon.
GeneralRe: Kill a thread Pin
David Crow1-Apr-05 3:56
David Crow1-Apr-05 3:56 
GeneralDialog resource Pin
The Professor1-Apr-05 2:08
The Professor1-Apr-05 2:08 
GeneralRe: Dialog resource Pin
toxcct1-Apr-05 2:15
toxcct1-Apr-05 2:15 
GeneralRe: Dialog resource Pin
The Professor1-Apr-05 12:13
The Professor1-Apr-05 12:13 
GeneralRe: Dialog resource Pin
ThatsAlok1-Apr-05 2:17
ThatsAlok1-Apr-05 2:17 
GeneralRe: Dialog resource Pin
David Crow1-Apr-05 3:58
David Crow1-Apr-05 3:58 
GeneralRe: Dialog resource Pin
The Professor1-Apr-05 12:20
The Professor1-Apr-05 12:20 
GeneralRe: Dialog resource Pin
ThatsAlok1-Apr-05 18:05
ThatsAlok1-Apr-05 18:05 
GeneralRe: Dialog resource Pin
The Professor2-Apr-05 18:43
The Professor2-Apr-05 18:43 
GeneralAbout Windows Explorer-style TreeView Pin
Kim Myong1-Apr-05 1:54
Kim Myong1-Apr-05 1:54 
GeneralRe: About Windows Explorer-style TreeView Pin
Alexander M.,1-Apr-05 2:54
Alexander M.,1-Apr-05 2:54 
GeneralRe: About Windows Explorer-style TreeView Pin
Kim Myong1-Apr-05 3:41
Kim Myong1-Apr-05 3:41 
GeneralRe: About Windows Explorer-style TreeView Pin
Alexander M.,1-Apr-05 3:47
Alexander M.,1-Apr-05 3:47 
GeneralMFC Toolbox Pin
charu1231-Apr-05 1:32
charu1231-Apr-05 1:32 
GeneralRe: MFC Toolbox Pin
Maximilien1-Apr-05 2:50
Maximilien1-Apr-05 2:50 
GeneralRe: MFC Toolbox Pin
charu1233-Apr-05 17:19
charu1233-Apr-05 17:19 
GeneralAccess File Copy Pin
Halberad1-Apr-05 0:51
Halberad1-Apr-05 0:51 

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.