473,396 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

InternetReadFile stuffing up downloaded files

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
1 6334
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Joshua | last post by:
Is there a way to set up Apache to invoke a PHP equest when a file (a image for example) is downloaded? Say, then, that http://www.foo.com/downloads/app1.zip is downloaded, Id like to have...
0
by: Chad | last post by:
I have COM component embedded on html page. It has version 1.0.0.1 (by default). I have converted it in cab file. Code of html is something like: <HTML><HEAD></HEAD><BODY><OBJECT...
1
by: Ruskin | last post by:
I have a wee issue, where I have two different web sites; http://dev/home.htm http://live/home.htm On both sites, there is a custom OCX file being used. However, it may be a different version...
2
by: kelly_sellers | last post by:
I teach Access online, which means I'm constantly downloading databases from the Internet in order to grade and/or troubleshoot them: 54 database files per week, minimum. I'm running Windows XP,...
4
by: sarath1111 | last post by:
hi, I have to perform BIT STUFFING in C Language. I have to get data from the user and stuff the data and then transmit it. I have to destuff it at the other end. I have very less knowledge of...
3
by: Cheri Reed | last post by:
Hello, I've looked through several newsgroups and have yet to find help with this problem. We have a device we can access through IE, using a URL, that returns an XML string. For example,...
1
by: marfi95 | last post by:
Is there a way to make the internetreadfile function read records that are terminated by newlines instead of reading into a buffer. It would make it much easier for me to process. I suppose I...
1
by: =?Utf-8?B?UnVzc2VsbA==?= | last post by:
Some sage tech told me, in an online discussion on how to keep my computer clean and working smoothly, that it was ok to delete all of the "downloaded program files" that reside in that internet...
0
by: beary | last post by:
I need some advice re permissions etc. Here's the situation: at my workplace, I have a website which sits in a folder created by the IT manager, and given certain permissions (I'm not even yet sure...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.