Click here to Skip to main content
15,895,656 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhandwolf@126.com Pin
superhandwolf4-Sep-05 23:05
superhandwolf4-Sep-05 23:05 
AnswerRe: handwolf@126.com Pin
toxcct4-Sep-05 23:15
toxcct4-Sep-05 23:15 
GeneralRe: handwolf@126.com Pin
handwolf824-Sep-05 23:30
handwolf824-Sep-05 23:30 
QuestionRe: handwolf@126.com Pin
toxcct4-Sep-05 23:33
toxcct4-Sep-05 23:33 
AnswerRe: handwolf@126.com Pin
superhandwolf5-Sep-05 1:11
superhandwolf5-Sep-05 1:11 
GeneralRe: handwolf@126.com Pin
superhandwolf5-Sep-05 3:19
superhandwolf5-Sep-05 3:19 
AnswerRe: handwolf@126.com Pin
Gary R. Wheeler5-Sep-05 4:24
Gary R. Wheeler5-Sep-05 4:24 
QuestionHow to properly stop STA thread Pin
ComplexLifeForm4-Sep-05 23:03
ComplexLifeForm4-Sep-05 23:03 
Hi,
Sorry I am posting this question again in VC++ thread, posted it earlier in COM section but seems like responses are bit slow in that section. Requesting all the readers to please answer my query if they feel they can provide some inputs.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I am using a third party COM component to connect to a remote SSH server. For this I have created a STA thread. Now I have a trivial user scenario, when the user issues a connect command a modal dialog is shown with a cancel button to display the status of connection. At anytime the user can press cancel button to abort the operation. Since the calls to cancel/abort are generally asynchronous the actual call to disconnect comes from a different STA thread. Now the problem I am facing is that the after the user clicks the cancel button the dialog is not getting disposed away and the thread is not stopping, thus my application hangs. If I attach a debugger to the release build of the application, the application breaks in the debugger with Invalid RtlHeapAddress. Initially I though it could be a problem of directly accessing my interface pointer, so I marshalled the interface pointer using GlobalInterfaceTable, yet the result is the same.

After some debugging I found that the call to Connect is not returning at all, to be on a safer side I have a message loops in my all STA threads.

How do I make sure that my dialog is disposed properly and my STA thread also stops properly.

I am using VC++ 6.0 for developing my application. The COM part is implemented using pure C++

Thanks
AnswerRe: How to properly stop STA thread Pin
MailtoGops5-Sep-05 4:08
MailtoGops5-Sep-05 4:08 
GeneralRe: How to properly stop STA thread Pin
ComplexLifeForm5-Sep-05 7:06
ComplexLifeForm5-Sep-05 7:06 
Questionproblem at run time window Pin
a_david1234-Sep-05 22:57
a_david1234-Sep-05 22:57 
AnswerRe: problem at run time window Pin
MailtoGops5-Sep-05 4:15
MailtoGops5-Sep-05 4:15 
QuestionCheck file status Pin
Member 11412684-Sep-05 22:53
Member 11412684-Sep-05 22:53 
AnswerRe: Check file status Pin
ThatsAlok4-Sep-05 23:24
ThatsAlok4-Sep-05 23:24 
QuestionSharing data between two DLLs Pin
lata07mahi4-Sep-05 22:14
lata07mahi4-Sep-05 22:14 
AnswerRe: Sharing data between two DLLs Pin
Neagoe Gabriel4-Sep-05 22:27
Neagoe Gabriel4-Sep-05 22:27 
AnswerRe: Sharing data between two DLLs Pin
ThatsAlok4-Sep-05 22:43
ThatsAlok4-Sep-05 22:43 
AnswerRe: Sharing data between two DLLs Pin
MailtoGops5-Sep-05 4:10
MailtoGops5-Sep-05 4:10 
QuestionCalling .exe application using C/C++ Pin
bryan5234-Sep-05 21:51
bryan5234-Sep-05 21:51 
AnswerRe: Calling .exe application using C/C++ Pin
Neagoe Gabriel4-Sep-05 22:13
Neagoe Gabriel4-Sep-05 22:13 
GeneralRe: Calling .exe application using C/C++ Pin
toxcct4-Sep-05 22:37
toxcct4-Sep-05 22:37 
GeneralRe: Calling .exe application using C/C++ Pin
Neagoe Gabriel4-Sep-05 22:44
Neagoe Gabriel4-Sep-05 22:44 
General[Message Deleted] Pin
toxcct4-Sep-05 22:48
toxcct4-Sep-05 22:48 
AnswerRe: Calling .exe application using C/C++ Pin
toxcct4-Sep-05 22:40
toxcct4-Sep-05 22:40 
AnswerRe: Calling .exe application using C/C++ Pin
ThatsAlok4-Sep-05 22:48
ThatsAlok4-Sep-05 22:48 

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.