473,841 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to modify a stationary location binary value in a file?

Hello,
I want to modify an binary value of stationary location in file. For
example, 100h=0F,
i want to change to 100h=FF, how to do?

Thank you very much

May 15 '07 #1
2 1219
On May 15, 3:44 am, "Steven" <g...@163.comwr ote:
Hello,
I want to modify an binary value of stationary location in file. For
example, 100h=0F,
i want to change to 100h=FF, how to do?

Thank you very much
In order to change a value within the file, you must open the file,
seek to the point in the file you want to change, and then write your
changes. Finally, close the file. Be aware that writing to the
middle of the file does not do an "insert". It will overwrite data
that is already there. If the data that you are writing is the same
size as the data being overwritten, then it is ok. If the data being
written is larger or smaller, then you're going to have to use a
temporary file. Look at the classes in the System.IO namespace,
particularly the StreamReader and StreamWriter classes.

Chris

May 15 '07 #2
Thank you very much, successfully done.

"Chris Dunaway" <du******@gmail .com写入消
news:11******** **************@ h2g2000hsg.goog legroups.com...
On May 15, 3:44 am, "Steven" <g...@163.comwr ote:
>Hello,
I want to modify an binary value of stationary location in file. For
example, 100h=0F,
i want to change to 100h=FF, how to do?

Thank you very much

In order to change a value within the file, you must open the file,
seek to the point in the file you want to change, and then write your
changes. Finally, close the file. Be aware that writing to the
middle of the file does not do an "insert". It will overwrite data
that is already there. If the data that you are writing is the same
size as the data being overwritten, then it is ok. If the data being
written is larger or smaller, then you're going to have to use a
temporary file. Look at the classes in the System.IO namespace,
particularly the StreamReader and StreamWriter classes.

Chris
May 16 '07 #3

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

Similar topics

12
4928
by: Venkat | last post by:
Greetings to All, I have the following file and i need to modify it with the contents of an array File1.txt Name Location Points Grade Venkat,Newyork,100,A Jack,LA,12,C
20
2116
by: CoolPint | last post by:
While I was reading about const_cast, I got curious and wanted to know if I could modify a constant variable through a pointer which has been "const_cast"ed. Since the pointer would be pointing to the constant variable and if I changed the value through the pointer, the constant variable should have been modified. Well, that's what I thought until I wrote the following and run it. #include <iostream> using std::cout; using std::endl;
0
1222
by: S.a.S. | last post by:
I'm working on a database that will send an email to a client any time there is a change in application status. I've had no problems with the vb to output to the message body, but I would like Access to change the default stationary to one which is representative of the company. I've searched the 'net and a couple of books but I can find no reference to changing that value. Any ideas?
4
3698
by: knapak | last post by:
Hello I'm a self instructed amateur attempting to read a huge file from disk... so bear with me please... I just learned that reading a file in binary is faster than text. So I wrote the following code that compiles OK. It runs and shows the requested output. However, after execution, it pops one of those windows to send error reports online to the porgram creator. I have managed to find where the error is but can't see what's wrong....
6
2738
by: | last post by:
Hi all, is there a better way to stream binary data stored in a table in sql 2005 to a browser in .net 2.0? Or is the code same as in .net 1.1? We noticed that in certain heavy load scenarios, every now and then the client would timeout and have to re-initiate the request... TIA!
13
1989
by: Marc | last post by:
The first part of the below writes the name and location of all buttons on a from to a text file. The second part reads that information back in and recreates the buttons. My problem is reading the location value back in where I marked ?????????????????????. As it wont accept a string value? Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
7
19244
by: elliotng.ee | last post by:
I have a text file that contains a header 32-bit binary. For example, the text file could be: %%This is the input text %%test.txt Date: Tue Dec 26 14:03:35 2006 00000000000000001111111111111111 11111111111111111111111111111111 00000000000000000000000000000000 11111111111111110000000000000000
7
2554
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hello, I'm using the ToolTip control, but I want it to behave a bit different. I want the toolTip to popup not only once when the control is enter and the mouse is stationary. I want the toolTip to popup every time the mouse is stationary over the control without the mouse leaving and entering the control again. How can I do that? Even by overriding the ToolTip class?
0
1408
colinod
by: colinod | last post by:
Does anyone know if you can send an email from Access using the stationary set in outlook. I have a form that sends the email but it only opens a blank email, it would be great if it opened using our company stationary Here is the code for the send button, it also adds an attachment to the email from info in the database also Private Sub cmdSendMail_Click() 'Provides the Send Mail automation
0
9865
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9708
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10609
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9446
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7851
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7025
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5694
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3140
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.