Nota:
El acceso a esta página requiere autorización. Puede intentar iniciar sesión o cambiar directorios.
El acceso a esta página requiere autorización. Puede intentar cambiar los directorios.
The CM_Disable_DevNode function disables a device.
Syntax
CMAPI CONFIGRET CM_Disable_DevNode(
[in] DEVINST dnDevInst,
[in] ULONG ulFlags
);
Parameters
[in] dnDevInst
Identificador de instancia de dispositivo enlazado al equipo local.
[in] ulFlags
Disable flags:
CM_DISABLE_UI_NOT_OK
No muestre ninguna interfaz al usuario si se produce un error en el intento de deshabilitar el dispositivo.
CM_DISABLE_PERSIST (Windows 10 y versiones posteriores de Windows)
Deshabilita el dispositivo en los reinicios.
Return value
Si la operación se realiza correctamente, la función devuelve CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.
Remarks
By default, CM_Disable_DevNode disables a device at one time, but after reboot the device is enabled again. Starting in Windows 10, you can specify the CM_DISABLE_PERSIST flag to disable the device across reboots.
Requirements
| Requirement | Value |
|---|---|
| Cliente mínimo compatible | Disponible en Microsoft Windows 2000 y versiones posteriores de Windows. |
| Target Platform | Universal |
| Header | cfgmgr32.h (incluya Cfgmgr32.h) |
| Library | Cfgmgr32.lib; OneCoreUAP.lib en Windows 10 |
| DLL | CfgMgr32.dll |