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

C / C++ / MFC

 
GeneralRe: Method to get file path Pin
led mike25-Mar-08 10:12
led mike25-Mar-08 10:12 
GeneralRe: Method to get file path Pin
nvphap25-Mar-08 16:55
nvphap25-Mar-08 16:55 
GeneralRe: Method to get file path Pin
Mark Salsbery25-Mar-08 17:07
Mark Salsbery25-Mar-08 17:07 
GeneralRe: Method to get file path Pin
nvphap25-Mar-08 21:35
nvphap25-Mar-08 21:35 
GeneralRe: Method to get file path Pin
nvphap26-Mar-08 0:42
nvphap26-Mar-08 0:42 
GeneralRe: Method to get file path Pin
ramana.g26-Mar-08 2:06
ramana.g26-Mar-08 2:06 
QuestionWhich is Better Pro*C/C++ or C# ??? Pin
Amit4u25-Mar-08 7:02
Amit4u25-Mar-08 7:02 
GeneralRe: Which is Better Pro*C/C++ or C# ??? Pin
Randor 25-Mar-08 7:18
professional Randor 25-Mar-08 7:18 
GeneralRe: Which is Better Pro*C/C++ or C# ??? Pin
Maximilien25-Mar-08 7:19
Maximilien25-Mar-08 7:19 
GeneralRe: Which is Better Pro*C/C++ or C# ??? Pin
Member 75496025-Mar-08 8:43
Member 75496025-Mar-08 8:43 
GeneralNeed help locating source of errors Pin
97C5ENVY25-Mar-08 6:03
97C5ENVY25-Mar-08 6:03 
GeneralRe: Need help locating source of errors Pin
Randor 25-Mar-08 6:15
professional Randor 25-Mar-08 6:15 
GeneralRe: Need help locating source of errors Pin
Mark Salsbery25-Mar-08 6:19
Mark Salsbery25-Mar-08 6:19 
GeneralSelect Item in ListView Control In VC++ 6 Win32 API Pin
bhat25-Mar-08 4:25
bhat25-Mar-08 4:25 
QuestionRe: Select Item in ListView Control In VC++ 6 Win32 API Pin
David Crow25-Mar-08 5:24
David Crow25-Mar-08 5:24 
GeneralCFtpConnection::Close Pin
William Engberts25-Mar-08 4:22
William Engberts25-Mar-08 4:22 
GeneralRe: CFtpConnection::Close Pin
led mike25-Mar-08 5:32
led mike25-Mar-08 5:32 
GeneralRe: CFtpConnection::Close Pin
William Engberts25-Mar-08 23:19
William Engberts25-Mar-08 23:19 
GeneralRe: CFtpConnection::Close Pin
led mike26-Mar-08 5:07
led mike26-Mar-08 5:07 
GeneralRe: CFtpConnection::Close Pin
William Engberts27-Mar-08 0:56
William Engberts27-Mar-08 0:56 
GeneralRe: CFtpConnection::Close Pin
led mike27-Mar-08 5:19
led mike27-Mar-08 5:19 
GeneralRe: CFtpConnection::Close Pin
Randor 25-Mar-08 6:05
professional Randor 25-Mar-08 6:05 
First let me say that I am not a CInternetSession expert, simply because I generally migrate to the lower levels of development. However with that being said I can make a guess to what is happening based on the error message you have posted.

You see, when you attempt to open a connection... a three way handshake takes place. Here is a fairly good visual explanation:
http://www.youtube.com/watch?v=z40w3G8szK0[^]

And when you close the connection you must also wait for a handshake sequence to complete. Unfortunately I could not find a video for this. Maybe this URL will suffice:
http://www.freesoft.org/CIE/Course/Section4/11.htm[^]

Here is Microsofts detailed explanation on the whole thing.

http://support.microsoft.com/kb/172983[^]

In laymens terms... when you close() a connection. What is happening is that a message called FIN is sent to the other side and your client goes into a FIN_WAIT state. At this point it is waiting for the other side to respond. Unfortunately with your code:

CInternetSession::Close ();
delete m_Session;


You are probably deleting the object before it has completed the connection termination handshake.

I believe you need to implement a status callback:
http://msdn2.microsoft.com/en-us/library/73cf84cs(VS.80).aspx[^]

And inside OnStatusCallback() you need to wait for INTERNET_STATUS_CONNECTION_CLOSED status.

http://msdn2.microsoft.com/en-us/library/4bwy8hw5.aspx[^]

Best Wishes,
-David Delaune
GeneralRetreive Createion and Modification time for Remote file Pin
chetanjoshi925-Mar-08 4:14
chetanjoshi925-Mar-08 4:14 
GeneralRe: Retreive Createion and Modification time for Remote file Pin
Peter Weyzen25-Mar-08 19:45
Peter Weyzen25-Mar-08 19:45 
GeneralNDIS Driver Development Pin
Eakalavya25-Mar-08 3:26
Eakalavya25-Mar-08 3:26 

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.