涵盖和囊括:VB中出现DLL调用约定错误怎么办?

来源:百度文库 编辑:高校问答 时间:2024/05/07 16:38:07
我使用API函数GetSystemInfo来检测CPU类型,但是写到最后却是先了DLL调用约定错误,请问高手,我应该怎么办,我使了很多方法。。。。
我的代码是:
在Module1中:
'下面API函数用于显示系统信息,以及SYSTEM_INFO结构
Declare Function GetSystemInfo Lib "kernel32" (lpSystemInfo As SYSTEM_INFO)
Public Type 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

在Command1中为:
Dim a As SYSTEM_INFO
GetSystemInfo a
Text1.Text = a

=========================================
请问大家,我是哪里写错了,谢谢!!!!

WinXP不能用。