473,378 Members | 1,523 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,378 software developers and data experts.

Extract/Include bites in binary file

Hi.

How I can Include or Extract bites in a binary file??
I'm tring to use a fopen method, but without success.

Do you have any idea???

Thanks!!!

Oct 7 '05 #1
5 1780
The better way to say: Include or Remove bytes in a binary file...
What functions I need to use, and how to implementing?

Thanks!!

Oct 7 '05 #2
Senger wrote:
How I can Include or Extract bites in a binary file??
I'm tring to use a fopen method, but without success.

Do you have any idea???


Your question is addressed in the FAQ 5.8. Please take a read.

V
Oct 7 '05 #3
Senger wrote:

The better way to say: Include or Remove bytes in a binary file...
What functions I need to use, and how to implementing?

Thanks!!


open the file for reading
open a second file for writing

while( ...
read from the first file
decide if you need some modifications on what you read
write the new content to the file
}

close both files
delete the first file
rename the second file to have the name of the first file

done!
--
Karl Heinz Buchegger
kb******@gascad.at
Oct 7 '05 #4
Senger wrote:
The better way to say: Include or Remove bytes in a binary file...
What functions I need to use, and how to implementing?


'fopen', 'fread', 'fwrite', 'fclose'. As to how, read the books.
They explain it all much better than anybody can in a newsgroup post.
Oct 7 '05 #5
Thanks for all.

I''ll try to do!!!

Oct 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Logical | last post by:
I wanted to do: include('page.htm?id=12&foo=bar'); But since I can't (and don't want to make another seperate HTTP request with include('http://...')); I was wondering if there's a function...
7
by: flamesrock | last post by:
Hi, As a newbie to the language, I have no idea where to start..please bare with me.. The simcity 4 savegame file has a png image stored at the hex location 0x80. What I want to extract it...
7
by: William Payne | last post by:
Hello, I have a variable of type unsigned long. It has a number of bits set (with set I mean they equal one). I need to determine those bits and their position and create new numbers from them. For...
7
by: SunRise | last post by:
Hi I am creating a C Program , to extract only-Printable-characters from a file ( any type of file) and display them. OS: Windows-XP Ple help me to fix the Errors & Warnings and explain...
8
by: nick | last post by:
Hi all can any one please tell me what is wrong in this code?? I'm new to deal with text files and extract data. i'm trying to look for data in a text file (3~4 pages) some lines start with a...
1
by: Chris | last post by:
If this is not the right place to post, please someone direct me to the correct place. I'm having problems extracting the binary data that's included in an xml response back from a server. It's...
2
by: Fabian Braennstroem | last post by:
Hi, I would like to delete a region on a log file which has this kind of structure: #------flutest------------------------------------------------------------ 498 1.0086e-03 2.4608e-04...
7
by: JoeC | last post by:
I am trying to create a windows program that reads binary graphics as a resource. This has nothing to do with win32 but conversion of data with memcpy. graphic::graphic(UINT uiResID, HINSTANCE...
6
by: BlackLibrary | last post by:
The title probably tells it all. I'm a VB6 going to C# and trying to take a task I can do easily in VB6 and do it in C#.NET. I can really use some help and any pointers you can share. Below is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.