baosheng00 发表于 2023-5-9 23:53:39

求WinAPI.au3文件

本帖最后由 baosheng00 于 2023-5-10 13:04 编辑



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

zdphj 发表于 2023-5-10 08:57:07

这个不是自带的吗?

gyp2000 发表于 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;UINT Length;BYTE Revision;BYTE Checksum;CHAR OemId;CHAR OemTableId;UINT OemRevision;CHAR CreatorId;UINT CreatorRevision;CHAR ProductKey;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 Then Return SetError(@error, @extended, $aTables)
      Local $jsize = $bRet
      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

baosheng00 发表于 2023-5-10 13:04:04

谢谢,已经解决
页: [1]
查看完整版本: 求WinAPI.au3文件