[wpkg-users] checking for 0xFFFFFFFF on a 64bit machine
Joe Konecny
joe at freakyacres.com
Fri Apr 4 17:39:20 CEST 2014
On 4/4/2014 10:16 AM, Rainer Meier wrote:
> Hello again,
>
> On 04.04.2014 15:26, Rainer Meier wrote:
>> However I did not test this specific case here but you might try to launch
>> wpkg.js within 64-bit csript.exe explicitly.
>
> I just did some more testing and here are the findings.
>
> WSH usually internally works with signed integers. As a result a DWORD value of 0xffffffff is equal to -1. This is
> basically entirely correct. Also the fact that 0xfffffffe correctly resolves to -2.
> However I understand this is not intuitive especially since Windows registry seems not to allow negative DWORD values
> (unsigned integer).
>
> It is possible also in WSH to convert to unsigned integer and I have implemented this change and commited to SVN. You
> might check out the latest commit and you will see that a DWORD value of 0xffffffff reads as 4294967295 now and
> therefore can be compared to 4294967295.
>
> <http://sourceforge.net/p/wpkg/code/HEAD/tree/wpkg/stable/src/main/resources/wpkg/wpkg.js>
>
>
> Note that WPKG cannot properly read 64-bit DWORD values (which I think is not required here) since regRead method on WSH
> does not support 64-bit DWORD values.
>
> br,
> Rainer
Thank you! I'll check it out.
More information about the wpkg-users
mailing list