Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GetSystemFirmwareTable - Why does this not work?

391 views
Skip to first unread message

ananda

unread,
May 19, 2006, 5:50:01 PM5/19/06
to
#include <windows.h>
#include <string.h>
#include <stdio.h>
#include <iostream.h>

ULONG_PTR
main(ULONG_PTR argc, char *argv[])
/*++
Description: The input to this can be
- a.pat b.pat c.pat abcd\q.pat fgh\m.apt xyz\* pqr\?.pat g.pat
- ListFile with the above list
--*/
{

UCHAR pFirmwareTableBuffer1[0x100];
UCHAR pFirmwareTableBuffer2[0x100];
ULONG_PTR retValue;
ULONG_PTR err;

retValue = EnumSystemFirmwareTables('ACPI', pFirmwareTableBuffer1, 0x100);

printf("Ret vlaue 1= %d\n", retValue);

//
// Return 20 and pFirmwareTableBuffer1 has
// FACP APIC SPCR MCFG OEMB
//

retValue = GetSystemFirmwareTable('ACPI', 'FACP', pFirmwareTableBuffer2,
0x100);

err = GetLastError();
printf("Ret vlaue 2 = %d, Err = %d\n", retValue, err);

//
// Returns 0 and err = 1168 - No elements found - Why should this fail?
//

}

Please help
thanks
ananda

Poppy Cock

unread,
Dec 18, 2008, 5:17:48 PM12/18/08
to
What a moron - you have the endian values wrong on your hex calculations for
the appropriate table offset, based on the table offset calculation section
8.3 of the ACPI 2.0 specification and later.

This is such a begineer's mistake. I can't believe the ignorance.

url:http://ureader.com/msg/1483318.aspx

0 new messages