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 


@regread error

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


Joined: 27 Feb 2009
Posts: 19

PostPosted: Sat Oct 03, 2009 10:38 pm    Post subject: @regread error Reply with quote

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? Smile
Back to top
View user's profile Send private message
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Wed Oct 07, 2009 11:21 am    Post subject: Re: @regread error Reply with quote

geicsge wrote:
So, the solution:

Code:
%s =@regread(%a,%b,%c)
if @less(%s,0)
    %s =@sum(4294967295,1,%s)
end


Cool? Smile

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports 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