Hello,
I use a little piece of code in Visual C++. It works perfect.
I bring the same piece of code in C# and I get strange char.
It seams to be an encoding problem (the server is 1and1). When I try to save the string with the Win bloc note, he say the text is Unicode. So how can I go from Unicode to ASCII? Thanks a lot for your interest.
Nicolas.
Code extract :
hInternetSession = InternetOpen("VA", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
hInternetUrl = InternetOpenUrl(hInternetSession, (LPCSTR)txt, NULL, 0, 0 , 0);
InternetReadFile(hInternetUrl, (LPVOID)szTemp,126, &dwRead);
HttpQueryInfo((HINTERNET)HTTP_QUERY_RAW_HEADERS,(DWORD)szTemp, &dwRead, 0, NULL);
InternetCloseHandle(hInternetUrl);
InternetCloseHandle(hInternetSession);