PC Review


Reply
Thread Tools Rate Thread

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

 
 
Steven
Guest
Posts: n/a
 
      15th May 2007
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

 
Reply With Quote
 
 
 
 
Chris Dunaway
Guest
Posts: n/a
 
      15th May 2007
On May 15, 3:44 am, "Steven" <g...@163.com> wrote:
> 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

 
Reply With Quote
 
 
 
 
Steven
Guest
Posts: n/a
 
      16th May 2007
Thank you very much, successfully done.

"Chris Dunaway" <(E-Mail Removed)> 写入消息
news:(E-Mail Removed)...
> On May 15, 3:44 am, "Steven" <g...@163.com> wrote:
>> 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
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I add stationary without setting a default stationary =?Utf-8?B?SVRlYWNoQ29tcHV0ZXI=?= Microsoft Outlook Discussion 4 1st Jul 2006 02:36 AM
How can I add stationary without setting a default stationary =?Utf-8?B?SVRlYWNoQ29tcHV0ZXI=?= Microsoft Outlook Discussion 0 1st Jul 2006 12:04 AM
Can not install new stationary from stationary folder. =?Utf-8?B?Q2xhaXJl?= Microsoft Outlook Discussion 0 3rd Sep 2004 01:25 AM
Is it possible to use business stationary as my email stationary? =?Utf-8?B?U2FyYWg=?= Microsoft Outlook Discussion 1 19th May 2004 11:23 PM
Stationary - how to add file created by artist as stationary Jan Price Microsoft Outlook 1 27th Feb 2004 08:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:06 AM.