Click here to Skip to main content
15,891,629 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: my c++ application cannot allocate more than 400MB with new[] Pin
Bram van Kampen6-Sep-08 18:12
Bram van Kampen6-Sep-08 18:12 
AnswerRe: my c++ application cannot allocate more than 400MB with new[] Pin
ybenaabud7-Sep-08 3:15
ybenaabud7-Sep-08 3:15 
QuestionRe: my c++ application cannot allocate more than 400MB with new[] Pin
David Crow8-Sep-08 4:13
David Crow8-Sep-08 4:13 
GeneralRe: my c++ application cannot allocate more than 400MB with new[] Pin
ybenaabud8-Sep-08 11:59
ybenaabud8-Sep-08 11:59 
QuestionRe: my c++ application cannot allocate more than 400MB with new[] Pin
David Crow8-Sep-08 15:42
David Crow8-Sep-08 15:42 
AnswerRe: my c++ application cannot allocate more than 400MB with new[] Pin
ybenaabud9-Sep-08 11:03
ybenaabud9-Sep-08 11:03 
GeneralRe: my c++ application cannot allocate more than 400MB with new[] Pin
David Crow9-Sep-08 17:58
David Crow9-Sep-08 17:58 
NewsCHttpConnection OpenRequest SendRequest [modified] Pin
dehseth6-Sep-08 4:43
dehseth6-Sep-08 4:43 
Hi everybody,
I have been having problems with http post using visual c++ (not .Net)

Here is my code:

CInternetSession session("My Session");	
    CHttpConnection* pServer = NULL;
    CHttpFile* pFile = NULL;
    DWORD dwRet;
    char szBuff[1024];
   
    try
	{
       CString strServerName = "http://www.cnn.com";
       INTERNET_PORT nPort = 80;

       pServer = session.GetHttpConnection(strServerName, nPort);
       pFile = pServer->OpenRequest(CHttpConnection::HTTP_VERB_GET, ""); //strObject);
       //pFile->AddRequestHeaders(NULL); // szHeaders);
       pFile->SendRequest();
       pFile->QueryInfoStatusCode(dwRet);

       if (dwRet == HTTP_STATUS_OK)
       {
            ...


Well I have tried a lot of code combinations. And when I realized application crashes at
pFile->SendRequest(); I decided to make a GET instead of POST. Well it still does not work.

When I run the code above I got a MessageBox saying The URL is invalid D'Oh! | :doh:
And when I run with AddRequestHeaders(NULL) line it basicly crashes..

I have done a research at web but cannot find anything useful.

My main purpose is to open a URL which I can do it using session::openurl and after getting the content post a form and get feedback from post.


Thank you all


--- OK People the problem is solved. Guess what I SHALL NOT WRITE HTTP:// at the beginning of URL! I guess msdn should contain such an info! Cool | :cool:

modified on Saturday, September 6, 2008 11:08 AM

QuestionHow can repaint a view? Pin
Le@rner6-Sep-08 1:56
Le@rner6-Sep-08 1:56 
AnswerRe: How can repaint a view? Pin
bob169726-Sep-08 5:46
bob169726-Sep-08 5:46 
AnswerRe: How can repaint a view? Pin
bob169726-Sep-08 5:58
bob169726-Sep-08 5:58 
AnswerRe: How can repaint a view? Pin
Cedric Moonen6-Sep-08 7:40
Cedric Moonen6-Sep-08 7:40 
QuestionUpdateData giving run time error Pin
Dhiraj kumar Saini6-Sep-08 0:31
Dhiraj kumar Saini6-Sep-08 0:31 
AnswerRe: UpdateData giving run time error Pin
Gary R. Wheeler6-Sep-08 1:24
Gary R. Wheeler6-Sep-08 1:24 
GeneralRe: UpdateData giving run time error Pin
Dhiraj kumar Saini6-Sep-08 1:33
Dhiraj kumar Saini6-Sep-08 1:33 
GeneralRe: UpdateData giving run time error Pin
Gary R. Wheeler6-Sep-08 2:11
Gary R. Wheeler6-Sep-08 2:11 
GeneralRe: UpdateData giving run time error Pin
Dhiraj kumar Saini6-Sep-08 3:00
Dhiraj kumar Saini6-Sep-08 3:00 
GeneralRe: UpdateData giving run time error Pin
David Crow8-Sep-08 4:16
David Crow8-Sep-08 4:16 
AnswerRe: UpdateData giving run time error Pin
Cedric Moonen6-Sep-08 1:27
Cedric Moonen6-Sep-08 1:27 
QuestionFailed to Create Empty Document [modified] Pin
Sachindra Kumar Shukla5-Sep-08 23:24
Sachindra Kumar Shukla5-Sep-08 23:24 
QuestionCopying a file Pin
programming.student5-Sep-08 21:47
programming.student5-Sep-08 21:47 
AnswerRe: Copying a file Pin
Cedric Moonen5-Sep-08 22:12
Cedric Moonen5-Sep-08 22:12 
AnswerRe: Copying a file Pin
Perspx5-Sep-08 22:45
Perspx5-Sep-08 22:45 
QuestionThreads Problem Pin
Dhiraj kumar Saini5-Sep-08 19:23
Dhiraj kumar Saini5-Sep-08 19:23 
AnswerRe: Threads Problem Pin
Cedric Moonen5-Sep-08 22:09
Cedric Moonen5-Sep-08 22:09 

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.