60.CPUの種類を取得する
< 使用用途 >
CPUの種類を取得する
< 説明 >
API関数のGetsystemInfo を使用します
GetsystemInfo =>CPUの種類を取得する
<引数>
lpSystemInfo:SYSTEM_INFO構造体
@戻り値@
なし
*dwProcessortypeの386、486はintel 586はPentium
< SAMPLE >
'標準モジュール
Public Declare Sub GetSystemInfo Lib "kernel32" Alias "GetSystemInfo"
(lpSystemInfo As SYSTEM_INFO)
PublicType SYSTEM_INFO
dwOemID As Long
dwPageSize As Long
lpMinimumApplicationAddress As Long
lpMaximumApplicationAddress As Long
dwActiveProcessorMask As Long
dwNumberOrfProcessors As Long
dwProcessorType As Long
dwAllocationGranularity As Long
dwReserved As Long
End Type
'ここからはフォーム内の処理です
Private Sub Command1_Click()
Dim System As SYSTEM_INFO
Call GetSystemInfo(System)
Text1.Text= System.dwProcessortype
End Sub