Differentiating SHUTDOWN & RESTART?
-
Is there any way to differentiate programmatically which event is occuring i.e shutdown or restart after catching WM_QUERYENDSESSION?? Regards, Kushagra
-
Is there any way to differentiate programmatically which event is occuring i.e shutdown or restart after catching WM_QUERYENDSESSION?? Regards, Kushagra
See the 'competitor' [^]. :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
See the 'competitor' [^]. :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Thanks Sir, It surely will help :) Kushagra
-
Thanks Sir, It surely will help :) Kushagra
Kushagra Tiwari wrote:
It surely will help
Knowing how Windows was last shut down is helpful?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Kushagra Tiwari wrote:
It surely will help
Knowing how Windows was last shut down is helpful?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
DavidCrow wrote:
Knowing how Windows was last shut down is helpful?
Hi David, Indeed it is helpful : For eg: User A pressed 'Restart' on the 'Shutdown Windows ' dialog. My application recieves WM_QUERYENDSESSION message and I return false (means I am temorarily delaying the shutdown) , but WM_QUERYENDSESSION never lets me differentiate between a 'Shutdown' & 'Restart'. Now, in this time after my application has completed its work it wants to continue with the operation that user chose then this registry value is one thing that lets me know whether the user tried 'Shutdown' or 'Restart', thus accordingly I can perform his desired operation :) . Regards Kushagra I hate coding but I luv to Develop :)
-
DavidCrow wrote:
Knowing how Windows was last shut down is helpful?
Hi David, Indeed it is helpful : For eg: User A pressed 'Restart' on the 'Shutdown Windows ' dialog. My application recieves WM_QUERYENDSESSION message and I return false (means I am temorarily delaying the shutdown) , but WM_QUERYENDSESSION never lets me differentiate between a 'Shutdown' & 'Restart'. Now, in this time after my application has completed its work it wants to continue with the operation that user chose then this registry value is one thing that lets me know whether the user tried 'Shutdown' or 'Restart', thus accordingly I can perform his desired operation :) . Regards Kushagra I hate coding but I luv to Develop :)
Have you verified that the registry is updated with the 'restart' flag even though no restart was performed?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Have you verified that the registry is updated with the 'restart' flag even though no restart was performed?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Yes david .. It works perfectly fine .. I have verified it just now :)
-
Have you verified that the registry is updated with the 'restart' flag even though no restart was performed?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Did you try to cross verify it ??
-
Did you try to cross verify it ??
No, why would I?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
No, why would I?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
I thought u must have tried it before, thats why u mast have asked the question of verifying. Anyways , thanks for the help. :) Kushagra