这是个C源码: gAddress=address = _pciFindPciClass(0x06,0x00,0x00,0);
data = _pciConfigReadLong(address >> 16 ,0);
NorthVendorID = data & 0x0000FFFF;
NorthDeviceID = (data & 0xFFFF0000) >> 16;
这个是转换之后的代码:$DLLFiles=DllOpen("pcidebug.dll")
Dim $Address,$Data
$gAddress=DllCall($DLLFiles, "ulong", "_pciFindPciClass", "ubyte", 0x06, "ubyte", 0x00, "ubyte", 0x00,"ulong",0)
$Address=$gAddress[0]
$Data = DllCall($DLLFiles, "ulong", "_pciConfigReadLong", "ulong", BitShift($Address,16), "ulong", 0)
$NorthVendorID=BitAND($Data[0],0x0000FFFF)
$NorthDeviceID=BitShift($Data[0]&0xFFFF0000,16)
一直都无法得到正确的值,请教P大,麻烦了,菜鸟晕啊~ |