Retrieves the specified firmware table from the firmware table provider.
UINT GetSystemFirmwareTable( DWORD FirmwareTableProviderSignature, DWORD FirmwareTableID, PVOID pFirmwareTableBuffer, DWORD BufferSize );
The identifier of the firmware table provider to which the query is to be directed. This parameter can be one of the following values.
|'ACPI'||The ACPI firmware table provider.|
|'FIRM'||The raw firmware table provider.|
|'RSMB'||The raw SMBIOS firmware table provider.|
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.
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.
The size of the pFirmwareTableBuffer buffer, in bytes.
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.
Starting with Windows 10, version 1803, Universal Windows apps can access the System Management BIOS (SMBIOS) information by declaring the smbios restricted capability in the app manifest. See Access SMBIOS information from a Universal Windows Appfor details. Only raw SMBIOS (RSMB) firmware tables can be accessed from a Universal Windows app.
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:
- Retrieve the SMBIOS properties using WMI. Many individual properties are contained in the Win32 classes. You can also retrieve the raw SMBIOS data in a single buffer using the MSSMBios_RawSMBiosTables class.
- Use the GetSystemFirmwareTable function to read the raw SMBIOS firmware table.
The raw SMBIOS table provider ('RSMB') retrieves the contents of the raw SMBIOS firmware table. The pFirmwareTableBuffer buffer receives the following data:
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.
The following example illustrates retrieving the SMBIOS table.
DWORD error = ERROR_SUCCESS; DWORD smBiosDataSize = 0; RawSMBIOSData* smBiosData = NULL; // Defined in this link DWORD bytesWritten = 0;
|Minimum supported client||Windows Vista, Windows XP Professional x64 Edition [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008, Windows Server 2003 with SP1 [desktop apps | UWP apps]|
|Header||sysinfoapi.h (include Windows.h)|