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 148 // 149 // NtInitializeRegistry Flags 150 // 151 #define CM_BOOT_FLAG_SMSS 0x0000 152 #define CM_BOOT_FLAG_SETUP 0x0001 153 #define CM_BOOT_FLAG_ACCEPTED 0x0002 154 #define CM_BOOT_FLAG_MAX (CM_BOOT_FLAG_ACCEPTED + 999) 155 156 #ifdef NTOS_MODE_USER 157 158 // 159 // Information Classes for NtQueryKey 160 // 161 typedef enum _KEY_INFORMATION_CLASS 162 { 163 KeyBasicInformation, 164 KeyNodeInformation, 165 KeyFullInformation, 166 KeyNameInformation, 167 KeyCachedInformation, 168 KeyFlagsInformation, 169 KeyVirtualizationInformation, 170 KeyHandleTagsInformation, 171 MaxKeyInfoClass 172 } KEY_INFORMATION_CLASS; 173 174 typedef enum _KEY_VALUE_INFORMATION_CLASS 175 { 176 KeyValueBasicInformation, 177 KeyValueFullInformation, 178 KeyValuePartialInformation, 179 KeyValueFullInformationAlign64, 180 KeyValuePartialInformationAlign64, 181 MaxKeyValueInfoClass 182 } KEY_VALUE_INFORMATION_CLASS; 183 184 typedef enum _KEY_SET_INFORMATION_CLASS 185 { 186 KeyWriteTimeInformation, 187 KeyWow64FlagsInformation, 188 KeyControlFlagsInformation, 189 KeySetVirtualizationInformation, 190 KeySetDebugInformation, 191 KeySetHandleTagsInformation, 192 MaxKeySetInfoClass 193 } KEY_SET_INFORMATION_CLASS; 194 195 #endif 196 197 // 198 // Plag and Play Classes 199 // 200 typedef enum _PLUGPLAY_CONTROL_CLASS 201 { 202 PlugPlayControlEnumerateDevice, 203 PlugPlayControlRegisterNewDevice, 204 PlugPlayControlDeregisterDevice, 205 PlugPlayControlInitializeDevice, 206 PlugPlayControlStartDevice, 207 PlugPlayControlUnlockDevice, 208 PlugPlayControlQueryAndRemoveDevice, 209 PlugPlayControlUserResponse, 210 PlugPlayControlGenerateLegacyDevice, 211 PlugPlayControlGetInterfaceDeviceList, 212 PlugPlayControlProperty, 213 PlugPlayControlDeviceClassAssociation, 214 PlugPlayControlGetRelatedDevice, 215 PlugPlayControlGetInterfaceDeviceAlias, 216 PlugPlayControlDeviceStatus, 217 PlugPlayControlGetDeviceDepth, 218 PlugPlayControlQueryDeviceRelations, 219 PlugPlayControlTargetDeviceRelation, 220 PlugPlayControlQueryConflictList, 221 PlugPlayControlRetrieveDock, 222 PlugPlayControlResetDevice, 223 PlugPlayControlHaltDevice, 224 PlugPlayControlGetBlockedDriverList, 225 MaxPlugPlayControl 226 } PLUGPLAY_CONTROL_CLASS; 227 228 typedef enum _PLUGPLAY_BUS_CLASS 229 { 230 SystemBus, 231 PlugPlayVirtualBus, 232 MaxPlugPlayBusClass 233 } PLUGPLAY_BUS_CLASS, *PPLUGPLAY_BUS_CLASS; 234 235 // 236 // Plag and Play Bus Types 237 // 238 typedef enum _PLUGPLAY_VIRTUAL_BUS_TYPE 239 { 240 Root, 241 MaxPlugPlayVirtualBusType 242 } PLUGPLAY_VIRTUAL_BUS_TYPE, *PPLUGPLAY_VIRTUAL_BUS_TYPE; 243 244 // 245 // Plag and Play Event Categories 246 // 247 typedef enum _PLUGPLAY_EVENT_CATEGORY 248 { 249 HardwareProfileChangeEvent, 250 TargetDeviceChangeEvent, 251 DeviceClassChangeEvent, 252 CustomDeviceEvent, 253 DeviceInstallEvent, 254 DeviceArrivalEvent, 255 PowerEvent, 256 VetoEvent, 257 BlockedDriverEvent, 258 MaxPlugEventCategory 259 } PLUGPLAY_EVENT_CATEGORY; 260 261 #ifdef NTOS_MODE_USER 262 263 // 264 // Information Structures for NtQueryKeyInformation 265 // 266 typedef struct _KEY_WRITE_TIME_INFORMATION 267 { 268 LARGE_INTEGER LastWriteTime; 269 } KEY_WRITE_TIME_INFORMATION, *PKEY_WRITE_TIME_INFORMATION; 270 271 typedef struct _KEY_WOW64_FLAGS_INFORMATION 272 { 273 ULONG UserFlags; 274 } KEY_WOW64_FLAGS_INFORMATION, *PKEY_WOW64_FLAGS_INFORMATION; 275 276 typedef struct _KEY_USER_FLAGS_INFORMATION 277 { 278 ULONG UserFlags; 279 } KEY_USER_FLAGS_INFORMATION, *PKEY_USER_FLAGS_INFORMATION; 280 281 typedef struct _KEY_HANDLE_TAGS_INFORMATION 282 { 283 ULONG HandleTags; 284 } KEY_HANDLE_TAGS_INFORMATION, *PKEY_HANDLE_TAGS_INFORMATION; 285 286 typedef struct _KEY_CONTROL_FLAGS_INFORMATION 287 { 288 ULONG ControlFlags; 289 } KEY_CONTROL_FLAGS_INFORMATION, *PKEY_CONTROL_FLAGS_INFORMATION; 290 291 typedef struct _KEY_VIRTUALIZATION_INFORMATION 292 { 293 ULONG VirtualizationCandidate:1; 294 ULONG VirtualizationEnabled:1; 295 ULONG VirtualTarget:1; 296 ULONG VirtualStore:1; 297 ULONG VirtualSource:1; 298 ULONG Reserved:27; 299 } KEY_VIRTUALIZATION_INFORMATION, *PKEY_VIRTUALIZATION_INFORMATION; 300 301 typedef struct _KEY_SET_VIRTUALIZATION_INFORMATION 302 { 303 ULONG VirtualTarget:1; 304 ULONG VirtualStore:1; 305 ULONG VirtualSource:1; 306 ULONG Reserved:29; 307 } KEY_SET_VIRTUALIZATION_INFORMATION, *PKEY_SET_VIRTUALIZATION_INFORMATION; 308 309 310 typedef struct _KEY_FULL_INFORMATION 311 { 312 LARGE_INTEGER LastWriteTime; 313 ULONG TitleIndex; 314 ULONG ClassOffset; 315 ULONG ClassLength; 316 ULONG SubKeys; 317 ULONG MaxNameLen; 318 ULONG MaxClassLen; 319 ULONG Values; 320 ULONG MaxValueNameLen; 321 ULONG MaxValueDataLen; 322 WCHAR Class[1]; 323 } KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION; 324 325 typedef struct _KEY_NAME_INFORMATION 326 { 327 ULONG NameLength; 328 WCHAR Name[1]; 329 } KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION; 330 331 332 typedef struct _KEY_NODE_INFORMATION 333 { 334 LARGE_INTEGER LastWriteTime; 335 ULONG TitleIndex; 336 ULONG ClassOffset; 337 ULONG ClassLength; 338 ULONG NameLength; 339 WCHAR Name[1]; 340 } KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION; 341 342 typedef struct _KEY_VALUE_ENTRY 343 { 344 PUNICODE_STRING ValueName; 345 ULONG DataLength; 346 ULONG DataOffset; 347 ULONG Type; 348 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY; 349 350 typedef struct _KEY_VALUE_PARTIAL_INFORMATION 351 { 352 ULONG TitleIndex; 353 ULONG Type; 354 ULONG DataLength; 355 UCHAR Data[1]; 356 } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION; 357 358 typedef struct _KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 359 { 360 ULONG Type; 361 ULONG DataLength; 362 UCHAR Data[1]; 363 } KEY_VALUE_PARTIAL_INFORMATION_ALIGN64, *PKEY_VALUE_PARTIAL_INFORMATION_ALIGN64; 364 365 typedef struct _KEY_VALUE_BASIC_INFORMATION 366 { 367 ULONG TitleIndex; 368 ULONG Type; 369 ULONG NameLength; 370 WCHAR Name[1]; 371 } KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION; 372 373 typedef struct _KEY_VALUE_FULL_INFORMATION 374 { 375 ULONG TitleIndex; 376 ULONG Type; 377 ULONG DataOffset; 378 ULONG DataLength; 379 ULONG NameLength; 380 WCHAR Name[1]; 381 } KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION; 382 383 typedef struct _KEY_BASIC_INFORMATION 384 { 385 LARGE_INTEGER LastWriteTime; 386 ULONG TitleIndex; 387 ULONG NameLength; 388 WCHAR Name[1]; 389 } KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION; 390 391 #endif 392 393 // 394 // Plug and Play Event Block 395 // 396 typedef struct _PLUGPLAY_EVENT_BLOCK 397 { 398 GUID EventGuid; 399 PLUGPLAY_EVENT_CATEGORY EventCategory; 400 PULONG Result; 401 ULONG Flags; 402 ULONG TotalSize; 403 PVOID DeviceObject; 404 union 405 { 406 struct 407 { 408 GUID ClassGuid; 409 WCHAR SymbolicLinkName[ANYSIZE_ARRAY]; 410 } DeviceClass; 411 struct 412 { 413 WCHAR DeviceIds[ANYSIZE_ARRAY]; 414 } TargetDevice; 415 struct 416 { 417 WCHAR DeviceId[ANYSIZE_ARRAY]; 418 } InstallDevice; 419 struct 420 { 421 PVOID NotificationStructure; 422 WCHAR DeviceIds[ANYSIZE_ARRAY]; 423 } CustomNotification; 424 struct 425 { 426 PVOID Notification; 427 } ProfileNotification; 428 struct 429 { 430 ULONG NotificationCode; 431 ULONG NotificationData; 432 } PowerNotification; 433 struct 434 { 435 PNP_VETO_TYPE VetoType; 436 WCHAR DeviceIdVetoNameBuffer[ANYSIZE_ARRAY]; 437 } VetoNotification; 438 struct 439 { 440 GUID BlockedDriverGuid; 441 } BlockedDriverNotification; 442 }; 443 } PLUGPLAY_EVENT_BLOCK, *PPLUGPLAY_EVENT_BLOCK; 444 445 // 446 // Plug and Play Control Classes 447 // 448 449 // Class 0x00 450 typedef struct _PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA 451 { 452 UNICODE_STRING DeviceInstance; 453 ULONG Flags; 454 } PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA, *PPLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA; 455 456 // Class 0x06 457 typedef struct _PLUGPLAY_CONTROL_QUERY_REMOVE_DATA 458 { 459 UNICODE_STRING DeviceInstance; 460 ULONG Flags; 461 PNP_VETO_TYPE VetoType; 462 LPWSTR VetoName; 463 ULONG NameLength; 464 } PLUGPLAY_CONTROL_QUERY_REMOVE_DATA, *PPLUGPLAY_CONTROL_QUERY_REMOVE_DATA; 465 466 // Class 0x07 467 typedef struct _PLUGPLAY_CONTROL_USER_RESPONSE_DATA 468 { 469 ULONG Unknown1; 470 ULONG Unknown2; 471 ULONG Unknown3; 472 ULONG Unknown4; 473 } PLUGPLAY_CONTROL_USER_RESPONSE_DATA, *PPLUGPLAY_CONTROL_USER_RESPONSE_DATA; 474 475 // Class 0x09 476 typedef struct _PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA 477 { 478 UNICODE_STRING DeviceInstance; 479 LPGUID FilterGuid; 480 ULONG Flags; 481 PVOID Buffer; 482 ULONG BufferSize; 483 } PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA, *PPLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA; 484 485 //Class 0x0A 486 typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA 487 { 488 UNICODE_STRING DeviceInstance; 489 ULONG Property; 490 PVOID Buffer; 491 ULONG BufferSize; 492 } PLUGPLAY_CONTROL_PROPERTY_DATA, *PPLUGPLAY_CONTROL_PROPERTY_DATA; 493 494 // Class 0x0C 495 typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA 496 { 497 UNICODE_STRING TargetDeviceInstance; 498 ULONG Relation; 499 PWCHAR RelatedDeviceInstance; 500 ULONG RelatedDeviceInstanceLength; 501 } PLUGPLAY_CONTROL_RELATED_DEVICE_DATA, *PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA; 502 503 // Class 0x0E 504 typedef struct _PLUGPLAY_CONTOL_STATUS_DATA 505 { 506 UNICODE_STRING DeviceInstance; 507 ULONG Operation; 508 ULONG DeviceStatus; 509 ULONG DeviceProblem; 510 } PLUGPLAY_CONTROL_STATUS_DATA, *PPLUGPLAY_CONTROL_STATUS_DATA; 511 512 // Class 0x0F 513 typedef struct _PLUGPLAY_CONTROL_DEPTH_DATA 514 { 515 UNICODE_STRING DeviceInstance; 516 ULONG Depth; 517 } PLUGPLAY_CONTROL_DEPTH_DATA, *PPLUGPLAY_CONTROL_DEPTH_DATA; 518 519 // Class 0x10 520 typedef struct _PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA 521 { 522 UNICODE_STRING DeviceInstance; 523 ULONG Relations; 524 ULONG BufferSize; 525 PWCHAR Buffer; 526 } PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA, *PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA; 527 528 // Class 0x13 529 typedef struct _PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA 530 { 531 ULONG DeviceInstanceLength; 532 PWSTR DeviceInstance; 533 } PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA, *PPLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA; 534 535 // Class 0x14 536 typedef struct _PLUGPLAY_CONTROL_RESET_DEVICE_DATA 537 { 538 UNICODE_STRING DeviceInstance; 539 } PLUGPLAY_CONTROL_RESET_DEVICE_DATA, *PPLUGPLAY_CONTROL_RESET_DEVICE_DATA; 540 541 // 542 // Plug and Play Bus Type Definition 543 // 544 typedef struct _PLUGPLAY_BUS_TYPE 545 { 546 PLUGPLAY_BUS_CLASS BusClass; 547 union 548 { 549 INTERFACE_TYPE SystemBusType; 550 PLUGPLAY_VIRTUAL_BUS_TYPE PlugPlayVirtualBusType; 551 }; 552 } PLUGPLAY_BUS_TYPE, *PPLUGPLAY_BUS_TYPE; 553 554 // 555 // Plug and Play Bus Instance Definition 556 // 557 typedef struct _PLUGPLAY_BUS_INSTANCE 558 { 559 PLUGPLAY_BUS_TYPE BusType; 560 ULONG BusNumber; 561 WCHAR BusName[MAX_BUS_NAME]; 562 } PLUGPLAY_BUS_INSTANCE, *PPLUGPLAY_BUS_INSTANCE; 563 564 #ifdef NTOS_MODE_USER 565 566 // 567 // Partial Resource Descriptor and List for Hardware 568 // 569 #include <pshpack1.h> 570 typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR 571 { 572 UCHAR Type; 573 UCHAR ShareDisposition; 574 USHORT Flags; 575 union 576 { 577 struct 578 { 579 PHYSICAL_ADDRESS Start; 580 ULONG Length; 581 } Generic; 582 struct 583 { 584 PHYSICAL_ADDRESS Start; 585 ULONG Length; 586 } Port; 587 struct 588 { 589 ULONG Level; 590 ULONG Vector; 591 KAFFINITY Affinity; 592 } Interrupt; 593 #if (NTDDI_VERSION >= NTDDI_LONGHORN) 594 struct 595 { 596 union 597 { 598 struct 599 { 600 USHORT Reserved; 601 USHORT MessageCount; 602 ULONG Vector; 603 KAFFINITY Affinity; 604 } Raw; 605 struct 606 { 607 ULONG Level; 608 ULONG Vector; 609 KAFFINITY Affinity; 610 } Translated; 611 }; 612 } MessageInterrupt; 613 #endif 614 struct 615 { 616 PHYSICAL_ADDRESS Start; 617 ULONG Length; 618 } Memory; 619 struct 620 { 621 ULONG Channel; 622 ULONG Port; 623 ULONG Reserved1; 624 } Dma; 625 struct 626 { 627 ULONG Data[3]; 628 } DevicePrivate; 629 struct 630 { 631 ULONG Start; 632 ULONG Length; 633 ULONG Reserved; 634 } BusNumber; 635 struct 636 { 637 ULONG DataSize; 638 ULONG Reserved1; 639 ULONG Reserved2; 640 } DeviceSpecificData; 641 #if (NTDDI_VERSION >= NTDDI_LONGHORN) 642 struct 643 { 644 PHYSICAL_ADDRESS Start; 645 ULONG Length40; 646 } Memory40; 647 struct 648 { 649 PHYSICAL_ADDRESS Start; 650 ULONG Length48; 651 } Memory48; 652 struct 653 { 654 PHYSICAL_ADDRESS Start; 655 ULONG Length64; 656 } Memory64; 657 #endif 658 } u; 659 } CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR; 660 661 typedef struct _CM_PARTIAL_RESOURCE_LIST 662 { 663 USHORT Version; 664 USHORT Revision; 665 ULONG Count; 666 CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]; 667 } CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST; 668 669 // 670 // Full Resource Descriptor and List for Hardware 671 // 672 typedef struct _CM_FULL_RESOURCE_DESCRIPTOR 673 { 674 INTERFACE_TYPE InterfaceType; 675 ULONG BusNumber; 676 CM_PARTIAL_RESOURCE_LIST PartialResourceList; 677 } CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR; 678 679 typedef struct _CM_RESOURCE_LIST 680 { 681 ULONG Count; 682 CM_FULL_RESOURCE_DESCRIPTOR List[1]; 683 } CM_RESOURCE_LIST, *PCM_RESOURCE_LIST; 684 685 // 686 // ROM Block Structure 687 // 688 typedef struct _CM_ROM_BLOCK 689 { 690 ULONG Address; 691 ULONG Size; 692 } CM_ROM_BLOCK, *PCM_ROM_BLOCK; 693 694 // 695 // Disk/INT13 Structures 696 // 697 typedef struct _CM_INT13_DRIVE_PARAMETER 698 { 699 USHORT DriveSelect; 700 ULONG MaxCylinders; 701 USHORT SectorsPerTrack; 702 USHORT MaxHeads; 703 USHORT NumberDrives; 704 } CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER; 705 706 typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA 707 { 708 ULONG BytesPerSector; 709 ULONG NumberOfCylinders; 710 ULONG SectorsPerTrack; 711 ULONG NumberOfHeads; 712 } CM_DISK_GEOMETRY_DEVICE_DATA, *PCM_DISK_GEOMETRY_DEVICE_DATA; 713 714 #include <poppack.h> 715 716 #endif // _!NTOS_MODE_USER 717 718 #endif // _CMTYPES_H 719 720 721 722