GetCurrentInputMessageSource function

Retrieves the source of the input message.

Syntax


BOOL GetCurrentInputMessageSource(
  _Out_ INPUT_MESSAGE_SOURCE *inputMessageSource
);

Parameters

inputMessageSource [out]

The INPUT_MESSAGE_SOURCE structure that holds the device type and the ID of the input message source.

Note  deviceType in INPUT_MESSAGE_SOURCE is set to IMDT_UNAVAILABLE when SendMessage is used to inject input (system generated or through messages such as WM_PAINT). This remains true until SendMessage returns.
 

Return value

If this function succeeds, it returns TRUE. Otherwise, it returns FALSE. To retrieve extended error information, call the GetLastError function.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Winuser.h

Library

User32.lib

DLL

User32.dll

See also

Input Source Identification Reference

 

 

Community Additions

ADD
Show: