Learning noob here. Anyway, is it possible in C++ to detect the closing of my laptop's lid?
Thanks in advance!
Printable View
Learning noob here. Anyway, is it possible in C++ to detect the closing of my laptop's lid?
Thanks in advance!
C++ is Turing complete
Huh? Could you explain?
Could this topic be moved to "Windows Programming" by an admin?
Lid closing on a laptop is handled by the ACPI system. I'm not sure if there is any ACPI interface that allows user-mode code to get ACPI messages. I suspect not, as it's generally not something that user-mode applications do need to care about, so there is no reason to implement some way to forward that to the user-mode.
Also, whist it is part of ACPI, it is implementation dependant.
If there is no ACPI driver in the system, the BIOS will handle ACPI. Again, it's not possible for user-mode applications to get info out of BIOS.
There's more info on ACPI here:
http://www.microsoft.com/whdc/system...ver_Vista.mspx
I don't know if there is a similar document for XP and older versions of NT-class OS's.
--
Mats