Export (0) Print
Expand All
Expand Minimize
0 out of 2 rated this helpful - Rate this topic

EndTask function

[This function is not intended for general use. It may be altered or unavailable in subsequent versions of Windows.]

Forcibly closes the specified window.

Syntax


BOOL WINAPI EndTask(
  _In_  HWND hWnd,
  _In_  BOOL fShutDown,
  _In_  BOOL fForce
);

Parameters

hWnd [in]

Type: HWND

A handle to the window to be closed.

fShutDown [in]

Type: BOOL

Ignored. Must be FALSE.

fForce [in]

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.

Return value

Type:

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.

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference
DestroyWindow
CloseWindow
WM_CLOSE
Conceptual
Windows

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.