Share via


IGameInput::FindDeviceFromId (v1)

Retrieves a device based on its identifier.

Syntax

HRESULT FindDeviceFromId(
    const APP_LOCAL_DEVICE_ID* value,
    IGameInputDevice** device
);

Parameters

value   _In_
Type: APP_LOCAL_DEVICE_ID*

System generated ID for the device.

device   _COM_Outptr_
Type: IGameInputDevice**

The returned device.

Return value

Type: HRESULT

Function result.

Remarks

Once obtained, the IGameInputDevice instance can be used as a filter in the polling APIs like IGameInput::GetCurrentReading, or event-based APIs like IGameInput::RegisterReadingCallback (to retrieve input), or used directly to access device-specific information and features. If the provided identifier cannot be matched with any known GameInput device objects, the GetDeviceFrom* methods return a NULL pointer. These methods interrogate local state within the calling process and return quickly, so they are safe to call from time sensitive contexts.

Requirements

Header: GameInput.h

Library: gameinput.lib

Supported platforms: Windows

See also

Input API Overview IGameInput IGameInputDevice IGameInput::GetCurrentReading IGameInput::RegisterReadingCallback