EndTask function (winuser.h)
[This function is not intended for general use. It may be altered or unavailable in subsequent versions of Windows.]
Forcibly closes the specified window.
BOOL EndTask( HWND hWnd, BOOL fShutDown, BOOL fForce );
A handle to the window to be closed.
Ignored. Must be FALSE.
A TRUE for this parameter will force the destruction of the window if an initial attempt fails to gently close the window using WM_CLOSE. With a FALSE for this parameter, only the close with WM_CLOSEis attempted.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is FALSE. To get extended error information, call GetLastError.
This function was not included in the SDK headers and libraries until Windows XP with Service Pack 1 (SP1) and Windows Server 2003. If you do not have a header file and import library for this function, you can call the function using LoadLibrary and GetProcAddress.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||winuser.h (include Windows.h)|