cfg.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _CFG_INCLUDED_
  7. #define _CFG_INCLUDED_
  8. #include <winapifamily.h>
  9. #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  10. typedef enum _PNP_VETO_TYPE {
  11. PNP_VetoTypeUnknown,
  12. PNP_VetoLegacyDevice,
  13. PNP_VetoPendingClose,
  14. PNP_VetoWindowsApp,
  15. PNP_VetoWindowsService,
  16. PNP_VetoOutstandingOpen,
  17. PNP_VetoDevice,
  18. PNP_VetoDriver,
  19. PNP_VetoIllegalDeviceRequest,
  20. PNP_VetoInsufficientPower,
  21. PNP_VetoNonDisableable,
  22. PNP_VetoLegacyDriver,
  23. PNP_VetoInsufficientRights,
  24. PNP_VetoAlreadyRemoved
  25. } PNP_VETO_TYPE, *PPNP_VETO_TYPE;
  26. #define CM_PROB_NOT_CONFIGURED (0x00000001)
  27. #define CM_PROB_DEVLOADER_FAILED (0x00000002)
  28. #define CM_PROB_OUT_OF_MEMORY (0x00000003)
  29. #define CM_PROB_ENTRY_IS_WRONG_TYPE (0x00000004)
  30. #define CM_PROB_LACKED_ARBITRATOR (0x00000005)
  31. #define CM_PROB_BOOT_CONFIG_CONFLICT (0x00000006)
  32. #define CM_PROB_FAILED_FILTER (0x00000007)
  33. #define CM_PROB_DEVLOADER_NOT_FOUND (0x00000008)
  34. #define CM_PROB_INVALID_DATA (0x00000009)
  35. #define CM_PROB_FAILED_START (0x0000000A)
  36. #define CM_PROB_LIAR (0x0000000B)
  37. #define CM_PROB_NORMAL_CONFLICT (0x0000000C)
  38. #define CM_PROB_NOT_VERIFIED (0x0000000D)
  39. #define CM_PROB_NEED_RESTART (0x0000000E)
  40. #define CM_PROB_REENUMERATION (0x0000000F)
  41. #define CM_PROB_PARTIAL_LOG_CONF (0x00000010)
  42. #define CM_PROB_UNKNOWN_RESOURCE (0x00000011)
  43. #define CM_PROB_REINSTALL (0x00000012)
  44. #define CM_PROB_REGISTRY (0x00000013)
  45. #define CM_PROB_VXDLDR (0x00000014)
  46. #define CM_PROB_WILL_BE_REMOVED (0x00000015)
  47. #define CM_PROB_DISABLED (0x00000016)
  48. #define CM_PROB_DEVLOADER_NOT_READY (0x00000017)
  49. #define CM_PROB_DEVICE_NOT_THERE (0x00000018)
  50. #define CM_PROB_MOVED (0x00000019)
  51. #define CM_PROB_TOO_EARLY (0x0000001A)
  52. #define CM_PROB_NO_VALID_LOG_CONF (0x0000001B)
  53. #define CM_PROB_FAILED_INSTALL (0x0000001C)
  54. #define CM_PROB_HARDWARE_DISABLED (0x0000001D)
  55. #define CM_PROB_CANT_SHARE_IRQ (0x0000001E)
  56. #define CM_PROB_FAILED_ADD (0x0000001F)
  57. #define CM_PROB_DISABLED_SERVICE (0x00000020)
  58. #define CM_PROB_TRANSLATION_FAILED (0x00000021)
  59. #define CM_PROB_NO_SOFTCONFIG (0x00000022)
  60. #define CM_PROB_BIOS_TABLE (0x00000023)
  61. #define CM_PROB_IRQ_TRANSLATION_FAILED (0x00000024)
  62. #define CM_PROB_FAILED_DRIVER_ENTRY (0x00000025)
  63. #define CM_PROB_DRIVER_FAILED_PRIOR_UNLOAD (0x00000026)
  64. #define CM_PROB_DRIVER_FAILED_LOAD (0x00000027)
  65. #define CM_PROB_DRIVER_SERVICE_KEY_INVALID (0x00000028)
  66. #define CM_PROB_LEGACY_SERVICE_NO_DEVICES (0x00000029)
  67. #define CM_PROB_DUPLICATE_DEVICE (0x0000002A)
  68. #define CM_PROB_FAILED_POST_START (0x0000002B)
  69. #define CM_PROB_HALTED (0x0000002C)
  70. #define CM_PROB_PHANTOM (0x0000002D)
  71. #define CM_PROB_SYSTEM_SHUTDOWN (0x0000002E)
  72. #define CM_PROB_HELD_FOR_EJECT (0x0000002F)
  73. #define CM_PROB_DRIVER_BLOCKED (0x00000030)
  74. #define CM_PROB_REGISTRY_TOO_LARGE (0x00000031)
  75. #define CM_PROB_SETPROPERTIES_FAILED (0x00000032)
  76. #define CM_PROB_WAITING_ON_DEPENDENCY (0x00000033)
  77. #define CM_PROB_UNSIGNED_DRIVER (0x00000034)
  78. #define CM_PROB_USED_BY_DEBUGGER (0x00000035)
  79. #define CM_PROB_DEVICE_RESET (0x00000036)
  80. #define CM_PROB_CONSOLE_LOCKED (0x00000037)
  81. #define CM_PROB_NEED_CLASS_CONFIG (0x00000038)
  82. #define CM_PROB_GUEST_ASSIGNMENT_FAILED (0x00000039)
  83. #define CM_GLOBAL_STATE_CAN_DO_UI (0x00000001)
  84. #define CM_GLOBAL_STATE_ON_BIG_STACK (0x00000002)
  85. #define CM_GLOBAL_STATE_SERVICES_AVAILABLE (0x00000004)
  86. #define CM_GLOBAL_STATE_SHUTTING_DOWN (0x00000008)
  87. #define CM_GLOBAL_STATE_DETECTION_PENDING (0x00000010)
  88. #if WINVER >= _WIN32_WINNT_WIN7
  89. #define CM_GLOBAL_STATE_REBOOT_REQUIRED (0x00000020)
  90. #endif
  91. #define NUM_CM_PROB_V1 (0x00000025)
  92. #define NUM_CM_PROB_V2 (0x00000032)
  93. #define NUM_CM_PROB_V3 (0x00000033)
  94. #define NUM_CM_PROB_V4 (0x00000034)
  95. #define NUM_CM_PROB_V5 (0x00000035)
  96. #define NUM_CM_PROB_V6 (0x00000036)
  97. #define NUM_CM_PROB_V7 (0x00000037)
  98. #define NUM_CM_PROB_V8 (0x00000039)
  99. #define NUM_CM_PROB_V9 (0x0000003A)
  100. #if NTDDI_VERSION >= NTDDI_WIN10_VB
  101. #define NUM_CM_PROB NUM_CM_PROB_V9
  102. #elif NTDDI_VERSION >= NTDDI_WIN10_RS3
  103. #define NUM_CM_PROB NUM_CM_PROB_V8
  104. #elif NTDDI_VERSION >= NTDDI_WINTHRESHOLD
  105. #define NUM_CM_PROB NUM_CM_PROB_V7
  106. #elif NTDDI_VERSION >= NTDDI_WINBLUE
  107. #define NUM_CM_PROB NUM_CM_PROB_V6
  108. #elif NTDDI_VERSION >= NTDDI_WIN7
  109. #define NUM_CM_PROB NUM_CM_PROB_V5
  110. #elif NTDDI_VERSION >= NTDDI_WS08
  111. #define NUM_CM_PROB NUM_CM_PROB_V4
  112. #elif NTDDI_VERSION >= NTDDI_WS03
  113. #define NUM_CM_PROB NUM_CM_PROB_V3
  114. #elif NTDDI_VERSION >= NTDDI_WINXP
  115. #define NUM_CM_PROB NUM_CM_PROB_V2
  116. #elif NTDDI_VERSION >= NTDDI_WIN2K
  117. #define NUM_CM_PROB NUM_CM_PROB_V1
  118. #endif
  119. #define DN_ROOT_ENUMERATED (0x00000001)
  120. #define DN_DRIVER_LOADED (0x00000002)
  121. #define DN_ENUM_LOADED (0x00000004)
  122. #define DN_STARTED (0x00000008)
  123. #define DN_MANUAL (0x00000010)
  124. #define DN_NEED_TO_ENUM (0x00000020)
  125. #define DN_NOT_FIRST_TIME (0x00000040)
  126. #define DN_HARDWARE_ENUM (0x00000080)
  127. #define DN_LIAR (0x00000100)
  128. #define DN_HAS_MARK (0x00000200)
  129. #define DN_HAS_PROBLEM (0x00000400)
  130. #define DN_FILTERED (0x00000800)
  131. #define DN_MOVED (0x00001000)
  132. #define DN_DISABLEABLE (0x00002000)
  133. #define DN_REMOVABLE (0x00004000)
  134. #define DN_PRIVATE_PROBLEM (0x00008000)
  135. #define DN_MF_PARENT (0x00010000)
  136. #define DN_MF_CHILD (0x00020000)
  137. #define DN_WILL_BE_REMOVED (0x00040000)
  138. #define DN_NOT_FIRST_TIMEE 0x00080000
  139. #define DN_STOP_FREE_RES 0x00100000
  140. #define DN_REBAL_CANDIDATE 0x00200000
  141. #define DN_BAD_PARTIAL 0x00400000
  142. #define DN_NT_ENUMERATOR 0x00800000
  143. #define DN_NT_DRIVER 0x01000000
  144. #define DN_NEEDS_LOCKING 0x02000000
  145. #define DN_ARM_WAKEUP 0x04000000
  146. #define DN_APM_ENUMERATOR 0x08000000
  147. #define DN_APM_DRIVER 0x10000000
  148. #define DN_SILENT_INSTALL 0x20000000
  149. #define DN_NO_SHOW_IN_DM 0x40000000
  150. #define DN_BOOT_LOG_PROB 0x80000000
  151. #if NTDDI_VERSION >= NTDDI_WIN2K
  152. #define DN_NEED_RESTART DN_LIAR
  153. #endif
  154. #if NTDDI_VERSION >= NTDDI_WINXP
  155. #define DN_DRIVER_BLOCKED DN_NOT_FIRST_TIME
  156. #define DN_LEGACY_DRIVER DN_MOVED
  157. #define DN_CHILD_WITH_INVALID_ID DN_HAS_MARK
  158. #endif
  159. #if NTDDI_VERSION >= NTDDI_WIN8
  160. #define DN_DEVICE_DISCONNECTED DN_NEEDS_LOCKING
  161. #endif
  162. #if NTDDI_VERSION >= NTDDI_WIN10
  163. #define DN_QUERY_REMOVE_PENDING DN_MF_PARENT
  164. #define DN_QUERY_REMOVE_ACTIVE DN_MF_CHILD
  165. #endif
  166. #define DN_CHANGEABLE_FLAGS (DN_NOT_FIRST_TIME+ DN_HARDWARE_ENUM+ DN_HAS_MARK+ DN_DISABLEABLE+ DN_REMOVABLE+ DN_MF_CHILD+ DN_MF_PARENT+ DN_NOT_FIRST_TIMEE+ DN_STOP_FREE_RES+ DN_REBAL_CANDIDATE+ DN_NT_ENUMERATOR+ DN_NT_DRIVER+ DN_SILENT_INSTALL+ DN_NO_SHOW_IN_DM)
  167. #define LCPRI_FORCECONFIG (0x00000000)
  168. #define LCPRI_BOOTCONFIG (0x00000001)
  169. #define LCPRI_DESIRED (0x00002000)
  170. #define LCPRI_NORMAL (0x00003000)
  171. #define LCPRI_LASTBESTCONFIG (0x00003FFF)
  172. #define LCPRI_SUBOPTIMAL (0x00005000)
  173. #define LCPRI_LASTSOFTCONFIG (0x00007FFF)
  174. #define LCPRI_RESTART (0x00008000)
  175. #define LCPRI_REBOOT (0x00009000)
  176. #define LCPRI_POWEROFF (0x0000A000)
  177. #define LCPRI_HARDRECONFIG (0x0000C000)
  178. #define LCPRI_HARDWIRED (0x0000E000)
  179. #define LCPRI_IMPOSSIBLE (0x0000F000)
  180. #define LCPRI_DISABLED (0x0000FFFF)
  181. #define MAX_LCPRI (0x0000FFFF)
  182. #define CM_DEVICE_PANEL_SIDE_UNKNOWN (0x00000000)
  183. #define CM_DEVICE_PANEL_SIDE_TOP (0x00000001)
  184. #define CM_DEVICE_PANEL_SIDE_BOTTOM (0x00000002)
  185. #define CM_DEVICE_PANEL_SIDE_LEFT (0x00000003)
  186. #define CM_DEVICE_PANEL_SIDE_RIGHT (0x00000004)
  187. #define CM_DEVICE_PANEL_SIDE_FRONT (0x00000005)
  188. #define CM_DEVICE_PANEL_SIDE_BACK (0x00000006)
  189. #define CM_DEVICE_PANEL_EDGE_UNKNOWN (0x00000000)
  190. #define CM_DEVICE_PANEL_EDGE_TOP (0x00000001)
  191. #define CM_DEVICE_PANEL_EDGE_BOTTOM (0x00000002)
  192. #define CM_DEVICE_PANEL_EDGE_LEFT (0x00000003)
  193. #define CM_DEVICE_PANEL_EDGE_RIGHT (0x00000004)
  194. #define CM_DEVICE_PANEL_SHAPE_UNKNOWN (0x00000000)
  195. #define CM_DEVICE_PANEL_SHAPE_RECTANGLE (0x00000001)
  196. #define CM_DEVICE_PANEL_SHAPE_OVAL (0x00000002)
  197. #define CM_DEVICE_PANEL_ORIENTATION_HORIZONTAL (0x00000000)
  198. #define CM_DEVICE_PANEL_ORIENTATION_VERTICAL (0x00000001)
  199. #define CM_DEVICE_PANEL_JOINT_TYPE_UNKNOWN (0x00000000)
  200. #define CM_DEVICE_PANEL_JOINT_TYPE_PLANAR (0x00000001)
  201. #define CM_DEVICE_PANEL_JOINT_TYPE_HINGE (0x00000002)
  202. #define CM_DEVICE_PANEL_JOINT_TYPE_PIVOT (0x00000003)
  203. #define CM_DEVICE_PANEL_JOINT_TYPE_SWIVEL (0x00000004)
  204. #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
  205. #endif /* _CFG_INCLUDED_ */