IsGUIThread (Constants)
Last changed: -94.229.131.27

.

Summary:

The IsGUIThread function tests whether the calling thread is already a graphical user interface (GUI) thread. It can also optionally convert the thread to a GUI thread.

C# Constants:

[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool IsGUIThread([MarshalAs(UnmanagedType.Bool)] bool bConvert);

VB Constants:

TODO

Notes:

None.

Parameters

bConvert

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

Return Value

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.