I don't have any C++ code, unfortunately, I'm very much a .NET guy :-\
I can point you specifically to the WMI code (that you have probably found already) here, lines 393-450. It's basically a matter of locating the ACPI WMI object and then invoking a method against it (the parameters are...