Hi all !
I need to get/change the shutdown parameters for the currently calling process.
How can I do this using functions SetProcessShutdownParameters and GetProcessShutdownParameters ?
Hi all !
I need to get/change the shutdown parameters for the currently calling process.
How can I do this using functions SetProcessShutdownParameters and GetProcessShutdownParameters ?
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
HB_FUNC( SETPROCESSSHUTDOWNPARAMETERS )
{
hb_retl( SetProcessShutdownParameters( hb_parnl( 1 ), hb_parnl( 2 ) ) );
}
#pragma ENDDUMPThank You, Antonio !
I wanted that when you shutdown the computer is not a message of forced close my app. In your application make Setprocessshutdownparameters(1, 1), but the message still appears forced.
What message appear ?
Please post a screenshot
Understood, it is necessary to process messages WM_QUERYENDSESSION / WM_ENDSESSION which are sent open applications when you restart the computer. How can I intercept these messages ?
Please inherit a new Class from TWindow and redefine the Method HandleEvent()
Here you have an example from Daniel:
Antonio, thanks for Your help !