READING hex value in registry

J

James

i've a DWORD hex value in the registry key.

i can read the key and write to event log, however it writes in "decimal"
format.

how can i ensure it is read as per hex format ?
 
A

Armin Zingler

James said:
i've a DWORD hex value in the registry key.

A DWORD has a value, but it does not have a format, so it's neither Hex nor
decimal. Strings do have a format.
i can read the key and write to event log, however it writes in
"decimal" format.

value.ToString("X8")

converts to a string in hex format.
how can i ensure it is read as per hex format ?

The value is read. The value has no format.


Armin
 
K

Ken Tucker [MVP]

James,

The integers.tostring("x") will convert the number to hexidecimal

Ken
 

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