Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ DLL compiled under VS 2005 does not work for program compiled under VS 2010 Pin
Vilasrk126-Apr-10 4:02
Vilasrk126-Apr-10 4:02 
Questionvector<>.front docs Confusion Pin
Peter Camilleri23-Apr-10 9:18
Peter Camilleri23-Apr-10 9:18 
AnswerRe: vector.front docs Confusion (edited) Pin
Maximilien23-Apr-10 9:34
Maximilien23-Apr-10 9:34 
GeneralRe: vector.front docs Confusion (edited) Pin
Maximilien23-Apr-10 9:37
Maximilien23-Apr-10 9:37 
GeneralRe: vector.front docs Confusion (edited) Pin
Peter Camilleri23-Apr-10 9:39
Peter Camilleri23-Apr-10 9:39 
GeneralRe: vector.front docs Confusion (edited) Pin
Peter Camilleri23-Apr-10 9:48
Peter Camilleri23-Apr-10 9:48 
AnswerRe: vector.front docs Confusion Pin
CPallini23-Apr-10 9:47
mveCPallini23-Apr-10 9:47 
QuestionHTTP1.1 / HTTP1.0 WinSock2 Pin
Fareed Rizkalla23-Apr-10 8:45
Fareed Rizkalla23-Apr-10 8:45 
If I attempt to download http://www.codeproject.com/App_Themes/Std/Img/logo225x90.gif
It returns bad request with the code used below.

Download->HostFileLocation has /App_Themes/Std/Img/logo225x90.gif in UNICODE format stored in it.

#define DEFAULT_BUFLEN 512

char HTTPrequest[DEFAULT_BUFLEN];

char *HostFileLocation = new char[wcslen(Download->HostFileLocation)+1];
wcstombs(HostFileLocation, Download->HostFileLocation, wcslen(Download->HostFileLocation)+1);
					
char *Host = "www.codeproject.com";
char *UserAgent = "MyPrivateDownloader b86";

sprintf(HTTPrequest,"GET %s HTTP/1.1\r\nHost: %s\r\nUser Agent: %s\r\nAccept: */*\r\nAccept-Encoding:\r\n\r\n", HostFileLocation, Host, UserAgent);
send(IPv4,HTTPrequest,strlen(HTTPrequest),0);


However if I use. HTTP/1.0

sprintf(HTTPrequest,"GET %s", HostFileLocation);
send(IPv4,HTTPrequest,strlen(HTTPrequest),0);


Everything goes smoothly. Confused | :confused:
I appreciate any help I can get on this matter.
AnswerRe: HTTP1.1 / HTTP1.0 WinSock2 Pin
Moak23-Apr-10 10:01
Moak23-Apr-10 10:01 
GeneralRe: HTTP1.1 / HTTP1.0 WinSock2 Pin
Fareed Rizkalla23-Apr-10 10:50
Fareed Rizkalla23-Apr-10 10:50 
GeneralRe: HTTP1.1 / HTTP1.0 WinSock2 Pin
Moak23-Apr-10 21:53
Moak23-Apr-10 21:53 
GeneralRe: HTTP1.1 / HTTP1.0 WinSock2 Pin
Fareed Rizkalla24-Apr-10 8:12
Fareed Rizkalla24-Apr-10 8:12 
GeneralRe: HTTP1.1 / HTTP1.0 WinSock2 Pin
Moak24-Apr-10 8:36
Moak24-Apr-10 8:36 
Questionchange the checked state of CMFCRibbonCheckBox object Pin
m_code23-Apr-10 8:25
m_code23-Apr-10 8:25 
QuestionHow to get an Application Instance Number? Pin
Software200723-Apr-10 8:12
Software200723-Apr-10 8:12 
AnswerRe: How to get an Application Instance Number? Pin
«_Superman_»23-Apr-10 8:37
professional«_Superman_»23-Apr-10 8:37 
GeneralRe: How to get an Application Instance Number? Pin
Software200723-Apr-10 8:43
Software200723-Apr-10 8:43 
AnswerRe: How to get an Application Instance Number? Pin
mesajflaviu23-Apr-10 8:45
mesajflaviu23-Apr-10 8:45 
QuestionRe: How to get an Application Instance Number? Pin
Maximilien23-Apr-10 9:07
Maximilien23-Apr-10 9:07 
GeneralRe: How to get an Application Instance Number? Pin
Software200723-Apr-10 9:10
Software200723-Apr-10 9:10 
AnswerRe: How to get an Application Instance Number? Pin
Maximilien23-Apr-10 9:16
Maximilien23-Apr-10 9:16 
GeneralRe: How to get an Application Instance Number? Pin
Software200723-Apr-10 9:35
Software200723-Apr-10 9:35 
AnswerRe: How to get an Application Instance Number? Pin
LloydA11123-Apr-10 15:09
LloydA11123-Apr-10 15:09 
QuestionHeap Error Pin
ashwath197923-Apr-10 2:23
ashwath197923-Apr-10 2:23 
AnswerRe: Heap Error Pin
CPallini23-Apr-10 2:33
mveCPallini23-Apr-10 2:33 

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.