diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.shared.cs b/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.shared.cs index c35c5f9111..b21d036f61 100644 --- a/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.shared.cs +++ b/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.shared.cs @@ -1060,6 +1060,7 @@ namespace Microsoft.ML.OnnxRuntime } } + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void OrtCallbackDelegate(IntPtr userData, IntPtr[] outputs, uint numOutputs, IntPtr status); private static OrtCallbackDelegate ortCallback = new OrtCallbackDelegate(OrtCallback);