Export (0) Print
Expand All

InstallNewDevice function

Installs a new device. The user is prompted to select the device.

Syntax


BOOL WINAPI InstallNewDevice(
  _In_   HWND hwndParent,
  _In_   LPGUID ClassGuid,
  _Out_  PDWORD pReboot
);

Parameters

hwndParent [in]

A handle to the top-level window to be used for any required user interface.

ClassGuid [in]

A pointer to a class GUID. This parameter is optional. If this parameter is NULL, the user starts at the detection choice page. If this parameter is GUID_NULL or GUID_DEVCLASS_UNKNOWN, the user starts at the class selection page.

pReboot [out]

A pointer to a variable that receives the reboot status. This parameter can be DI_NEEDRESTART or DI_NEEDREBOOT.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

This function has no associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to NewDev.dll.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

DLL

NewDev.dll

See also

Device Management Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft