How to get ShutdownBlockReasonCreate for windows vista?
-
Hello, I had made an application which trapped WM_QUERYSESSION to block SHUTDOWN and LOGOFF in Windows XP. When Trying to port this solution on VISTA/WINDOWS 2008/Windows 7 I need to call additional methods namely ShutdownBlockReasonCreate() , ShutdownBlockReasonDestroy() which is defined in winuser.h for VISTA. After installing VS 2005 and upgrading it for windows VISTA by SP1 , I am still not getting ShutdownBlockReasonCreate () in windows vista winuser.h. Please let me know where am I doing things wrong . Regards, Kushagra I hate coding but I luv to develop :)
-
Hello, I had made an application which trapped WM_QUERYSESSION to block SHUTDOWN and LOGOFF in Windows XP. When Trying to port this solution on VISTA/WINDOWS 2008/Windows 7 I need to call additional methods namely ShutdownBlockReasonCreate() , ShutdownBlockReasonDestroy() which is defined in winuser.h for VISTA. After installing VS 2005 and upgrading it for windows VISTA by SP1 , I am still not getting ShutdownBlockReasonCreate () in windows vista winuser.h. Please let me know where am I doing things wrong . Regards, Kushagra I hate coding but I luv to develop :)
In the *.cpp files where you call these functions paste somewhere at the beginning (but after
#include stdafx.h
):BOOL WINAPI ShutdownBlockReasonDestroy(
__in HWND hWnd
);BOOL WINAPI ShutdownBlockReasonCreate(
__in HWND hWnd,
__in LPCWSTR pwszReason
);There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal
-
Hello, I had made an application which trapped WM_QUERYSESSION to block SHUTDOWN and LOGOFF in Windows XP. When Trying to port this solution on VISTA/WINDOWS 2008/Windows 7 I need to call additional methods namely ShutdownBlockReasonCreate() , ShutdownBlockReasonDestroy() which is defined in winuser.h for VISTA. After installing VS 2005 and upgrading it for windows VISTA by SP1 , I am still not getting ShutdownBlockReasonCreate () in windows vista winuser.h. Please let me know where am I doing things wrong . Regards, Kushagra I hate coding but I luv to develop :)
Download and install the latest Windows SDK from Windows SDK for Windows Server 2008 and .NET Framework 3.5[^]. Then run the
Windows SDK Configuration Tool
fromStart -> All Programs -> Microsoft Windows SDK v6.1 -> Visual Studio Registration
to integrate it with Visual Stdio.«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)