By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,889 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,889 IT Pros & Developers. It's quick & easy.

InternetReadFile stuffing up downloaded files

P: n/a
ree
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();
_____________________-
Jul 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.