updated the API declaration to UIntPtr (proxy size_t in C API)