|
GetSystemFirmwareTable |
|
Description
Retrieves the specified firmware table from the firmware table provider.
C++ Syntax
PowerBASIC Syntax
Parameters
FirmwareTableProviderSignature
[in] The identifier of the firmware table provider to which the query is to be directed. This parameter can be one of the following values.
FirmwareTableID
[in] The identifier of the firmware table. This identifier is little endian, you must reverse the characters in the string.
For example, FACP is an ACPI provider, as described in the Signature field of the DESCRIPTION_HEADER structure in the ACPI specification (see http://www.acpi.info). Therefore, use 'PCAF' to specify the FACP table, as shown in the following example:
retVal = GetSystemFirmwareTable('ACPI', 'PCAF', pBuffer, BUFSIZE);
For more information, see the Remarks section of the EnumSystemFirmwareTables function.
pFirmwareTableBuffer
[out] A pointer to a buffer that receives the requested firmware table. If this parameter is NULL, the return value is the required buffer size.
For more information on the contents of this buffer, see the Remarks section.
BufferSize
[in] The size of the pFirmwareTableBuffer buffer, in bytes.
Return Value
If the function succeeds, the return value is the number of bytes written to the buffer. This value will always be less than or equal to BufferSize.
If the function fails because the buffer is not large enough, the return value is the required buffer size, in bytes. This value is always greater than BufferSize.
If the function fails for any other reason, the return value is zero. To get extended error information, call GetLastError.
Remarks
As of Windows Server 2003 with Service Pack 1 (SP1), applications cannot access the \Device\PhysicalMemory object. Access to this object is limited to kernel-mode drivers. This change affects applications read System Management BIOS (SMBIOS) or other BIOS data stored in the lowest 1MB of physical memory. Applications have the following alternatives to read data from low physical memory:
There is no way for applications to write to low physical memory.
The raw SMBIOS table provider ('RSMB') retrieves the contents of the raw SMBIOS firmware table. The pFirmwareTableBuffer buffer receives the following data:
struct RawSMBIOSData { BYTE Used20CallingMethod; BYTE SMBIOSMajorVersion; BYTE SMBIOSMinorVersion; BYTE DmiRevision; DWORD Length; BYTE SMBIOSTableData[]; };
TYPE RawSMBIOSData Used20CallingMethod AS BYTE SMBIOSMajorVersion AS BYTE SMBIOSMinorVersion AS BYTE DmiRevision AS BYTE Length AS DWORD SMBIOSTableData(0) AS BYTE END TYPE
The raw firmware table provider ('FIRM') retrieves the contents of the specified physical address range. The function returns the size of the address range.
The ACPI table provider ('ACPI') retrieves the contents of the specified ACPI table. Because OEMs can include ACPI firmware tables that are not listed in the ACPI specification, you should first call EnumSystemFirmwareTables to enumerate all ACPI tables that are currently on the system.
For ACPI, if the system contains multiple tables with the same name, they are all enumerated with EnumSystemFirmwareTables. However, GetSystemFirmwareTable retrieves only the first table in the list with this name.
|
