| Topic: |
DEVELOP > c-Plus-Plus |
| User: |
"ree" |
| Date: |
19 Nov 2003 06:33:53 AM |
| Object: |
InternetReadFile stuffing up downloaded files |
When I download the files using InternetReadFile, they seem to lose the
formating all the spaces gets removed, and thus I can't open the file.
Here is the file (it a doc fie)
________
ÐÏࡱá
þÿ
¼
___________
Using InternetReadFile it makes the file like this..
___________
ÐÏࡱáapplied to subsequent systems, and is crucial to a software
organization's business strategy.
The Software A...
_____
it removing so much of the formatting
I am saving the internet files like this
____________-
std::string m_strContents1sdp;
if ( hFile2 )
{
CHAR buffersdp1[1024];
DWORD dwReadsdp1;
while ( InternetReadFile( hFile2, buffersdp1, 1023,
&dwReadsdp1 ) )\
{
if ( dwReadsdp1 == 0 )
break;
buffersdp1[dwReadsdp1] = 0;
m_strContents1sdp += buffersdp1;
}
InternetCloseHandle( hFile2 );
}
//outsdp.open(filename.c_str(), ios::out | ios::binary);
outsdp.open(filename.c_str());
outsdp << m_strContents1sdp << endl;
outsdp.close();
_____________________-
.
|
|
| User: "Thomas Matthews" |
|
| Title: Re: InternetReadFile stuffing up downloaded files |
19 Nov 2003 09:57:38 AM |
|
|
ree wrote:
When I download the files using InternetReadFile, they seem to lose the
formating all the spaces gets removed, and thus I can't open the file.
You need to ask in platform specific newsgroup. The C++ standard
language, which is discussed in this newsgroup, does not have any
function named InternetReadFile(). See the FAQ and Welcome.txt
links below for more appropriate newsgroups.
--
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
.
|
|
|
|

|
Related Articles |
|
|