javascript - Unwrap a UInt64 that is wrapped in a voidptr_t -
in js-ctypes have received windows handle (voidptr_t). in cases handle null, returned me as
var ret = ctypes.voidptr_t(ctypes.uint64('0x0')) i want disclose voidptr_t , ctypes.uint64.compare(ret, ctypes.uint64('0x0')).
right i'm doing funky thing:
if (local_hwnd.tostring().indexof('uint64("0x0")') > -1) { console.log('has no handle 0 local_hwnd.tostring() = ', local_hwnd.tostring()); }
for simple null comparisons:
ptr.isnull() for unwrapping stuff (to uint64):
ctypes.cast(ptr, ctypes.uintptr_t).value javascript firefox-addon jsctypes
No comments:
Post a Comment