1 // Copyright © 2015, skdltmxn 2 // Licensed under the MIT License <LICENSE.md> 3 //! common Configuration Manager definitions for both user mode and kernel mode code 4 ENUM!{enum PNP_VETO_TYPE { 5 PNP_VetoTypeUnknown, 6 PNP_VetoLegacyDevice, 7 PNP_VetoPendingClose, 8 PNP_VetoWindowsApp, 9 PNP_VetoWindowsService, 10 PNP_VetoOutstandingOpen, 11 PNP_VetoDevice, 12 PNP_VetoDriver, 13 PNP_VetoIllegalDeviceRequest, 14 PNP_VetoInsufficientPower, 15 PNP_VetoNonDisableable, 16 PNP_VetoLegacyDriver, 17 PNP_VetoInsufficientRights, 18 }} 19 pub type PPNP_VETO_TYPE = *mut PNP_VETO_TYPE; 20 pub const CM_PROB_NOT_CONFIGURED: ::CONFIGRET = 0x00000001; 21 pub const CM_PROB_DEVLOADER_FAILED: ::CONFIGRET = 0x00000002; 22 pub const CM_PROB_OUT_OF_MEMORY: ::CONFIGRET = 0x00000003; 23 pub const CM_PROB_ENTRY_IS_WRONG_TYPE: ::CONFIGRET = 0x00000004; 24 pub const CM_PROB_LACKED_ARBITRATOR: ::CONFIGRET = 0x00000005; 25 pub const CM_PROB_BOOT_CONFIG_CONFLICT: ::CONFIGRET = 0x00000006; 26 pub const CM_PROB_FAILED_FILTER: ::CONFIGRET = 0x00000007; 27 pub const CM_PROB_DEVLOADER_NOT_FOUND: ::CONFIGRET = 0x00000008; 28 pub const CM_PROB_INVALID_DATA: ::CONFIGRET = 0x00000009; 29 pub const CM_PROB_FAILED_START: ::CONFIGRET = 0x0000000A; 30 pub const CM_PROB_LIAR: ::CONFIGRET = 0x0000000B; 31 pub const CM_PROB_NORMAL_CONFLICT: ::CONFIGRET = 0x0000000C; 32 pub const CM_PROB_NOT_VERIFIED: ::CONFIGRET = 0x0000000D; 33 pub const CM_PROB_NEED_RESTART: ::CONFIGRET = 0x0000000E; 34 pub const CM_PROB_REENUMERATION: ::CONFIGRET = 0x0000000F; 35 pub const CM_PROB_PARTIAL_LOG_CONF: ::CONFIGRET = 0x00000010; 36 pub const CM_PROB_UNKNOWN_RESOURCE: ::CONFIGRET = 0x00000011; 37 pub const CM_PROB_REINSTALL: ::CONFIGRET = 0x00000012; 38 pub const CM_PROB_REGISTRY: ::CONFIGRET = 0x00000013; 39 pub const CM_PROB_VXDLDR: ::CONFIGRET = 0x00000014; 40 pub const CM_PROB_WILL_BE_REMOVED: ::CONFIGRET = 0x00000015; 41 pub const CM_PROB_DISABLED: ::CONFIGRET = 0x00000016; 42 pub const CM_PROB_DEVLOADER_NOT_READY: ::CONFIGRET = 0x00000017; 43 pub const CM_PROB_DEVICE_NOT_THERE: ::CONFIGRET = 0x00000018; 44 pub const CM_PROB_MOVED: ::CONFIGRET = 0x00000019; 45 pub const CM_PROB_TOO_EARLY: ::CONFIGRET = 0x0000001A; 46 pub const CM_PROB_NO_VALID_LOG_CONF: ::CONFIGRET = 0x0000001B; 47 pub const CM_PROB_FAILED_INSTALL: ::CONFIGRET = 0x0000001C; 48 pub const CM_PROB_HARDWARE_DISABLED: ::CONFIGRET = 0x0000001D; 49 pub const CM_PROB_CANT_SHARE_IRQ: ::CONFIGRET = 0x0000001E; 50 pub const CM_PROB_FAILED_ADD: ::CONFIGRET = 0x0000001F; 51 pub const CM_PROB_DISABLED_SERVICE: ::CONFIGRET = 0x00000020; 52 pub const CM_PROB_TRANSLATION_FAILED: ::CONFIGRET = 0x00000021; 53 pub const CM_PROB_NO_SOFTCONFIG: ::CONFIGRET = 0x00000022; 54 pub const CM_PROB_BIOS_TABLE: ::CONFIGRET = 0x00000023; 55 pub const CM_PROB_IRQ_TRANSLATION_FAILED: ::CONFIGRET = 0x00000024; 56 pub const CM_PROB_FAILED_DRIVER_ENTRY: ::CONFIGRET = 0x00000025; 57 pub const CM_PROB_DRIVER_FAILED_PRIOR_UNLOAD: ::CONFIGRET = 0x00000026; 58 pub const CM_PROB_DRIVER_FAILED_LOAD: ::CONFIGRET = 0x00000027; 59 pub const CM_PROB_DRIVER_SERVICE_KEY_INVALID: ::CONFIGRET = 0x00000028; 60 pub const CM_PROB_LEGACY_SERVICE_NO_DEVICES: ::CONFIGRET = 0x00000029; 61 pub const CM_PROB_DUPLICATE_DEVICE: ::CONFIGRET = 0x0000002A; 62 pub const CM_PROB_FAILED_POST_START: ::CONFIGRET = 0x0000002B; 63 pub const CM_PROB_HALTED: ::CONFIGRET = 0x0000002C; 64 pub const CM_PROB_PHANTOM: ::CONFIGRET = 0x0000002D; 65 pub const CM_PROB_SYSTEM_SHUTDOWN: ::CONFIGRET = 0x0000002E; 66 pub const CM_PROB_HELD_FOR_EJECT: ::CONFIGRET = 0x0000002F; 67 pub const CM_PROB_DRIVER_BLOCKED: ::CONFIGRET = 0x00000030; 68 pub const CM_PROB_REGISTRY_TOO_LARGE: ::CONFIGRET = 0x00000031; 69 pub const CM_PROB_SETPROPERTIES_FAILED: ::CONFIGRET = 0x00000032; 70 pub const CM_PROB_WAITING_ON_DEPENDENCY: ::CONFIGRET = 0x00000033; 71 pub const CM_PROB_UNSIGNED_DRIVER: ::CONFIGRET = 0x00000034; 72 pub const CM_PROB_USED_BY_DEBUGGER: ::CONFIGRET = 0x00000035; 73 pub const NUM_CM_PROB_V1: ::CONFIGRET = 0x00000025; 74 pub const NUM_CM_PROB_V2: ::CONFIGRET = 0x00000032; 75 pub const NUM_CM_PROB_V3: ::CONFIGRET = 0x00000033; 76 pub const NUM_CM_PROB_V4: ::CONFIGRET = 0x00000034; 77 pub const NUM_CM_PROB_V5: ::CONFIGRET = 0x00000035; 78 pub const NUM_CM_PROB_V6: ::CONFIGRET = 0x00000036; 79 pub const DN_ROOT_ENUMERATED: ::CONFIGRET = 0x00000001; 80 pub const DN_DRIVER_LOADED: ::CONFIGRET = 0x00000002; 81 pub const DN_ENUM_LOADED: ::CONFIGRET = 0x00000004; 82 pub const DN_STARTED: ::CONFIGRET = 0x00000008; 83 pub const DN_MANUAL: ::CONFIGRET = 0x00000010; 84 pub const DN_NEED_TO_ENUM: ::CONFIGRET = 0x00000020; 85 pub const DN_NOT_FIRST_TIME: ::CONFIGRET = 0x00000040; 86 pub const DN_HARDWARE_ENUM: ::CONFIGRET = 0x00000080; 87 pub const DN_LIAR: ::CONFIGRET = 0x00000100; 88 pub const DN_HAS_MARK: ::CONFIGRET = 0x00000200; 89 pub const DN_HAS_PROBLEM: ::CONFIGRET = 0x00000400; 90 pub const DN_FILTERED: ::CONFIGRET = 0x00000800; 91 pub const DN_MOVED: ::CONFIGRET = 0x00001000; 92 pub const DN_DISABLEABLE: ::CONFIGRET = 0x00002000; 93 pub const DN_REMOVABLE: ::CONFIGRET = 0x00004000; 94 pub const DN_PRIVATE_PROBLEM: ::CONFIGRET = 0x00008000; 95 pub const DN_MF_PARENT: ::CONFIGRET = 0x00010000; 96 pub const DN_MF_CHILD: ::CONFIGRET = 0x00020000; 97 pub const DN_WILL_BE_REMOVED: ::CONFIGRET = 0x00040000; 98 pub const DN_NOT_FIRST_TIMEE: ::CONFIGRET = 0x00080000; 99 pub const DN_STOP_FREE_RES: ::CONFIGRET = 0x00100000; 100 pub const DN_REBAL_CANDIDATE: ::CONFIGRET = 0x00200000; 101 pub const DN_BAD_PARTIAL: ::CONFIGRET = 0x00400000; 102 pub const DN_NT_ENUMERATOR: ::CONFIGRET = 0x00800000; 103 pub const DN_NT_DRIVER: ::CONFIGRET = 0x01000000; 104 pub const DN_NEEDS_LOCKING: ::CONFIGRET = 0x02000000; 105 pub const DN_ARM_WAKEUP: ::CONFIGRET = 0x04000000; 106 pub const DN_APM_ENUMERATOR: ::CONFIGRET = 0x08000000; 107 pub const DN_APM_DRIVER: ::CONFIGRET = 0x10000000; 108 pub const DN_SILENT_INSTALL: ::CONFIGRET = 0x20000000; 109 pub const DN_NO_SHOW_IN_DM: ::CONFIGRET = 0x40000000; 110 pub const DN_BOOT_LOG_PROB: ::CONFIGRET = 0x80000000; 111 pub const DN_NEED_RESTART: ::CONFIGRET = DN_LIAR; 112 pub const DN_DRIVER_BLOCKED: ::CONFIGRET = DN_NOT_FIRST_TIME; 113 pub const DN_LEGACY_DRIVER: ::CONFIGRET = DN_MOVED; 114 pub const DN_CHILD_WITH_INVALID_ID: ::CONFIGRET = DN_HAS_MARK; 115 pub const DN_DEVICE_DISCONNECTED: ::CONFIGRET = DN_NEEDS_LOCKING; 116 pub const DN_CHANGEABLE_FLAGS: ::CONFIGRET = DN_NOT_FIRST_TIME + DN_HARDWARE_ENUM + DN_HAS_MARK 117 + DN_DISABLEABLE + DN_REMOVABLE + DN_MF_CHILD + DN_MF_PARENT + DN_NOT_FIRST_TIMEE 118 + DN_STOP_FREE_RES + DN_REBAL_CANDIDATE + DN_NT_ENUMERATOR + DN_NT_DRIVER + DN_SILENT_INSTALL 119 + DN_NO_SHOW_IN_DM; 120 pub const LCPRI_FORCECONFIG: ::PRIORITY = 0x00000000; 121 pub const LCPRI_BOOTCONFIG: ::PRIORITY = 0x00000001; 122 pub const LCPRI_DESIRED: ::PRIORITY = 0x00002000; 123 pub const LCPRI_NORMAL: ::PRIORITY = 0x00003000; 124 pub const LCPRI_LASTBESTCONFIG: ::PRIORITY = 0x00003FFF; 125 pub const LCPRI_SUBOPTIMAL: ::PRIORITY = 0x00005000; 126 pub const LCPRI_LASTSOFTCONFIG: ::PRIORITY = 0x00007FFF; 127 pub const LCPRI_RESTART: ::PRIORITY = 0x00008000; 128 pub const LCPRI_REBOOT: ::PRIORITY = 0x00009000; 129 pub const LCPRI_POWEROFF: ::PRIORITY = 0x0000A000; 130 pub const LCPRI_HARDRECONFIG: ::PRIORITY = 0x0000C000; 131 pub const LCPRI_HARDWIRED: ::PRIORITY = 0x0000E000; 132 pub const LCPRI_IMPOSSIBLE: ::PRIORITY = 0x0000F000; 133 pub const LCPRI_DISABLED: ::PRIORITY = 0x0000FFFF; 134 pub const MAX_LCPRI: ::PRIORITY = 0x0000FFFF; 135