move to using NativeLong instead of long so that this will work on both 32 and 64 bit machines
move to using NativeLong instead of long so that this will work on both 32 and 64 bit machines