use GetDelegateForFunctionPointer instead of NativeCall