IronOCR 中 SEHException 和 AVX 支持故障排除
This article was translated from English: Does it need improvement?
TranslatedView the article in English
未处理的异常:System.Runtime.InteropServices.SEHException

使用缺乏 AVX 支持的旧款 Xeon、Celeron、Pentium 或 Atom 处理器的机器经常会遇到这个问题。
IronOCR 版本2022.8.7804添加了对非 AVX 处理器的支持,请升级到更高版本。
// Example: Checking AVX support programmatically in C#
using System;
class ProcessorFeatures
{
// Main method to check AVX support
static void Main()
{
// Check if the machine's processor supports AVX
if (IsAvxSupported())
{
Console.WriteLine("AVX is supported.");
}
else
{
Console.WriteLine("AVX is not supported. Consider updating IronOcr to the latest version that supports non-AVX processors.");
}
}
// Function to determine if AVX is supported
static bool IsAvxSupported()
{
return System.Runtime.Intrinsics.X86.Avx.IsSupported;
}
}// Example: Checking AVX support programmatically in C#
using System;
class ProcessorFeatures
{
// Main method to check AVX support
static void Main()
{
// Check if the machine's processor supports AVX
if (IsAvxSupported())
{
Console.WriteLine("AVX is supported.");
}
else
{
Console.WriteLine("AVX is not supported. Consider updating IronOcr to the latest version that supports non-AVX processors.");
}
}
// Function to determine if AVX is supported
static bool IsAvxSupported()
{
return System.Runtime.Intrinsics.X86.Avx.IsSupported;
}
}' Example: Checking AVX support programmatically in C#
Imports System
Friend Class ProcessorFeatures
' Main method to check AVX support
Shared Sub Main()
' Check if the machine's processor supports AVX
If IsAvxSupported() Then
Console.WriteLine("AVX is supported.")
Else
Console.WriteLine("AVX is not supported. Consider updating IronOcr to the latest version that supports non-AVX processors.")
End If
End Sub
' Function to determine if AVX is supported
Private Shared Function IsAvxSupported() As Boolean
Return System.Runtime.Intrinsics.X86.Avx.IsSupported
End Function
End Class$vbLabelText $csharpLabel
在本示例代码中,我们使用System.Runtime.Intrinsics.X86.Avx.IsSupported属性来确定处理器是否支持 AVX 指令。 如果不支持 AVX,建议确保使用的 IronOcr 版本支持非 AVX 处理器。
准备开始了吗?
Nuget 下载 5,246,844 | 版本: 2025.12 刚刚发布






