[wpkg-users] checking for 0xFFFFFFFF on a 64bit machine
r.meier at wpkg.org
Fri Apr 4 16:16:56 CEST 2014
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.
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.
More information about the wpkg-users