Page 1 of 1 1
Topic Options
#207730 - 2013-09-13 12:35 PM Formula to convert Decimal Double to QWORD
MACE Offline
Starting to like KiXtart

Registered: 2004-09-07
Posts: 150
Loc: Manchester UK
Having determined a large decimal double I need to convert it into a QWORD to write into the registry and I keep getting a DWORD, anyone know the correct formula to break this up appropriately ?

Edited by MACE (2013-09-13 04:06 PM)

Top
#207751 - 2013-09-17 07:47 AM Re: Formula to convert Decimal Double to QWORD [Re: MACE]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
I don't think KiXtart can handle that value period. There was some UDF or Script I thought I saw where someone does try to do something to trick KiX into it but not sure where that was, maybe someone else knows.

QWORD Value REG_QWORD
Data represented by a number that is a 64-bit integer. This data is displayed in Registry Editor as a Binary Value and was introduced in Windows 2000.

Not sure if these values are correct but they are listed on the Windows 7 forum.


REG_DWORD - 32-bit number

The range of integer values that can be stored in 32 bits is 0 through 4,294,967,295. Hence, a processor with 32-bit memory addresses can directly access 4 GB of byte-addressable memory.


REG_QWORD - 64-bit number

A 64-bit register can store 2^64 (2 to 64th power) = 18,446,744,073,709,551,616 different values.

Top
#207754 - 2013-09-17 11:02 AM Re: Formula to convert Decimal Double to QWORD [Re: NTDOC]
MACE Offline
Starting to like KiXtart

Registered: 2004-09-07
Posts: 150
Loc: Manchester UK
I know when it gets to that level you get 0 returned if actually doing the maths so I was thinking as its already a double it may be possible to treat it somewhat like a string manipulation in that we want 8 bytes represented as hex, but the registry display in hex qword in not what I would have expected but is correct as dec. As Win 7 x64 regedit can flick between both values at will it makes the formula possible but difficult in x32.
FSO returns disk sizes in bytes which is great but I need to store them as QWords.
In a Reg file however "TotalSize"=hex(b):00,30,88,4c,af,02,00,00 = 2951926525952 which is represented as 8 distinct bytes.
This type of math is not my strength so I am reading whatever I can but its slow going.

Top
#207769 - 2013-09-18 07:31 AM Re: Formula to convert Decimal Double to QWORD [Re: MACE]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Hopefully the current situation workwise will loosen a bit tense soon ...
If I dont find any replies on this then I'll try to come up with something.

in the end they are all 0s and 1s or states on a circuit or what ever you like to abstract those big numbers ;\)


Edited by Jochen (2013-09-18 07:33 AM)
_________________________



Top
#207778 - 2013-09-18 06:51 PM Re: Formula to convert Decimal Double to QWORD [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I guess this part never got implemented in kix.net yet :P

ok, you have the option of reg.exe.
it will involve files on reading or wshpipe() but this way you can get it working.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.054 seconds in which 0.022 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org