Click here to Skip to main content
15,921,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: NTService Using MFC Pin
David Crow14-Aug-08 3:56
David Crow14-Aug-08 3:56 
QuestionDisable bitmap button Pin
hari_honey13-Aug-08 19:25
hari_honey13-Aug-08 19:25 
AnswerRe: Disable bitmap button Pin
afterruins13-Aug-08 19:31
afterruins13-Aug-08 19:31 
GeneralRe: Disable bitmap button Pin
hari_honey13-Aug-08 19:38
hari_honey13-Aug-08 19:38 
GeneralRe: Disable bitmap button Pin
afterruins13-Aug-08 19:43
afterruins13-Aug-08 19:43 
QuestionRe: Disable bitmap button Pin
sashoalm13-Aug-08 20:19
sashoalm13-Aug-08 20:19 
AnswerRe: Disable bitmap button Pin
pallaka13-Aug-08 21:11
pallaka13-Aug-08 21:11 
AnswerRe: Disable bitmap button Pin
KarstenK13-Aug-08 21:25
mveKarstenK13-Aug-08 21:25 
GeneralRe: Disable bitmap button Pin
hari_honey14-Aug-08 1:02
hari_honey14-Aug-08 1:02 
AnswerRe: Disable bitmap button Pin
_AnsHUMAN_ 13-Aug-08 21:57
_AnsHUMAN_ 13-Aug-08 21:57 
AnswerRe: Disable bitmap button Pin
Jijo.Raj13-Aug-08 22:30
Jijo.Raj13-Aug-08 22:30 
AnswerRe: Disable bitmap button Pin
Hamid_RT13-Aug-08 23:50
Hamid_RT13-Aug-08 23:50 
QuestionHow can Check .chm file is open or not? Pin
Le@rner13-Aug-08 19:14
Le@rner13-Aug-08 19:14 
AnswerRe: How can Check .chm file is open or not? Pin
sashoalm13-Aug-08 20:24
sashoalm13-Aug-08 20:24 
GeneralRe: How can Check .chm file is open or not? Pin
Le@rner13-Aug-08 20:33
Le@rner13-Aug-08 20:33 
GeneralRe: How can Check .chm file is open or not? Pin
sashoalm13-Aug-08 20:45
sashoalm13-Aug-08 20:45 
GeneralRe: How can Check .chm file is open or not? Pin
Le@rner13-Aug-08 20:54
Le@rner13-Aug-08 20:54 
QuestionUsing Notes C++ API to access Lotus Notes DBs on Visual C++/MFC Pin
afterruins13-Aug-08 19:13
afterruins13-Aug-08 19:13 
AnswerRe: Using Notes C++ API to access Lotus Notes DBs on Visual C++/MFC [modified] Pin
Jijo.Raj13-Aug-08 22:34
Jijo.Raj13-Aug-08 22:34 
QuestionInternet Explorer Socket Programming? [modified] Pin
Alex H 198313-Aug-08 19:11
Alex H 198313-Aug-08 19:11 
QuestionHow cab Bold the Caption of Property Pages? Pin
Le@rner13-Aug-08 18:28
Le@rner13-Aug-08 18:28 
AnswerRe: How cab Bold the Caption of Property Pages? Pin
Paresh Chitte13-Aug-08 21:20
Paresh Chitte13-Aug-08 21:20 
GeneralRe: How cab Bold the Caption of Property Pages? Pin
Le@rner13-Aug-08 21:45
Le@rner13-Aug-08 21:45 
GeneralRe: How cab Bold the Caption of Property Pages? Pin
Mark Salsbery14-Aug-08 4:58
Mark Salsbery14-Aug-08 4:58 
QuestionFTPConnection Stalls - Won't Restart or Finish Pin
Stan Bartsch13-Aug-08 15:35
Stan Bartsch13-Aug-08 15:35 
I'm using a CFtpConnection to transfer files from my application to a vendor's device. Sometimes, for no apparent reason, the PutFile() pauses (the vendor's device status shows a file transfer in process, but the PutFile() never returns).

Now here's the rub. If I'm in the debugger, and I break the execution, the transfers all work like a champ, and never fail. If I let the code free-run, the freeze occurs.

The "PutFile()" function is called from a separate thread than the CFtpConnection is created in so that I can detect this "hung" condition. The master thread even includes code to try and re-connect to the vendor's device - but the retry only works IF I BREAK execution in the debugger.

The "reconnected" PutFiles always work - always.

If I break the thread prior to creating the CFTPConnection, and then step through the creation, the putfiles always work.

Apparently I'm not initializing something properly in my create FTP connection (or my system in general).

I don't have to deal with WSAStartup and WSACleanup, do I?

Logic looks like this:

{

xferBlock.file_list=createListofFilesToSend( some_location );
xferBlock.pConnect=MakeFTPConnection( sIPAdress, sUser, sPassword, nError );
pThread=AfxBeginThread( AsyncPutFile, this, THREAD_PRIORITY_NORMAL,0, CREATE_SUSPENDED);
pThread->m_bAutoDelete=false;
pThread->ResumeThread();

// loop until done or timed out
do{
UpdateProgressFromxferBlockInfo();
}while( !isTimedOut() && !isDoneAccordingToxferBlock() );

// if timed out...kill progress....
if( isTimedOut() )
KillTheThread( pThread );


}

AsyncPutFile() basically loops through the file_list and does a pConnect->PutFile() on each member.


Not shown are the retry logic, which fails. But if I find out why it's pausing, maybe the retry logic won't fail?

Any ideas?

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.