Click here to Skip to main content
15,949,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Button disappears after OnPaint() Pin
Nishad S5-Sep-06 18:30
Nishad S5-Sep-06 18:30 
GeneralRe: Button disappears after OnPaint() Pin
mfranco_neto6-Sep-06 15:52
mfranco_neto6-Sep-06 15:52 
Questioncontrol list Pin
With_problem29-Aug-06 16:01
With_problem29-Aug-06 16:01 
AnswerRe: control list Pin
Naveen29-Aug-06 17:33
Naveen29-Aug-06 17:33 
QuestionStand alone function? Pin
Oliver12329-Aug-06 14:43
Oliver12329-Aug-06 14:43 
AnswerRe: Stand alone function? Pin
Chris Losinger29-Aug-06 16:34
professionalChris Losinger29-Aug-06 16:34 
AnswerRe: Stand alone function? Pin
Christopher Duncan30-Aug-06 1:48
Christopher Duncan30-Aug-06 1:48 
Questionusing CHttpConnection with "Proxy-Connection: Keep-Alive" Pin
darbien siamak29-Aug-06 14:38
darbien siamak29-Aug-06 14:38 
When using CHttpConnection in my MFC program, is there a way to make the connection to Proxy server persistent instead of closing after every request? Or can I have to manually put the field into the header. For example I have:

------------------------- SAMPLE CODE ------------------------
CInternetSession session;
CHttpConnection* pConnection = NULL;
CHttpFile* pFile1 = NULL;
CString strHeaders = _T("Content-Type: image/jpeg\r\nProxy-Connection: Keep-Alive\r\nUser-Agent: MyProgram/1.0\r\n");
char buffer[BUFSIZZ];
UINT nBytesRead;

pConnection = session.GetHttpConnection("www.test.com", (INTERNET_PORT)80 );

for (i = 0; i < 30; i++) {
pFile1 = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_GET, "/", NULL, 1, NULL, NULL, INTERNET_FLAG_DONT_CACHE);
pFile1->SendRequest(strHeaders);
nBytesRead = 0;
nBytesRead = pFile1->Read(buffer, BUFSIZZ - 1);
buffer[nBytesRead] = '\0';
pFile1->Close();
delete pFile1;
}

------------------------------------------------------------------
However, when I run the code and do "netstat" I couldn't see any TCP connection with the proxy, even though the number of bytes read was non zero.

Btw, I noticed that the header produced using CHttpConnection/CHttpFile (captured using ethereal) says it's HTTP 1.0 instead of 1.1, will this create any problems with proxy server?
QuestionExcel automation function throws exception Pin
garyflet29-Aug-06 13:32
garyflet29-Aug-06 13:32 
AnswerRe: Excel automation function throws exception Pin
Stephen Hewitt29-Aug-06 13:47
Stephen Hewitt29-Aug-06 13:47 
QuestionRe: Excel automation function throws exception Pin
garyflet29-Aug-06 14:39
garyflet29-Aug-06 14:39 
QuestionSetting focus of another application from within an application Pin
si_6929-Aug-06 12:32
si_6929-Aug-06 12:32 
AnswerRe: Setting focus of another application from within an application Pin
Naveen29-Aug-06 17:36
Naveen29-Aug-06 17:36 
AnswerRe: Setting focus of another application from within an application Pin
Hamid_RT30-Aug-06 8:13
Hamid_RT30-Aug-06 8:13 
QuestionCRecordset::isFieldNull question Pin
eusto29-Aug-06 11:12
eusto29-Aug-06 11:12 
AnswerRe: CRecordset::isFieldNull question Pin
Mircea Puiu29-Aug-06 19:57
Mircea Puiu29-Aug-06 19:57 
GeneralRe: CRecordset::isFieldNull question Pin
eusto29-Aug-06 20:41
eusto29-Aug-06 20:41 
QuestionDetermine graphic card video memory Pin
BEamer29-Aug-06 9:19
BEamer29-Aug-06 9:19 
AnswerRe: Determine graphic card video memory Pin
David Crow29-Aug-06 10:37
David Crow29-Aug-06 10:37 
AnswerRe: Determine graphic card video memory Pin
Hamid_RT30-Aug-06 8:18
Hamid_RT30-Aug-06 8:18 
AnswerRe: ALT+TAB dialog not showing application icon Pin
Dave Calkins29-Aug-06 10:33
Dave Calkins29-Aug-06 10:33 
Questionmain parameters......... Pin
Jay0329-Aug-06 8:34
Jay0329-Aug-06 8:34 
AnswerRe: main parameters......... Pin
Zac Howland29-Aug-06 8:47
Zac Howland29-Aug-06 8:47 
AnswerRe: main parameters......... Pin
Jun Du29-Aug-06 8:48
Jun Du29-Aug-06 8:48 
AnswerRe: main parameters......... Pin
David Crow29-Aug-06 10:35
David Crow29-Aug-06 10:35 

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.