CPU power button event RRS feed

  • Question

  • I am using Windows 7 32bit OS and want to detect the CPU power button press event in my console application
    developing in C language.

    I configured the power button setting to "Do Nothing" which is in "Choose what the power button does"
    options in Control Panel->Hardware and Sound->Power Options. So now i want to detect this power button
    press event and do some processing in my application then i will initate shut down from application itself.

    Kindly provide the windows API details which will detect the power button press event.
    Thursday, February 5, 2015 4:01 AM


  • Hi Jeevan,

    This forum is dedicated to Microsoft scheduling and planning application. Please post your question to the right TechNet forum in order to have appropriate help.

    Plase DO NOT DUPLICATE your thread.

    Hope this helps,

    Guillaume Rouyre, MBA, MVP, P-Seller |

    • Marked as answer by PWMatherMVP Thursday, February 5, 2015 10:44 AM
    Thursday, February 5, 2015 7:01 AM