Microsoft DirectX 8.1 (Visual Basic)

DirectInput8.ConfigureDevices

Displays property pages for connected input devices and enables the user to map actions to device controls.

object.ConfigureDevices( _
  hEvent As Long, _
  CDParams As DICONFIGUREDEVICESPARAMS, _
  flags As Long)

Parts

object
Resolves to a DirectInput8 object.
hEvent
Handle to an event that is set each time a change is made to the display of the property sheet. Can be 0 or a value returned by DirectX8.CreateEvent.
CDParams
DICONFIGUREDEVICESPARAMS type that contains parameters for action mapping.
flags
Value that specifies the mode in which the control panel should be invoked. Must be one of the following values from the CONST_DICDFLAGS enumeration.
DICD_DEFAULT
Open the property sheet in view-only mode.
DICD_EDIT
Open the property sheet in edit mode. This mode enables the user to change action-to-control mappings. After the call returns, the application should assume current devices are no longer valid, release all device interfaces, and reinitialize them by calling DirectInput8.GetDevicesBySemantics.

Error Codes

If the method fails, an error is raised and Err.Number may be set to one of the following:

DIERR_INVALIDPARAM
DIERR_OUTOFMEMORY

Remarks

Hardware vendors provide bitmaps and other display information for their device.

Before calling the method, an application can modify the text labels associated with each action by changing the value in the ActionName member of the DIACTION type.

Configuration is stored for each user of each device for each game. The information can be retrieved by the DirectInputDevice8.BuildActionMap method.

By default, acceleration is supported for these pixel formats:

A1R5G5B5
16-bit pixel format with 5 bits reserved for each color and 1 bit reserved for alpha (transparent texel).
A8R8G8B8
32-bit ARGB pixel format with alpha.
R9G8B8
24-bit RGB pixel format.
X1R5G5B5
16-bit pixel format with 5 bits reserved for each color.
X8R8G8B8
32-bit RGB pixel format with 8 bits reserved for each color.

Other formats result in color conversion and dramatically slow the frame rate.

Note  Even if the cooperative level for the application is disabling the Windows logo key passively through an exclusive cooperative level or actively through use of the DISCL_NOWINKEY flag, that key is active while the default action mapping UI is displayed.