forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Registry binary data to text?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Thu Apr 23, 2009 5:52 pm    Post subject: Registry binary data to text? Reply with quote

I know I knew how to do this before, but for the life of me I can't remember how to read a binary registry entry and convert it to text.

All I'm trying to find out is what the menu font is:

@regread(CURUSER,Control Panel\Desktop\WindowMetrics,MenuFont)

But it's a binary entry and I just can't remember how to convert the binary data back into a text format Sad

Can someone help an old burnt out mind?

Thanks,
~Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Thu Apr 23, 2009 9:46 pm    Post subject: Reply with quote

You would use @val() to read from binary but @regread() returns the decimal equivalent so @val() won't work.

Quote:
BINARY values are returned as a string of decimal numbers, one per byte, separated using the current field separator character.

You could apply @chr() to each decimal value.

-OR-

If you could convert it back to BINARY, you could then use @val()
Back to top
View user's profile Send private message Send e-mail
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Sat Apr 25, 2009 12:07 am    Post subject: Reply with quote

Were you thinking of @expand()?

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sat Apr 25, 2009 12:36 am    Post subject: Reply with quote

Garrett,
Here is a link to a post that Serge posted a long time ago that might help http://www.vdsworld.com/forum/viewtopic.php?t=323&highlight=regread

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sat Apr 25, 2009 12:37 am    Post subject: Reply with quote

He is trying to read type REG_BINARY (At least for the key he said he was trying to read)

@expand() is for type REG_EXPAND_SZ


BTW - There might an API call that will get the Binary value directly then use @val() to convert it.
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sat Apr 25, 2009 1:57 am    Post subject: Reply with quote

Garrett,
Is there any reason why you don't use GadgetX for this? It has built in functions to grab WindowMetrics. All you need is @GetWin(SysFont,Menu)

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sat Apr 25, 2009 3:52 am    Post subject: Reply with quote

dragonsphere wrote:
Garrett,
Is there any reason why you don't use GadgetX for this? It has built in functions to grab WindowMetrics. All you need is @GetWin(SysFont,Menu)


Ummm.... yeah? *tries not to look stupid* Cuz I lost all my stuff for it a while ago and kept forgetting to ask for the reg info again O.o Rolling Eyes

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group