equal
deleted
inserted
replaced
23 { |
23 { |
24 } |
24 } |
25 |
25 |
26 CWin32Console::~CWin32Console() |
26 CWin32Console::~CWin32Console() |
27 { |
27 { |
|
28 CleanupUnderlyingConsole(); |
28 iWin32.FreeConsole(); |
29 iWin32.FreeConsole(); |
29 // when call FreeConsole(), it should cause the reader thread to exit as the |
30 // when call FreeConsole(), it should cause the reader thread to exit as the |
30 // console read handle will become invalid, and windows will complete the |
31 // console read handle will become invalid, and windows will complete the |
31 // ReadRequest with an error |
32 // ReadRequest with an error |
32 if (iReaderThread.Handle()) |
33 if (iReaderThread.Handle()) |
59 iThreadParams.iWin32 = &iWin32; |
60 iThreadParams.iWin32 = &iWin32; |
60 iThreadParams.iKeyQueue = iKeyQueue; |
61 iThreadParams.iKeyQueue = iKeyQueue; |
61 err = iReaderThread.Create(KReadThreadName, ReaderThread, 0x800, KMinHeapSize, KMinHeapSize*4, &iThreadParams); |
62 err = iReaderThread.Create(KReadThreadName, ReaderThread, 0x800, KMinHeapSize, KMinHeapSize*4, &iThreadParams); |
62 if (err!=KErrNone) return err; |
63 if (err!=KErrNone) return err; |
63 iReaderThread.Resume(); |
64 iReaderThread.Resume(); |
64 |
65 CleanupUnderlyingConsole(); |
|
66 |
65 return KErrNone; |
67 return KErrNone; |
66 } |
68 } |
67 |
69 |
68 void CWin32Console::Read(TRequestStatus& aStatus) |
70 void CWin32Console::Read(TRequestStatus& aStatus) |
69 { |
71 { |