Microsoft DirectX 8.1 (C++) |
Builds an action map for the device and retrieves information about it.
HRESULT BuildActionMap( LPDIACTIONFORMAT lpdiaf, LPCTSTR lpszUserName DWORD dwFlags );
If the method succeeds, the return value is DI_OK, DI_NOEFFECT, or DI_WRITEPROTECT. See Remarks.
If the method fails, the return value can be one of the following error values.
DIERR_INVALIDPARAM |
DIERR_MAPFILEFAIL |
Remarks
The method returns DI_NOEFFECT if no mappings were created for the device. For example, a keyboard or mouse will not provide mappings for genre-specific actions.
If DIERR_INVALIDPARAM is returned, one or more of the mappings was not valid. The dwHow member of the DIACTION structure is set to DIAH_ERROR. The application can iterate through the action map to find and correct errors.
If DIEFF_MAPFILEFAIL is returned, an error has occurred either reading the vendor supplied file for the device or reading or writing the user configuration file for the device.
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.
IDirectInputDevice8::SetActionMap, IDirectInputDevice8::SetDataFormat