Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OK all you VB Gurus :) very low level write
Message
From
06/01/1999 22:12:14
 
 
To
All
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
OK all you VB Gurus :) very low level write
Miscellaneous
Thread ID:
00173400
Message ID:
00173400
Views:
55
I need to write at the byte level in a bin file. I have a file that I need to write some hex values to an executable file at a specific offset. I was hoping the following would work but I get an error 'Bad File Mode'
open "DUMP.BIN" for binary access write as #1
print #1, "0A3E"; x00000024
close #1

would start with:
00000000 0000 0000 0000 0000 0000 0000 0000 0000 
00000010 0000 0000 0000 0000 0000 0000 0000 0000 
00000020 0000 0000 0000 0000 0000 0000 0000 0000 
00000030 0000 0000 0000 0000 0000 0000 0000 0000 

would end with:
00000000 0000 0000 0000 0000 0000 0000 0000 0000 
00000010 0000 0000 0000 0000 0000 0000 0000 0000 
00000020 0000 0000 0A3E 0000 0000 0000 0000 0000 
00000030 0000 0000 0000 0000 0000 0000 0000 0000 
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Next
Reply
Map
View

Click here to load this message in the networking platform