Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[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(
[in] HWND hWnd,
[in] BOOL fShutDown,
[in] BOOL fForce
);
[in] hWnd
Type: HWND
A handle to the window to be closed.
[in] fShutDown
Type: BOOL
Ignored. Must be FALSE.
[in] fForce
Type: BOOL
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_CLOSE is attempted.
Type: BOOL
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.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |
Conceptual
Reference
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!