Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The IDirectInputJoyConfig8::AddNewHardware method displays the Add New Hardware dialog box which guides the user through installing a new input device.
HRESULT AddNewHardware(
HWND unnamedParam1,
REFGUID unnamedParam2
);
unnamedParam1
Handle to the window that functions as the owner window for the user interface.
unnamedParam2
GUID that specifies the class of the hardware device to be added. DirectInput comes with the following class GUIDs already defined:
Keyboard devices.
Mouse devices.
Media devices, including joysticks.
HID devices.
Returns DI_OK if successful; otherwise, returns one of the following COM error values:
Return code | Description |
---|---|
|
(E_INVALIDARG). One or more parameters was invalid. |
|
The class installer for the specified device could not be found or is invalid. |
|
The user canceled the operation. |
|
The INF file for the device that the user selected could not be found or is invalid or damaged. |
|
DirectInput could not determine whether the operation completed successfully. |
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | dinputd.h (include Dinputd.h) |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today