IDirectInputJoyConfig8::AddNewHardware method (dinputd.h)
The IDirectInputJoyConfig8::AddNewHardware method displays the Add New Hardware dialog box which guides the user through installing a new input device.
HRESULT AddNewHardware( HWND , REFGUID );
Handle to the window that functions as the owner window for the user interface.
GUID that specifies the class of the hardware device to be added. DirectInput comes with the following class GUIDs already defined:
Media devices, including joysticks.
Returns DI_OK if successful; otherwise, returns one of the following COM error values:
||(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.|
|Header||dinputd.h (include Dinputd.h)|