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 


QWORD

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


Joined: 27 Feb 2009
Posts: 19

PostPosted: Mon Oct 05, 2009 10:53 am    Post subject: QWORD Reply with quote

How to convert a QWORD entry from a REG file in the @regread() format:

%s =@regread(HCU,Control Panel\Appearance\New Schemes\0\Sizes\0,Size #5)

returns 15

In the REG file we have:

"Size #5"=hex(b):0f,00,00,00,00,00,00,00

Code:

%a ="0f,00,00,00,00,00,00,00"
# Remove ,
%a =@strrep(%a,",",,EXACT,ALL)
# Reverse
%a =@substr(%a,15,16)@substr(%a,13,14)@substr(%a,11,12)@substr(%a,9,10)@substr(%a,7,8)@substr(%a,5,6)@substr(%a,3,4)@substr(%a,1,2)
# HEX to DEC
%a =@sum($%a)


%a =15 now...
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 Oct 08, 2009 12:36 am    Post subject: Reply with quote

In the reg it should read "0x0000000f"

I forget why its "Size #5"=hex(b):0f,00,00,00,00,00,00,00 in an exported reg file.

the decimal equivalent is "15"

Code:
%a = @hex(15,8)
%b = @sum($%a)
info %a@cr()%b
exit


What exactly are you looking for or trying to do???
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: Mon Oct 26, 2009 12:41 pm    Post subject: Reply with quote

It has to do with endianness. Windows is Little-Endian however we (humanoid life forms) read values in big endian. Here is a link to MSDN for registry data types http://msdn.microsoft.com/en-us/library/bb773476%28VS.85%29.aspx
_________________
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
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