Click here to Skip to main content
15,916,398 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: How to use timeSetEvent in C++/CLI Pin
guestcat2-May-06 2:03
guestcat2-May-06 2:03 
GeneralRe: How to use timeSetEvent in C++/CLI Pin
attias gabi4-May-06 1:26
attias gabi4-May-06 1:26 
GeneralRe: How to use timeSetEvent in C++/CLI Pin
oshah13-May-06 11:31
oshah13-May-06 11:31 
QuestionGetCurrentDirectory() Pin
rahultaing30-Apr-06 14:11
rahultaing30-Apr-06 14:11 
AnswerRe: GetCurrentDirectory() Pin
Milton Karimbekallil30-Apr-06 18:52
Milton Karimbekallil30-Apr-06 18:52 
GeneralRe: GetCurrentDirectory() Pin
Milton Karimbekallil5-May-06 13:28
Milton Karimbekallil5-May-06 13:28 
QuestionGame Programming Pin
Akidomero29-Apr-06 20:07
Akidomero29-Apr-06 20:07 
QuestionHTTP: Pin
Anthony Moss28-Apr-06 5:45
Anthony Moss28-Apr-06 5:45 
I am trying to use http: to retrieve a web site in html into a buffer in memory.
My code is as follows:


int Socket = clientSock(url.c_str(), 80);
if (send(Socket, (char*)str.c_str(), str.size(), 0) == SOCKET_ERROR)
{
//throw an error exception
}



Sleep(1000);

char buf[500];
int sizeOfBuf = sizeof(buf);
int bytes_read = 0;
int total_bytes_read = 0;
do
{
bytes_read = recv(Socket, buf, sizeOfBuf, 0);
myStrBuffer += RCString(buf);
total_bytes_read+=bytes_read;
memset(buf, 0, sizeof(buf));
}
while (bytes_read != 0);

where url is the host (ie "www.bbc.co.uk")
page is the relative url (ie "/sport/football")

However I cannot rerieve the information required... what i actually get is
"HTTP/1.1 400 Bad Request".
can anyone help me as to why this is happening as well as how to fix it.


Also i need to retrieve a web site with parameters
''[^]'

where 'epp.eurostat.cec.eu.int' is the host and '/portal/page' is the relative url. and everything else is a parameter list and i am unsure of how to do this.
any help would be greatly appreciated
cheers



anthony
AnswerRe: HTTP: Pin
led mike4-May-06 12:26
led mike4-May-06 12:26 
QuestionHow to call unmanaged C++ DLL method with a CString reference Pin
Bo Skjoett27-Apr-06 23:02
Bo Skjoett27-Apr-06 23:02 
AnswerRe: How to call unmanaged C++ DLL method with a CString reference Pin
Milton Karimbekallil28-Apr-06 2:01
Milton Karimbekallil28-Apr-06 2:01 
Questionadding dll Pin
rahultaing25-Apr-06 13:41
rahultaing25-Apr-06 13:41 
AnswerRe: adding dll Pin
2bee 25-Apr-06 23:50
2bee 25-Apr-06 23:50 
GeneralRe: adding dll Pin
George L. Jackson26-Apr-06 9:00
George L. Jackson26-Apr-06 9:00 
Questionspeed data access in server Pin
sabitasamal24-Apr-06 20:40
sabitasamal24-Apr-06 20:40 
Questioni have problems Pin
sieucauthu23-Apr-06 19:12
sieucauthu23-Apr-06 19:12 
AnswerRe: i have problems Pin
Steve Pullan23-Apr-06 19:29
Steve Pullan23-Apr-06 19:29 
GeneralRe: i have problems Pin
sieucauthu23-Apr-06 19:49
sieucauthu23-Apr-06 19:49 
QuestionUsing serial ports in vs on xp Pin
McFly55523-Apr-06 10:37
McFly55523-Apr-06 10:37 
AnswerRe: Using serial ports in vs on xp Pin
2bee 23-Apr-06 11:34
2bee 23-Apr-06 11:34 
GeneralRe: Using serial ports in vs on xp Pin
McFly55524-Apr-06 14:52
McFly55524-Apr-06 14:52 
GeneralRe: Using serial ports in vs on xp Pin
2bee 24-Apr-06 20:30
2bee 24-Apr-06 20:30 
GeneralRe: Using serial ports in vs on xp Pin
TheCat00722-Jun-06 18:16
TheCat00722-Jun-06 18:16 
QuestionCan anyone tell me why am i getting these errors? Pin
rahultaing22-Apr-06 22:45
rahultaing22-Apr-06 22:45 
AnswerRe: Can anyone tell me why am i getting these errors? Pin
George L. Jackson23-Apr-06 1:48
George L. Jackson23-Apr-06 1:48 

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.