Microsoft DirectX 8.1 (C++)

DIACTION

Describes a mapping of one game action to one device semantic. An array of DIACTION structures is contained by a DIACTIONFORMAT structure.

typedef struct _DIACTION {
    UINT_PTR    uAppData;
    DWORD       dwSemantic;
    DWORD       dwFlags;
    union {
        LPCTSTR lptszActionName;
        UINT    uResIdString;
    };
    GUID        guidInstance;
    DWORD       dwObjID;
    DWORD       dwHow;
} DIACTION, *LPDIACTION;
 
typedef const DIACTION *LPCDIACTION;

Members

uAppData
Address of an application-defined UINT value to be returned to the application by IDirectInputDevice8::GetDeviceData when the state of the control associated with the action changes. This value is returned in the uAppData member of the DIDEVICEOBJECTDATA structure. It is typically an identifier for the application-specific action associated with the device object, but can also be a function pointer.
dwSemantic
For a joystick, a predefined action mapping constant for this application genre representing a virtual control or a constant for a control not defined in the genre. For a keyboard, mouse, or Microsoft® DirectPlay® voice device, a constant that represents a particular device object. See Action Mapping Constants.
dwFlags
Flags used to request specific attributes or processing. Can be zero or one or more of the following values.
DIA_APPFIXED
The action cannot be remapped by Microsoft DirectInput®.
DIA_APPMAPPED
The dwObjID member is valid, and IDirectInputDevice8::BuildActionMap will not override the application-defined mapping.
DIA_APPNOMAP
This action is not to be mapped.
DIA_FORCEFEEDBACK
The action must be mapped to an actuator or trigger.
DIA_NORANGE
The default range is not to be set for this action. This flag can be set only for absolute axis actions.
lptszActionName
Application-defined name of the action. This string is displayed by the device property sheet when IDirectInput8::ConfigureDevices is called.
uResIdString
Resource identifier for the string for this action. The module instance for this resource is specified in the hInstString member of the DIACTIONFORMAT structure that contains this structure.
guidInstance
Device instance GUID if a specific device is requested. Otherwise GUID_NULL.
dwObjID
Control identifier. Use the DIDFT_GETINSTANCE and DIDFT_GETTYPE macros to retrieve the instance and type from this value.
dwHow
When the structure is returned by IDirectInputDevice8::BuildActionMap, this member receives a value to indicate the mapping mechanism used by DirectInput to configure the action. The following values are defined.
DIAH_APPREQUESTED
The mapping was configured by the application, which specified the device (guidInstance) and device object (dwObjID) when calling BuildActionMap.
DIAH_DEFAULT
The mapping was determined by DirectInput in the absence of other mapping information.
DIAH_ERROR
An error occurred. The action cannot be matched to a control on the device. The action will be ignored when the action map is set.
DIAH_HWAPP
The mapping was specified by the hardware manufacturer for this game.
DIAH_HWDEFAULT
The mapping was specified by the hardware manufacturer for this genre.
DIAH_UNMAPPED
No suitable device object was found.
DIAH_USERCONFIG
The mapping was configured by the user.

This member is ignored when the action map is passed to IDirectInputDevice8::SetActionMap.

Requirements

  Windows NT/2000/XP: Requires Windows 2000.
  Windows 98/Me: Requires Windows 98 or later. Available as a redistributable for Windows 98.
  Header: Declared in Dinput.h.

See Also

IDirectInput8::EnumDevicesBySemantics, IDirectInputDevice8::SetActionMap, IDirectInput8::ConfigureDevices, IDirectInputDevice8::BuildActionMap, Action Mapping