from ctypes import *
cfg = windll.cfgmgr32
adv = windll.Advapi32
CRVALS = {
0x00000000:"CR_SUCCESS",
0x00000001:"CR_DEFAULT",
0x00000002:"CR_OUT_OF_MEMORY",
0x00000003:"CR_INVALID_POINTER",
0x00000004:"CR_INVALID_FLAG",
0x00000005:"CR_INVALID_DEVNODE",
0x00000006:"CR_INVALID_RES_DES",
0x00000007:"CR_INVALID_LOG_CONF",
0x00000008:"CR_INVALID_ARBITRATOR",
0x00000009:"CR_INVALID_NODELIST",
0x0000000A:"CR_DEVNODE_HAS_REQS",
0x0000000B:"CR_INVALID_RESOURCEID",
0x0000000C:"CR_DLVXD_NOT_FOUND",
0x0000000D:"CR_NO_SUCH_DEVNODE",
0x0000000E:"CR_NO_MORE_LOG_CONF",
0x0000000F:"CR_NO_MORE_RES_DES",
0x00000010:"CR_ALREADY_SUCH_DEVNODE",
0x00000011:"CR_INVALID_RANGE_LIST",
0x00000012:"CR_INVALID_RANGE",
0x00000013:"CR_FAILURE",
0x00000014:"CR_NO_SUCH_LOGICAL_DEV",
0x00000015:"CR_CREATE_BLOCKED",
0x00000016:"CR_NOT_SYSTEM_VM",
0x00000017:"CR_REMOVE_VETOED",
0x00000018:"CR_APM_VETOED",
0x00000019:"CR_INVALID_LOAD_TYPE",
0x0000001A:"CR_BUFFER_SMALL",
0x0000001B:"CR_NO_ARBITRATOR",
0x0000001C:"CR_NO_REGISTRY_HANDLE",
0x0000001D:"CR_REGISTRY_ERROR",
0x0000001E:"CR_INVALID_DEVICE_ID",
0x0000001F:"CR_INVALID_DATA",
0x00000020:"CR_INVALID_API",
0x00000021:"CR_DEVLOADER_NOT_READY",
0x00000022:&
cfg = windll.cfgmgr32
adv = windll.Advapi32
CRVALS = {
0x00000000:"CR_SUCCESS",
0x00000001:"CR_DEFAULT",
0x00000002:"CR_OUT_OF_MEMORY",
0x00000003:"CR_INVALID_POINTER",
0x00000004:"CR_INVALID_FLAG",
0x00000005:"CR_INVALID_DEVNODE",
0x00000006:"CR_INVALID_RES_DES",
0x00000007:"CR_INVALID_LOG_CONF",
0x00000008:"CR_INVALID_ARBITRATOR",
0x00000009:"CR_INVALID_NODELIST",
0x0000000A:"CR_DEVNODE_HAS_REQS",
0x0000000B:"CR_INVALID_RESOURCEID",
0x0000000C:"CR_DLVXD_NOT_FOUND",
0x0000000D:"CR_NO_SUCH_DEVNODE",
0x0000000E:"CR_NO_MORE_LOG_CONF",
0x0000000F:"CR_NO_MORE_RES_DES",
0x00000010:"CR_ALREADY_SUCH_DEVNODE",
0x00000011:"CR_INVALID_RANGE_LIST",
0x00000012:"CR_INVALID_RANGE",
0x00000013:"CR_FAILURE",
0x00000014:"CR_NO_SUCH_LOGICAL_DEV",
0x00000015:"CR_CREATE_BLOCKED",
0x00000016:"CR_NOT_SYSTEM_VM",
0x00000017:"CR_REMOVE_VETOED",
0x00000018:"CR_APM_VETOED",
0x00000019:"CR_INVALID_LOAD_TYPE",
0x0000001A:"CR_BUFFER_SMALL",
0x0000001B:"CR_NO_ARBITRATOR",
0x0000001C:"CR_NO_REGISTRY_HANDLE",
0x0000001D:"CR_REGISTRY_ERROR",
0x0000001E:"CR_INVALID_DEVICE_ID",
0x0000001F:"CR_INVALID_DATA",
0x00000020:"CR_INVALID_API",
0x00000021:"CR_DEVLOADER_NOT_READY",
0x00000022:&