View previous topic :: View next topic |
Author |
Message |
geicsge Newbie
Joined: 27 Feb 2009 Posts: 19
|
Posted: Sat Oct 03, 2009 10:38 pm Post subject: @regread error |
|
|
A real example:
Code: | info @regtype(HLM,SOFTWARE\Classes\CLSID\{0AFACED1-E828-11D1-9187-B532F1E9575D}\ShellFolder,CallForAttributes) |
is INTEGER, ok...
Code: | info @regread(HLM,SOFTWARE\Classes\CLSID\{0AFACED1-E828-11D1-9187-B532F1E9575D}\ShellFolder,CallForAttributes) |
returns -268435456
it is INCORECT -> It must return 4026531840 -> F0000000
Integers larger than 2G become negative (a Delphi/VDS issue).
A "SOFTWARE" SOLUTION FOR THE INTEGER VALUES RETURNED BY @REGREAD() FUNCTION:
FFFFFFFF = 4294967295 = @sum($FFFFFFFF) -> @regread() = -1 !
FFFFFFFE = 4294967294 = @sum($FFFFFFFE) -> @regread() = -2 !
.................................................................................................
So, the solution:
Code: | %s =@regread(%a,%b,%c)
if @less(%s,0)
%s =@sum(4294967295,1,%s)
end |
Cool? |
|
Back to top |
|
|
DaveR Valued Contributor
Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Wed Oct 07, 2009 11:21 am Post subject: Re: @regread error |
|
|
geicsge wrote: | So, the solution:
Code: | %s =@regread(%a,%b,%c)
if @less(%s,0)
%s =@sum(4294967295,1,%s)
end |
Cool? |
Yes, and no. It only works if the integer, or file size, is between 2147483648 and 4294967295. There's no way to tell if the integer is supposed to be larger than 4294967295, so no way to know if you need to add 4294967295 or 6442450944, or 8589934590 etc. _________________ cheers
Dave |
|
Back to top |
|
|
|
|
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
|
|