IsGUIThread function

Expand
1 out of 1 rated this helpful Rate this topic

IsGUIThread function

Determines whether the calling thread is already a GUI thread. It can also optionally convert the thread to a GUI thread.

Syntax

BOOL WINAPI IsGUIThread(
  __in  BOOL bConvert
);

Parameters

bConvert [in]

Type: BOOL

If TRUE and the thread is not a GUI thread, convert the thread to a GUI thread.

Return value

Type: BOOL

The function returns a nonzero value in the following situations:

Otherwise, the function returns zero.

  • If the calling thread is already a GUI thread.
  • If bConvert is TRUE and the function successfully converts the thread to a GUI thread.

If bConvert is TRUE and the function cannot successfully convert the thread to a GUI thread, IsGUIThread returns ERROR_NOT_ENOUGH_MEMORY.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Windows Overview

 

 

Send comments about this topic to Microsoft

Build date: 9/11/2011

Did you find this helpful?
(1500 characters remaining)
Community Additions ADD