Miguel,
Thanks for the response. In answer to your questions:
It is a file. However, you might remember that I sent a note about a week
ago explaining that I am the boot ATAPI driver, replacing atapi.sys, and
asking how to open a file using ZwCreateFile from my DriverEntry routine
when the FS is waiting for *me* to finish initializing, so it can then
initialize itself with the FS on the disk which resides on my controller.
The consensus, along with some private response from the WinDBG guys, is
that it can’t be done, and the next best thing is to use the registry.
MSVC6 allows you to *select* the HEX codes, but actually *copies* the ascii
equivalent. If you open a binary file, say %SystemRoot%\Notepad.exe (That’s
C:\WINNT\Notepad.exe on my Win2K SP1 system), as a binary file, you see the
1st 16 bytes:
4D 5A 90 00 03 00 00 00 04 00 00 00 FF FF 00 00
if you highlight those 32 hex digits, then copy them, then paste them to an
ordinary text editor, you get:
MZ???
which is the ASCII equivalent of those 16 bytes. The hex editor is not
copying the hex digits, it’s copying the ascii text represented by the
values in those bytes. If you open the file in Notepad, or Wordpad, or any
other basic text editor, you don’t even see the hex representation, you see
the ASCII representation of the bytes. If you don’t need to see the zeros,
it’s fine, but if you need to actually see where zero bytes are, among other
things, you need to see the hex, not the ASCII equivalent. And if you want
to paste it into a hex entry field, you can’t have anything except 0-9, and
A-F or a-f.
Finney Patterson suggested HexWorkshop, and I am downloading that as I
write.
I suppose I might have sounded a bit frustrated in the original post, but I
am not stressed. About this. Yet.
Thanks,
Phil
-----Original Message-----
From: Miguel Monteiro [mailto:xxxxx@criticalsoftware.com]
Sent: Tuesday, April 17, 2001 1:38 AM
To: NT Developers Interest List
Subject: [ntdev] Re: Hex editor that copies HEX to clipboard?
Hi, Phil.
I admit I don’t fully understand your problem:
-If the image is already binary, I see no reason not to use it as
a binary file; so, I assume your problem must be the file is too
large to be manipulated at once;
-Yet, you could open it in MSVC6 as a binary and select the
hex you want/need (as you did), then paste it on new binary
file(s), sized as you want/need;
-It may sound stupid, but you may paste things to good’old
NOTEPAD (you may also select hex codes in MSVC6,
paste to Notepad, then save the file as - say - xpto.bin, and
you’ll get your binary file…) and, from it, selecting again and
pasting to wherever you want to… On Win2K, I once tried
opening a 30Mb binary file with Notepad (actually, a crash
dump file) - it works, believe it or not (gone are the days of
Win3.x when Notepad was a 64Kb limited tool…).
-But perhaps what you need is a simple tool (do it yourself
or find one, there are probably plenty on the Net) to convert
that hex to binary…
Finally… you should seriously consider taking a couple of days
off and dis-stress yourself… (just kidding!) :)))
?Humour and love are God’s answers
to Human weaknesses?
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com