1 /*++ NDK Version: 0098 2 3 Copyright (c) Alex Ionescu. All rights reserved. 4 5 Header Name: 6 7 cmtypes.h 8 9 Abstract: 10 11 Type definitions for the Configuration Manager. 12 13 Author: 14 15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006 16 17 --*/ 18 19 #ifndef _CMTYPES_H 20 #define _CMTYPES_H 21 22 // 23 // Dependencies 24 // 25 #include <umtypes.h> 26 #include <cfg.h> 27 #include <iotypes.h> 28 29 #define MAX_BUS_NAME 24 30 31 // 32 // PLUGPLAY_CONTROL_PROPERTY_DATA.Properties 33 // 34 #define PNP_PROPERTY_UI_NUMBER 0 35 #define PNP_PROPERTY_PHYSICAL_DEVICE_OBJECT_NAME 1 36 #define PNP_PROPERTY_BUSTYPEGUID 2 37 #define PNP_PROPERTY_LEGACYBUSTYPE 3 38 #define PNP_PROPERTY_BUSNUMBER 4 39 #define PNP_PROPERTY_POWER_DATA 5 40 #define PNP_PROPERTY_REMOVAL_POLICY 6 41 #define PNP_PROPERTY_REMOVAL_POLICY_OVERRIDE 7 42 #define PNP_PROPERTY_ADDRESS 8 43 #define PNP_PROPERTY_ENUMERATOR_NAME 9 44 #define PNP_PROPERTY_REMOVAL_POLICY_HARDWARE_DEFAULT 10 45 #define PNP_PROPERTY_INSTALL_STATE 11 46 #define PNP_PROPERTY_LOCATION_PATHS 12 47 #define PNP_PROPERTY_CONTAINERID 13 48 49 // 50 // PLUGPLAY_CONTROL_RELATED_DEVICE_DATA.Relations 51 // 52 #define PNP_GET_PARENT_DEVICE 1 53 #define PNP_GET_CHILD_DEVICE 2 54 #define PNP_GET_SIBLING_DEVICE 3 55 56 // 57 // PLUGPLAY_CONTROL_STATUS_DATA.Operation 58 // 59 #define PNP_GET_DEVICE_STATUS 0 60 #define PNP_SET_DEVICE_STATUS 1 61 #define PNP_CLEAR_DEVICE_STATUS 2 62 63 // 64 // PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA.Relations 65 // 66 #define PNP_EJECT_RELATIONS 0 67 #define PNP_REMOVAL_RELATIONS 1 68 #define PNP_POWER_RELATIONS 2 69 #define PNP_BUS_RELATIONS 3 70 71 72 #ifdef NTOS_MODE_USER 73 74 // 75 // Resource Type 76 // 77 #define CmResourceTypeNull 0 78 #define CmResourceTypePort 1 79 #define CmResourceTypeInterrupt 2 80 #define CmResourceTypeMemory 3 81 #define CmResourceTypeDma 4 82 #define CmResourceTypeDeviceSpecific 5 83 #define CmResourceTypeBusNumber 6 84 #define CmResourceTypeMemoryLarge 7 85 #define CmResourceTypeNonArbitrated 128 86 #define CmResourceTypeConfigData 128 87 #define CmResourceTypeDevicePrivate 129 88 #define CmResourceTypePcCardConfig 130 89 #define CmResourceTypeMfCardConfig 131 90 91 92 // 93 // Resource Descriptor Share Dispositions 94 // 95 typedef enum _CM_SHARE_DISPOSITION 96 { 97 CmResourceShareUndetermined, 98 CmResourceShareDeviceExclusive, 99 CmResourceShareDriverExclusive, 100 CmResourceShareShared 101 } CM_SHARE_DISPOSITION; 102 103 #endif 104 105 // 106 // Port Resource Descriptor Flags 107 // 108 #define CM_RESOURCE_PORT_MEMORY 0x0000 109 #define CM_RESOURCE_PORT_IO 0x0001 110 #define CM_RESOURCE_PORT_10_BIT_DECODE 0x0004 111 #define CM_RESOURCE_PORT_12_BIT_DECODE 0x0008 112 #define CM_RESOURCE_PORT_16_BIT_DECODE 0x0010 113 #define CM_RESOURCE_PORT_POSITIVE_DECODE 0x0020 114 #define CM_RESOURCE_PORT_PASSIVE_DECODE 0x0040 115 #define CM_RESOURCE_PORT_WINDOW_DECODE 0x0080 116 117 // 118 // Memory Resource Descriptor Flags 119 // 120 #define CM_RESOURCE_MEMORY_READ_WRITE 0x0000 121 #define CM_RESOURCE_MEMORY_READ_ONLY 0x0001 122 #define CM_RESOURCE_MEMORY_WRITE_ONLY 0x0002 123 #define CM_RESOURCE_MEMORY_PREFETCHABLE 0x0004 124 #define CM_RESOURCE_MEMORY_COMBINEDWRITE 0x0008 125 #define CM_RESOURCE_MEMORY_24 0x0010 126 #define CM_RESOURCE_MEMORY_CACHEABLE 0x0020 127 128 // 129 // DMA Resource Descriptor Flags 130 // 131 #define CM_RESOURCE_DMA_8 0x0000 132 #define CM_RESOURCE_DMA_16 0x0001 133 #define CM_RESOURCE_DMA_32 0x0002 134 #define CM_RESOURCE_DMA_8_AND_16 0x0004 135 #define CM_RESOURCE_DMA_BUS_MASTER 0x0008 136 #define CM_RESOURCE_DMA_TYPE_A 0x0010 137 #define CM_RESOURCE_DMA_TYPE_B 0x0020 138 #define CM_RESOURCE_DMA_TYPE_F 0x0040 139 140 // 141 // Interrupt Resource Descriptor Flags 142 // 143 #define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0x0000 144 #define CM_RESOURCE_INTERRUPT_LATCHED 0x0001 145 #define CM_RESOURCE_INTERRUPT_MESSAGE 0x0002 146 #define CM_RESOURCE_INTERRUPT_POLICY_INCLUDED 0x0004 147 #define CM_RESOURCE_INTERRUPT_ALLOW_RESERVED_IDT 0x0008 148 #define CM_RESOURCE_INTERRUPT_SECONDARY_INTERRUPT 0x0010 149 #define CM_RESOURCE_INTERRUPT_WAKE_HINT 0x0020 150 151 #define CM_RESOURCE_INTERRUPT_LEVEL_LATCHED_BITS 0x0001 152 153 #define CM_RESOURCE_INTERRUPT_MESSAGE_TOKEN ((ULONG)-2) 154 155 // 156 // NtInitializeRegistry Flags 157 // 158 #define CM_BOOT_FLAG_SMSS 0x0000 159 #define CM_BOOT_FLAG_SETUP 0x0001 160 #define CM_BOOT_FLAG_ACCEPTED 0x0002 161 #define CM_BOOT_FLAG_MAX (CM_BOOT_FLAG_ACCEPTED + 999) 162 163 #ifdef NTOS_MODE_USER 164 165 // 166 // Information Classes for NtQueryKey 167 // 168 typedef enum _KEY_INFORMATION_CLASS 169 { 170 KeyBasicInformation, 171 KeyNodeInformation, 172 KeyFullInformation, 173 KeyNameInformation, 174 KeyCachedInformation, 175 KeyFlagsInformation, 176 KeyVirtualizationInformation, 177 KeyHandleTagsInformation, 178 MaxKeyInfoClass 179 } KEY_INFORMATION_CLASS; 180 181 typedef enum _KEY_VALUE_INFORMATION_CLASS 182 { 183 KeyValueBasicInformation, 184 KeyValueFullInformation, 185 KeyValuePartialInformation, 186 KeyValueFullInformationAlign64, 187 KeyValuePartialInformationAlign64, 188 MaxKeyValueInfoClass 189 } KEY_VALUE_INFORMATION_CLASS; 190 191 typedef enum _KEY_SET_INFORMATION_CLASS 192 { 193 KeyWriteTimeInformation, 194 KeyWow64FlagsInformation, 195 KeyControlFlagsInformation, 196 KeySetVirtualizationInformation, 197 KeySetDebugInformation, 198 KeySetHandleTagsInformation, 199 MaxKeySetInfoClass 200 } KEY_SET_INFORMATION_CLASS; 201 202 #endif 203 204 // 205 // Plag and Play Classes 206 // 207 typedef enum _PLUGPLAY_CONTROL_CLASS 208 { 209 PlugPlayControlEnumerateDevice, 210 PlugPlayControlRegisterNewDevice, 211 PlugPlayControlDeregisterDevice, 212 PlugPlayControlInitializeDevice, 213 PlugPlayControlStartDevice, 214 PlugPlayControlUnlockDevice, 215 PlugPlayControlQueryAndRemoveDevice, 216 PlugPlayControlUserResponse, 217 PlugPlayControlGenerateLegacyDevice, 218 PlugPlayControlGetInterfaceDeviceList, 219 PlugPlayControlProperty, 220 PlugPlayControlDeviceClassAssociation, 221 PlugPlayControlGetRelatedDevice, 222 PlugPlayControlGetInterfaceDeviceAlias, 223 PlugPlayControlDeviceStatus, 224 PlugPlayControlGetDeviceDepth, 225 PlugPlayControlQueryDeviceRelations, 226 PlugPlayControlTargetDeviceRelation, 227 PlugPlayControlQueryConflictList, 228 PlugPlayControlRetrieveDock, 229 PlugPlayControlResetDevice, 230 PlugPlayControlHaltDevice, 231 PlugPlayControlGetBlockedDriverList, 232 MaxPlugPlayControl 233 } PLUGPLAY_CONTROL_CLASS; 234 235 typedef enum _PLUGPLAY_BUS_CLASS 236 { 237 SystemBus, 238 PlugPlayVirtualBus, 239 MaxPlugPlayBusClass 240 } PLUGPLAY_BUS_CLASS, *PPLUGPLAY_BUS_CLASS; 241 242 // 243 // Plag and Play Bus Types 244 // 245 typedef enum _PLUGPLAY_VIRTUAL_BUS_TYPE 246 { 247 Root, 248 MaxPlugPlayVirtualBusType 249 } PLUGPLAY_VIRTUAL_BUS_TYPE, *PPLUGPLAY_VIRTUAL_BUS_TYPE; 250 251 // 252 // Plag and Play Event Categories 253 // 254 typedef enum _PLUGPLAY_EVENT_CATEGORY 255 { 256 HardwareProfileChangeEvent, 257 TargetDeviceChangeEvent, 258 DeviceClassChangeEvent, 259 CustomDeviceEvent, 260 DeviceInstallEvent, 261 DeviceArrivalEvent, 262 PowerEvent, 263 VetoEvent, 264 BlockedDriverEvent, 265 MaxPlugEventCategory 266 } PLUGPLAY_EVENT_CATEGORY; 267 268 #ifdef NTOS_MODE_USER 269 270 // 271 // Information Structures for NtQueryKeyInformation 272 // 273 typedef struct _KEY_WRITE_TIME_INFORMATION 274 { 275 LARGE_INTEGER LastWriteTime; 276 } KEY_WRITE_TIME_INFORMATION, *PKEY_WRITE_TIME_INFORMATION; 277 278 typedef struct _KEY_WOW64_FLAGS_INFORMATION 279 { 280 ULONG UserFlags; 281 } KEY_WOW64_FLAGS_INFORMATION, *PKEY_WOW64_FLAGS_INFORMATION; 282 283 typedef struct _KEY_USER_FLAGS_INFORMATION 284 { 285 ULONG UserFlags; 286 } KEY_USER_FLAGS_INFORMATION, *PKEY_USER_FLAGS_INFORMATION; 287 288 typedef struct _KEY_HANDLE_TAGS_INFORMATION 289 { 290 ULONG HandleTags; 291 } KEY_HANDLE_TAGS_INFORMATION, *PKEY_HANDLE_TAGS_INFORMATION; 292 293 typedef struct _KEY_CONTROL_FLAGS_INFORMATION 294 { 295 ULONG ControlFlags; 296 } KEY_CONTROL_FLAGS_INFORMATION, *PKEY_CONTROL_FLAGS_INFORMATION; 297 298 typedef struct _KEY_VIRTUALIZATION_INFORMATION 299 { 300 ULONG VirtualizationCandidate:1; 301 ULONG VirtualizationEnabled:1; 302 ULONG VirtualTarget:1; 303 ULONG VirtualStore:1; 304 ULONG VirtualSource:1; 305 ULONG Reserved:27; 306 } KEY_VIRTUALIZATION_INFORMATION, *PKEY_VIRTUALIZATION_INFORMATION; 307 308 typedef struct _KEY_SET_VIRTUALIZATION_INFORMATION 309 { 310 ULONG VirtualTarget:1; 311 ULONG VirtualStore:1; 312 ULONG VirtualSource:1; 313 ULONG Reserved:29; 314 } KEY_SET_VIRTUALIZATION_INFORMATION, *PKEY_SET_VIRTUALIZATION_INFORMATION; 315 316 317 typedef struct _KEY_FULL_INFORMATION 318 { 319 LARGE_INTEGER LastWriteTime; 320 ULONG TitleIndex; 321 ULONG ClassOffset; 322 ULONG ClassLength; 323 ULONG SubKeys; 324 ULONG MaxNameLen; 325 ULONG MaxClassLen; 326 ULONG Values; 327 ULONG MaxValueNameLen; 328 ULONG MaxValueDataLen; 329 WCHAR Class[1]; 330 } KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION; 331 332 typedef struct _KEY_NAME_INFORMATION 333 { 334 ULONG NameLength; 335 WCHAR Name[1]; 336 } KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION; 337 338 339 typedef struct _KEY_NODE_INFORMATION 340 { 341 LARGE_INTEGER LastWriteTime; 342 ULONG TitleIndex; 343 ULONG ClassOffset; 344 ULONG ClassLength; 345 ULONG NameLength; 346 WCHAR Name[1]; 347 } KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION; 348 349 typedef struct _KEY_VALUE_ENTRY 350 { 351 PUNICODE_STRING ValueName; 352 ULONG DataLength; 353 ULONG DataOffset; 354 ULONG Type; 355 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY; 356 357 typedef struct _KEY_VALUE_PARTIAL_INFORMATION 358 { 359 ULONG TitleIndex; 360 ULONG Type; 361 ULONG DataLength; 362 UCHAR Data[1]; 363 } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION; 364 365 typedef struct _KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 366 { 367 ULONG Type; 368 ULONG DataLength; 369 UCHAR Data[1]; 370 } KEY_VALUE_PARTIAL_INFORMATION_ALIGN64, *PKEY_VALUE_PARTIAL_INFORMATION_ALIGN64; 371 372 typedef struct _KEY_VALUE_BASIC_INFORMATION 373 { 374 ULONG TitleIndex; 375 ULONG Type; 376 ULONG NameLength; 377 WCHAR Name[1]; 378 } KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION; 379 380 typedef struct _KEY_VALUE_FULL_INFORMATION 381 { 382 ULONG TitleIndex; 383 ULONG Type; 384 ULONG DataOffset; 385 ULONG DataLength; 386 ULONG NameLength; 387 WCHAR Name[1]; 388 } KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION; 389 390 typedef struct _KEY_BASIC_INFORMATION 391 { 392 LARGE_INTEGER LastWriteTime; 393 ULONG TitleIndex; 394 ULONG NameLength; 395 WCHAR Name[1]; 396 } KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION; 397 398 #endif 399 400 // 401 // Plug and Play Event Block 402 // 403 typedef struct _PLUGPLAY_EVENT_BLOCK 404 { 405 GUID EventGuid; 406 PLUGPLAY_EVENT_CATEGORY EventCategory; 407 PULONG Result; 408 ULONG Flags; 409 ULONG TotalSize; 410 PVOID DeviceObject; 411 union 412 { 413 struct 414 { 415 GUID ClassGuid; 416 WCHAR SymbolicLinkName[ANYSIZE_ARRAY]; 417 } DeviceClass; 418 struct 419 { 420 WCHAR DeviceIds[ANYSIZE_ARRAY]; 421 } TargetDevice; 422 struct 423 { 424 WCHAR DeviceId[ANYSIZE_ARRAY]; 425 } InstallDevice; 426 struct 427 { 428 PVOID NotificationStructure; 429 WCHAR DeviceIds[ANYSIZE_ARRAY]; 430 } CustomNotification; 431 struct 432 { 433 PVOID Notification; 434 } ProfileNotification; 435 struct 436 { 437 ULONG NotificationCode; 438 ULONG NotificationData; 439 } PowerNotification; 440 struct 441 { 442 PNP_VETO_TYPE VetoType; 443 WCHAR DeviceIdVetoNameBuffer[ANYSIZE_ARRAY]; 444 } VetoNotification; 445 struct 446 { 447 GUID BlockedDriverGuid; 448 } BlockedDriverNotification; 449 }; 450 } PLUGPLAY_EVENT_BLOCK, *PPLUGPLAY_EVENT_BLOCK; 451 452 // 453 // Plug and Play Control Classes 454 // 455 456 // Class 0x00 457 typedef struct _PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA 458 { 459 UNICODE_STRING DeviceInstance; 460 ULONG Flags; 461 } PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA, *PPLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA; 462 463 // Class 0x06 464 typedef struct _PLUGPLAY_CONTROL_QUERY_REMOVE_DATA 465 { 466 UNICODE_STRING DeviceInstance; 467 ULONG Flags; 468 PNP_VETO_TYPE VetoType; 469 LPWSTR VetoName; 470 ULONG NameLength; 471 } PLUGPLAY_CONTROL_QUERY_REMOVE_DATA, *PPLUGPLAY_CONTROL_QUERY_REMOVE_DATA; 472 473 // Class 0x07 474 typedef struct _PLUGPLAY_CONTROL_USER_RESPONSE_DATA 475 { 476 ULONG Unknown1; 477 ULONG Unknown2; 478 ULONG Unknown3; 479 ULONG Unknown4; 480 } PLUGPLAY_CONTROL_USER_RESPONSE_DATA, *PPLUGPLAY_CONTROL_USER_RESPONSE_DATA; 481 482 // Class 0x09 483 typedef struct _PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA 484 { 485 UNICODE_STRING DeviceInstance; 486 LPGUID FilterGuid; 487 ULONG Flags; 488 PVOID Buffer; 489 ULONG BufferSize; 490 } PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA, *PPLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA; 491 492 //Class 0x0A 493 typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA 494 { 495 UNICODE_STRING DeviceInstance; 496 ULONG Property; 497 PVOID Buffer; 498 ULONG BufferSize; 499 } PLUGPLAY_CONTROL_PROPERTY_DATA, *PPLUGPLAY_CONTROL_PROPERTY_DATA; 500 501 // Class 0x0C 502 typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA 503 { 504 UNICODE_STRING TargetDeviceInstance; 505 ULONG Relation; 506 PWCHAR RelatedDeviceInstance; 507 ULONG RelatedDeviceInstanceLength; 508 } PLUGPLAY_CONTROL_RELATED_DEVICE_DATA, *PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA; 509 510 // Class 0x0E 511 typedef struct _PLUGPLAY_CONTOL_STATUS_DATA 512 { 513 UNICODE_STRING DeviceInstance; 514 ULONG Operation; 515 ULONG DeviceStatus; 516 ULONG DeviceProblem; 517 } PLUGPLAY_CONTROL_STATUS_DATA, *PPLUGPLAY_CONTROL_STATUS_DATA; 518 519 // Class 0x0F 520 typedef struct _PLUGPLAY_CONTROL_DEPTH_DATA 521 { 522 UNICODE_STRING DeviceInstance; 523 ULONG Depth; 524 } PLUGPLAY_CONTROL_DEPTH_DATA, *PPLUGPLAY_CONTROL_DEPTH_DATA; 525 526 // Class 0x10 527 typedef struct _PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA 528 { 529 UNICODE_STRING DeviceInstance; 530 ULONG Relations; 531 ULONG BufferSize; 532 PWCHAR Buffer; 533 } PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA, *PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA; 534 535 // Class 0x13 536 typedef struct _PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA 537 { 538 ULONG DeviceInstanceLength; 539 PWSTR DeviceInstance; 540 } PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA, *PPLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA; 541 542 // Class 0x14 543 typedef struct _PLUGPLAY_CONTROL_RESET_DEVICE_DATA 544 { 545 UNICODE_STRING DeviceInstance; 546 } PLUGPLAY_CONTROL_RESET_DEVICE_DATA, *PPLUGPLAY_CONTROL_RESET_DEVICE_DATA; 547 548 // 549 // Plug and Play Bus Type Definition 550 // 551 typedef struct _PLUGPLAY_BUS_TYPE 552 { 553 PLUGPLAY_BUS_CLASS BusClass; 554 union 555 { 556 INTERFACE_TYPE SystemBusType; 557 PLUGPLAY_VIRTUAL_BUS_TYPE PlugPlayVirtualBusType; 558 }; 559 } PLUGPLAY_BUS_TYPE, *PPLUGPLAY_BUS_TYPE; 560 561 // 562 // Plug and Play Bus Instance Definition 563 // 564 typedef struct _PLUGPLAY_BUS_INSTANCE 565 { 566 PLUGPLAY_BUS_TYPE BusType; 567 ULONG BusNumber; 568 WCHAR BusName[MAX_BUS_NAME]; 569 } PLUGPLAY_BUS_INSTANCE, *PPLUGPLAY_BUS_INSTANCE; 570 571 #ifdef NTOS_MODE_USER 572 573 // 574 // Partial Resource Descriptor and List for Hardware 575 // 576 #include <pshpack1.h> 577 typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR 578 { 579 UCHAR Type; 580 UCHAR ShareDisposition; 581 USHORT Flags; 582 union 583 { 584 struct 585 { 586 PHYSICAL_ADDRESS Start; 587 ULONG Length; 588 } Generic; 589 struct 590 { 591 PHYSICAL_ADDRESS Start; 592 ULONG Length; 593 } Port; 594 struct 595 { 596 ULONG Level; 597 ULONG Vector; 598 KAFFINITY Affinity; 599 } Interrupt; 600 #if (NTDDI_VERSION >= NTDDI_LONGHORN) 601 struct 602 { 603 union 604 { 605 struct 606 { 607 USHORT Reserved; 608 USHORT MessageCount; 609 ULONG Vector; 610 KAFFINITY Affinity; 611 } Raw; 612 struct 613 { 614 ULONG Level; 615 ULONG Vector; 616 KAFFINITY Affinity; 617 } Translated; 618 }; 619 } MessageInterrupt; 620 #endif 621 struct 622 { 623 PHYSICAL_ADDRESS Start; 624 ULONG Length; 625 } Memory; 626 struct 627 { 628 ULONG Channel; 629 ULONG Port; 630 ULONG Reserved1; 631 } Dma; 632 struct 633 { 634 ULONG Data[3]; 635 } DevicePrivate; 636 struct 637 { 638 ULONG Start; 639 ULONG Length; 640 ULONG Reserved; 641 } BusNumber; 642 struct 643 { 644 ULONG DataSize; 645 ULONG Reserved1; 646 ULONG Reserved2; 647 } DeviceSpecificData; 648 #if (NTDDI_VERSION >= NTDDI_LONGHORN) 649 struct 650 { 651 PHYSICAL_ADDRESS Start; 652 ULONG Length40; 653 } Memory40; 654 struct 655 { 656 PHYSICAL_ADDRESS Start; 657 ULONG Length48; 658 } Memory48; 659 struct 660 { 661 PHYSICAL_ADDRESS Start; 662 ULONG Length64; 663 } Memory64; 664 #endif 665 } u; 666 } CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR; 667 668 typedef struct _CM_PARTIAL_RESOURCE_LIST 669 { 670 USHORT Version; 671 USHORT Revision; 672 ULONG Count; 673 CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]; 674 } CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST; 675 676 // 677 // Full Resource Descriptor and List for Hardware 678 // 679 typedef struct _CM_FULL_RESOURCE_DESCRIPTOR 680 { 681 INTERFACE_TYPE InterfaceType; 682 ULONG BusNumber; 683 CM_PARTIAL_RESOURCE_LIST PartialResourceList; 684 } CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR; 685 686 typedef struct _CM_RESOURCE_LIST 687 { 688 ULONG Count; 689 CM_FULL_RESOURCE_DESCRIPTOR List[1]; 690 } CM_RESOURCE_LIST, *PCM_RESOURCE_LIST; 691 692 // 693 // ROM Block Structure 694 // 695 typedef struct _CM_ROM_BLOCK 696 { 697 ULONG Address; 698 ULONG Size; 699 } CM_ROM_BLOCK, *PCM_ROM_BLOCK; 700 701 // 702 // Disk/INT13 Structures 703 // 704 typedef struct _CM_INT13_DRIVE_PARAMETER 705 { 706 USHORT DriveSelect; 707 ULONG MaxCylinders; 708 USHORT SectorsPerTrack; 709 USHORT MaxHeads; 710 USHORT NumberDrives; 711 } CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER; 712 713 typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA 714 { 715 ULONG BytesPerSector; 716 ULONG NumberOfCylinders; 717 ULONG SectorsPerTrack; 718 ULONG NumberOfHeads; 719 } CM_DISK_GEOMETRY_DEVICE_DATA, *PCM_DISK_GEOMETRY_DEVICE_DATA; 720 721 #include <poppack.h> 722 723 #endif // _!NTOS_MODE_USER 724 725 #endif // _CMTYPES_H 726 727 728 729