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

此問題通常出現在使用不支援AVX的較舊Xeon、Celeron、Pentium或Atom處理器的機器上。
對於不支援AVX的處理器的支援已在IronOCR版本2022.8.7804中新增,請升級到較新的版本。
// 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 下載 6,151,372 | 版本: 2026.7 剛剛發布

