By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!Hmmm. It's not a result code in the sense that it's the return value of a function; the API's return type is void. It's just something the function puts in buf. What TCC is displaying is, in fact, the actual FILETIME now divided by 2**32.No - result codes (in TCC and CMD) are 32-bit.
v:\> echo %@winapi[kernel32.dll,GetSystemTimePreciseAsFileTime,foo]
30896234
::agenow.btm
setdos /x-5678
set result=%@word[0-7,%@ascii[%@winapi[kernel32.dll,GetSystemTimePreciseAsFileTime,abuffer]]]
setdos /x+5678
set age=0
do i=0 to 7
set age=%@eval[%age + (%@word[%i,%result] SHL (8*%i))]
enddo
echo %age
::agenow2.btm
setdos /x-5678
set result=%@word[0-3,%@ascii[%@winapi[kernel32.dll,GetSystemTimePreciseAsFileTime,buffer]]]
setdos /x+5678
set age=0
do i=0 to 3
set age=%@eval[%age + (%@word[%i,%result] SHL (16*%i))]
enddo
echo %age
v:\> echo %@makeage[%_utcdate %_utctime] & echo %_agenow & agenow.btm & agenow2.btm
132698327840000000
132698327841220836
132698327841238357
132698327841303037