Edit

Share via


SENDASYNCPROC callback function (winuser.h)

An application-defined callback function used with the SendMessageCallback function. The system passes the message to the callback function after passing the message to the destination window procedure. The SENDASYNCPROC type defines a pointer to this callback function. SendAsyncProc is a placeholder for the application-defined function name.

Syntax

SENDASYNCPROC Sendasyncproc;

VOID Sendasyncproc(
  HWND unnamedParam1,
  UINT unnamedParam2,
  ULONG_PTR unnamedParam3,
  LRESULT unnamedParam4
)
{...}

Parameters

unnamedParam1

Type: HWND

A handle to the window whose window procedure received the message. This parameter is typically named hWnd.

If the SendMessageCallback function was called with its hWnd parameter set to HWND_BROADCAST, the system calls the SendAsyncProc function once for each top-level window.

unnamedParam2

Type: UINT

The message. This parameter is typically named uMsg.

unnamedParam3

Type: ULONG_PTR

An application-defined value sent from the SendMessageCallback function. This parameter is typically named dwData.

unnamedParam4

Type: LRESULT

The result of the message processing. This value depends on the message. This parameter is typically named lResult.

Return value

None

Remarks

Note

The parameters are defined in the header with no names: typedef VOID (CALLBACK* SENDASYNCPROC)(HWND, UINT, ULONG_PTR, LRESULT);. Therefore, the syntax block lists them as unnamedParam1 - unnamedParam4. You can name these parameters anything in your app. However, they are usually named as shown in the parameter descriptions.

You install a SendAsyncProc application-defined callback function by passing a SENDASYNCPROC pointer to the SendMessageCallback function.

The callback function is only called when the thread that called SendMessageCallback calls GetMessage, PeekMessage, or WaitMessage.

Requirements

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)

See also

Conceptual

Messages and Message Queues

Reference

GetMessage

PeekMessage

SendMessageCallback

WaitMessage