找回密码
 加入
搜索
查看: 521|回复: 3

[AU3基础] 求WinAPI.au3文件

[复制链接]
发表于 2023-5-9 23:53:39 | 显示全部楼层 |阅读模式
本帖最后由 baosheng00 于 2023-5-10 13:04 编辑



从BIOS中查找启动信息,需要用到_WinAPI_GetSystemFirmwareTable("ACPI", "RSDT"),而_WinAPI_GetSystemFirmwareTable()就在WinAPI.au3里面,百度找不到相关下载,特来论坛求助

发表于 2023-5-10 08:57:07 | 显示全部楼层
这个不是自带的吗?
发表于 2023-5-10 11:12:54 | 显示全部楼层
本帖最后由 gyp2000 于 2023-5-10 11:14 编辑
#include <Array.au3>
Local $aTables = GetSystemFirmwareTable("ACPI", "PCAF")
_ArrayDisplay($aTables)

Func GetSystemFirmwareTable($sSignature, $sTableID)
        Local $MSDM_FirmwareTable = "struct;CHAR Signature[4];UINT Length;BYTE Revision;BYTE Checksum;CHAR OemId[6];CHAR OemTableId[8];UINT OemRevision;CHAR CreatorId[4];UINT CreatorRevision;CHAR ProductKey[49];endstruct"
        Local $bRet = 0
        $bRet = DllCall("Kernel32.dll", "uint", "GetSystemFirmwareTable", "dword", _Signature($sSignature), "dword", _Signature($sTableID), "ptr", Null, "dword", 0)
        If @error Or Not $bRet[0] Then Return SetError(@error, @extended, $aTables)
        Local $jsize = $bRet[0]
        Local $jBound = $jsize / 4
        Local $tFirmwareTable = DllStructCreate($MSDM_FirmwareTable)
        $bTables = DllCall("Kernel32.dll", "uint", "GetSystemFirmwareTable", "dword", _Signature($sSignature), "dword", _Signature($sTableID), "ptr", DllStructGetPtr($tFirmwareTable), "dword", $jBound)
        $tFirmwareTable = 0
        Return $bTables
EndFunc   ;==>GetSystemFirmwareTable

Func _Signature($sString)
        Return "0x" & Hex(Binary($sString))
EndFunc   ;==>_Signature
 楼主| 发表于 2023-5-10 13:04:04 | 显示全部楼层
谢谢,已经解决
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-22 11:24 , Processed in 0.072500 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表