' ssechk2.vb Imports System Imports System.Runtime.InteropServices ' 定数の宣言 Enum ProcessorFeatures As Integer PF_FLOATING_POINT_PRECISION_ERRATA = 0 PF_FLOATING_POINT_EMULATED = 1 PF_COMPARE_EXCHANGE_DOUBLE = 2 PF_MMX_INSTRUCTIONS_AVAILABLE = 3 PF_PPC_MOVEMEM_64BIT_OK = 4 PF_ALPHA_BYTE_INSTRUCTIONS = 5 PF_XMMI_INSTRUCTIONS_AVAILABLE = 6 PF_3DNOW_INSTRUCTIONS_AVAILABLE = 7 PF_RDTSC_INSTRUCTION_AVAILABLE = 8 PF_PAE_ENABLED = 9 PF_XMMI64_INSTRUCTIONS_AVAILABLE = 10 End Enum Class SSECheck2 _ Private Shared Function IsProcessorFeaturePresent _ (ByVal ProcessorFeature As ProcessorFeatures) As Boolean End Function Public Shared Sub Main() If IsProcessorFeaturePresent(ProcessorFeatures.PF_XMMI_INSTRUCTIONS_AVAILABLE) Then Console.WriteLine("SSE is available.") Else Console.WriteLine("SSE is not available.") End If End Sub End Class ' コンパイル方法: vbc ssechk2.vb