Enable method

The Enable method attempts to load the drivers for the device and start the device.

Syntax

HRESULT Enable();

Parameters

This method has no parameters.

Return value

Enable returns a standard HRESULT value.

Remarks

If the Enable method cannot start the device, it sets the IsRebootNeeded property for the device. This property indicates that the end-user must be prompted to restart the computer to complete the enable request.

The Enable method will automatically succeed if the device is already enabled (that is, the IsStarted equals VARIANT_TRUE).

See also

Attribute Tokens in SDEL

DeviceManagement for Device Targets

DeviceManagement::Disable

 

 

Send comments about this topic to Microsoft

Build date: 1/12/2012