IronOCR中 SEHException 和 AVX 支援故障排除

This article was translated from English: Does it need improvement?
Translated
View the article in English

未處理的例外:System.Runtime.InteropServices.SEHException

File G7IUWBgksH related to IronOCR中 SEHException 和 AVX 支援故障排除

使用缺乏 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;
    }
}
$vbLabelText   $csharpLabel

在這個範例程式碼中,我們使用 System.Runtime.Intrinsics.X86.Avx.IsSupported 屬性來確定處理器是否支援 AVX 指令。 如果不支援 AVX,建議確保使用的IronOCR版本支援非 AVX 處理器。

Curtis Chau
技術作家

Curtis Chau 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。

除了開發之外,Curtis 對物聯網 (IoT) 有著濃厚的興趣,探索將硬體和軟體結合的創新方式。在閒暇時間,他喜愛遊戲並構建 Discord 機器人,結合科技與創意的樂趣。

準備好開始了嗎?
Nuget 下載 5,525,971 | 版本: 2026.3 剛剛發布
Still Scrolling Icon

還在捲動嗎?

想要快速證明? PM > Install-Package IronOcr
執行範例 觀看您的圖片變成可搜尋的文字。