[Moderator's note: Topic moved from Bug Reports.]
[Code1:]
Code: Select all
f(ag){
OutputDebug(ag)
}
DllCall(CallbackCreate(f),'int64',0x0FFFFFFFFFFFFFFF)
In code1, it will output
1152921504606846975 as expected.
[Code2:]
Code: Select all
f(ag){
OutputDebug(ag)
}
DllCall(CallbackCreate(f),'int',0x0FFFFFFFFFFFFFFF)
In code2, it should have output 0xFFFFFFFF, because the high-order part of the number has been truncated due to Integer overflowing. However, it will still output
1152921504606846975. Changing to
'int' has no effect, behaving like
'int64'.
Is there any difference between 'int' and 'int64' in
DllCall()? Is this by design?