IronOCR 中 SEHException 及 AVX 支援的疑難排解
This article was translated from English: Does it need improvement?
Translated
View the article in English
未處理的例外狀況:System.Runtime.InteropServices.SEHException

此問題常見於使用較舊款 Xeon、Celeron、Pentium 或 Atom 處理器且不支援 AVX 的電腦上。
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,888,303 | 版本: 2026.5 just released

