The CM_Disable_DevNode function disables a device.
Syntax
CMAPI CONFIGRET CM_Disable_DevNode(
[in] DEVINST dnDevInst,
[in] ULONG ulFlags
);
Parameters
[in] dnDevInst
로컬 컴퓨터에 바인딩된 디바이스 인스턴스 핸들입니다.
[in] ulFlags
Disable flags:
CM_DISABLE_UI_NOT_OK
디바이스를 사용하지 않도록 설정하려는 시도가 실패하는 경우 사용자에게 인터페이스를 표시하지 마세요.
CM_DISABLE_PERSIST(Windows 10 이상 버전의 Windows)
다시 부팅할 때 디바이스를 사용하지 않도록 설정합니다.
Return value
작업이 성공하면 함수는 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 |
|---|---|
| 지원되는 최소 클라이언트 | Microsoft Windows 2000 이상 버전의 Windows에서 사용할 수 있습니다. |
| Target Platform | Universal |
| Header | cfgmgr32.h(Cfgmgr32.h 포함) |
| Library | Cfgmgr32.lib; Windows 10의 OneCoreUAP.lib |
| DLL | CfgMgr32.dll |