hex pairs and reg_binary

G

Guest

Hi all,

I understand hexadecimal, binary and decimal and how to convert them to
eachother. I also understand the hex numbers in webdesign.

When using regedit in windows xp, you can see two different hex numbers in
two different formats. For example you can see a 0x###### as a value for a
DWORD and you can see hex pairs like ## ## ## ## ,which the pairs are
seperated by a space, as a value for a reg_bianry .

Now I would like to know what is the difference between two different
formats of those hex numbers and why they are seperated by a space in the
second one (is this just to emphasize the bytes?) and how you convert them to
eachother?

Or basically how you interpret the one with the hex pairs?

What I am trying to accomplish is to understand how tweakui changes a
reg_binary value which is in hex pairs and do it myself directly.


Any comments would be apprecaited.
 
W

Wesley Vogel

REG_BINARY
Raw binary data. Most hardware component information is stored as binary
data and is displayed in Registry Editor in hexadecimal format.

REG_DWORD
Data represented by a number that is 4 bytes long. Many parameters for
device drivers and services are this type and are displayed in Registry
Editor in binary, hexadecimal, or decimal format.

Digit grouping aids in readability. Spaces are used to group hexadecimal
numbers.

hex:80,26,c3,63,74,ec,c5,01 = 80 26 c3 63 74 ec c5 01

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
G

Guest

Thanks alot for your message Wesley. O.K if I have a reg_binary data like :
9e 3e 07 80 , how I can convert it to a 0x###### format. Is it gonna be
0x80073e9e since windows use little-endian architecture for storing a dword
value in hex? am i right?

and If a reg_binary value is 9e 3e 07 80 , tweakui makes the changes by
altering either of the two most left bytes, 9e or 3e. You will notice this,
if you are in General section of tweakui and working with HKCU/control
panel/Desktop/UserPreferencesMask.
I would like to know what do the two most right bytes (07 and 80 for
example) in UserpreferencesMask mean and why tweakui doesnot change them?

Also I believe, to apply a reg_binary data which is for example "Bit 0x0008"
I need to reverse it and apply it to the two most left bytes of the hex
pairs. Am I right? if yes could you explain why?
 
W

Wesley Vogel

[[TIP
UserPreferencesMask is an example of a REG_DWORD value disguised as a
REG_BINARY value. When you see a 32-bit binary value, chances are, it's
really a double-word value. In that case, you can safely replace the value
with a REG_DWORD. Don't forget that Windows XP uses the little-endian
architecture, though, so it stores double-word values in reverse-byte order.
In other words, you replace the REG_BINARY value 0x04 0x03 0x02 0x01 with
the REG_DWORD 0x01020304. See Chapter 1, "Learning the Basics," for a
refresher on little-endian architecture and bitwise math.]]

From...
Microsoft® Windows® XP Registry Guide
Chapter 5: Mapping Tweak UI
http://www.microsoft.com/mspress/books/sampchap/6232.asp

If you do not have the book, click the link.

Also see this...
General
Table 5-1 Values in General
http://www.microsoft.com/mspress/books/sampchap/6232.asp#100

Chapter 5 is TweakUI Registry Settings. Everything you wanted to know.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top