1 #ifndef _NTTMAPI_ 2 #define _NTTMAPI_ 3 4 #include <ktmtypes.h> 5 6 #define TRANSACTIONMANAGER_QUERY_INFORMATION (0x0001) 7 #define TRANSACTIONMANAGER_SET_INFORMATION (0x0002) 8 #define TRANSACTIONMANAGER_RECOVER (0x0004) 9 #define TRANSACTIONMANAGER_RENAME (0x0008) 10 #define TRANSACTIONMANAGER_CREATE_RM (0x0010) 11 #define TRANSACTIONMANAGER_BIND_TRANSACTION (0x0020) 12 13 #define TRANSACTIONMANAGER_GENERIC_READ (STANDARD_RIGHTS_READ |\ 14 TRANSACTIONMANAGER_QUERY_INFORMATION) 15 16 #define TRANSACTIONMANAGER_GENERIC_WRITE (STANDARD_RIGHTS_WRITE |\ 17 TRANSACTIONMANAGER_SET_INFORMATION |\ 18 TRANSACTIONMANAGER_RECOVER |\ 19 TRANSACTIONMANAGER_RENAME |\ 20 TRANSACTIONMANAGER_CREATE_RM) 21 22 #define TRANSACTIONMANAGER_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE) 23 24 #define TRANSACTIONMANAGER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\ 25 TRANSACTIONMANAGER_GENERIC_READ |\ 26 TRANSACTIONMANAGER_GENERIC_WRITE |\ 27 TRANSACTIONMANAGER_GENERIC_EXECUTE |\ 28 TRANSACTIONMANAGER_BIND_TRANSACTION) 29 30 #define TRANSACTION_QUERY_INFORMATION (0x0001) 31 #define TRANSACTION_SET_INFORMATION (0x0002) 32 #define TRANSACTION_ENLIST (0x0004) 33 #define TRANSACTION_COMMIT (0x0008) 34 #define TRANSACTION_ROLLBACK (0x0010) 35 #define TRANSACTION_PROPAGATE (0x0020) 36 #define TRANSACTION_RIGHT_RESERVED1 (0x0040) 37 38 #define TRANSACTION_GENERIC_READ (STANDARD_RIGHTS_READ |\ 39 TRANSACTION_QUERY_INFORMATION |\ 40 SYNCHRONIZE) 41 42 #define TRANSACTION_GENERIC_WRITE (STANDARD_RIGHTS_WRITE |\ 43 TRANSACTION_SET_INFORMATION |\ 44 TRANSACTION_COMMIT |\ 45 TRANSACTION_ENLIST |\ 46 TRANSACTION_ROLLBACK |\ 47 TRANSACTION_PROPAGATE |\ 48 SYNCHRONIZE) 49 50 #define TRANSACTION_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE |\ 51 TRANSACTION_COMMIT |\ 52 TRANSACTION_ROLLBACK |\ 53 SYNCHRONIZE) 54 55 #define TRANSACTION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\ 56 TRANSACTION_GENERIC_READ |\ 57 TRANSACTION_GENERIC_WRITE |\ 58 TRANSACTION_GENERIC_EXECUTE) 59 60 #define TRANSACTION_RESOURCE_MANAGER_RIGHTS (TRANSACTION_GENERIC_READ |\ 61 STANDARD_RIGHTS_WRITE |\ 62 TRANSACTION_SET_INFORMATION |\ 63 TRANSACTION_ENLIST |\ 64 TRANSACTION_ROLLBACK |\ 65 TRANSACTION_PROPAGATE |\ 66 SYNCHRONIZE) 67 68 #define RESOURCEMANAGER_QUERY_INFORMATION (0x0001) 69 #define RESOURCEMANAGER_SET_INFORMATION (0x0002) 70 #define RESOURCEMANAGER_RECOVER (0x0004) 71 #define RESOURCEMANAGER_ENLIST (0x0008) 72 #define RESOURCEMANAGER_GET_NOTIFICATION (0x0010) 73 #define RESOURCEMANAGER_REGISTER_PROTOCOL (0x0020) 74 #define RESOURCEMANAGER_COMPLETE_PROPAGATION (0x0040) 75 76 #define RESOURCEMANAGER_GENERIC_READ (STANDARD_RIGHTS_READ |\ 77 RESOURCEMANAGER_QUERY_INFORMATION |\ 78 SYNCHRONIZE) 79 80 #define RESOURCEMANAGER_GENERIC_WRITE (STANDARD_RIGHTS_WRITE |\ 81 RESOURCEMANAGER_SET_INFORMATION |\ 82 RESOURCEMANAGER_RECOVER |\ 83 RESOURCEMANAGER_ENLIST |\ 84 RESOURCEMANAGER_GET_NOTIFICATION |\ 85 RESOURCEMANAGER_REGISTER_PROTOCOL |\ 86 RESOURCEMANAGER_COMPLETE_PROPAGATION |\ 87 SYNCHRONIZE) 88 89 #define RESOURCEMANAGER_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE |\ 90 RESOURCEMANAGER_RECOVER |\ 91 RESOURCEMANAGER_ENLIST |\ 92 RESOURCEMANAGER_GET_NOTIFICATION |\ 93 RESOURCEMANAGER_COMPLETE_PROPAGATION |\ 94 SYNCHRONIZE) 95 96 #define RESOURCEMANAGER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\ 97 RESOURCEMANAGER_GENERIC_READ |\ 98 RESOURCEMANAGER_GENERIC_WRITE |\ 99 RESOURCEMANAGER_GENERIC_EXECUTE) 100 101 #define ENLISTMENT_QUERY_INFORMATION (0x0001) 102 #define ENLISTMENT_SET_INFORMATION (0x0002) 103 #define ENLISTMENT_RECOVER (0x0004) 104 #define ENLISTMENT_SUBORDINATE_RIGHTS (0x0008) 105 #define ENLISTMENT_SUPERIOR_RIGHTS (0x0010) 106 107 #define ENLISTMENT_GENERIC_READ (STANDARD_RIGHTS_READ |\ 108 ENLISTMENT_QUERY_INFORMATION) 109 110 #define ENLISTMENT_GENERIC_WRITE (STANDARD_RIGHTS_WRITE |\ 111 ENLISTMENT_SET_INFORMATION |\ 112 ENLISTMENT_RECOVER |\ 113 ENLISTMENT_SUBORDINATE_RIGHTS |\ 114 ENLISTMENT_SUPERIOR_RIGHTS) 115 116 #define ENLISTMENT_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE |\ 117 ENLISTMENT_RECOVER |\ 118 ENLISTMENT_SUBORDINATE_RIGHTS |\ 119 ENLISTMENT_SUPERIOR_RIGHTS) 120 121 #define ENLISTMENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\ 122 ENLISTMENT_GENERIC_READ |\ 123 ENLISTMENT_GENERIC_WRITE |\ 124 ENLISTMENT_GENERIC_EXECUTE) 125 126 typedef enum _TRANSACTION_OUTCOME { 127 TransactionOutcomeUndetermined = 1, 128 TransactionOutcomeCommitted, 129 TransactionOutcomeAborted, 130 } TRANSACTION_OUTCOME; 131 132 133 typedef enum _TRANSACTION_STATE { 134 TransactionStateNormal = 1, 135 TransactionStateIndoubt, 136 TransactionStateCommittedNotify, 137 } TRANSACTION_STATE; 138 139 140 typedef struct _TRANSACTION_BASIC_INFORMATION { 141 GUID TransactionId; 142 ULONG State; 143 ULONG Outcome; 144 } TRANSACTION_BASIC_INFORMATION, *PTRANSACTION_BASIC_INFORMATION; 145 146 typedef struct _TRANSACTIONMANAGER_BASIC_INFORMATION { 147 GUID TmIdentity; 148 LARGE_INTEGER VirtualClock; 149 } TRANSACTIONMANAGER_BASIC_INFORMATION, *PTRANSACTIONMANAGER_BASIC_INFORMATION; 150 151 typedef struct _TRANSACTIONMANAGER_LOG_INFORMATION { 152 GUID LogIdentity; 153 } TRANSACTIONMANAGER_LOG_INFORMATION, *PTRANSACTIONMANAGER_LOG_INFORMATION; 154 155 typedef struct _TRANSACTIONMANAGER_LOGPATH_INFORMATION { 156 ULONG LogPathLength; 157 _Field_size_(LogPathLength) WCHAR LogPath[1]; 158 } TRANSACTIONMANAGER_LOGPATH_INFORMATION, *PTRANSACTIONMANAGER_LOGPATH_INFORMATION; 159 160 typedef struct _TRANSACTIONMANAGER_RECOVERY_INFORMATION { 161 ULONGLONG LastRecoveredLsn; 162 } TRANSACTIONMANAGER_RECOVERY_INFORMATION, *PTRANSACTIONMANAGER_RECOVERY_INFORMATION; 163 164 typedef struct _TRANSACTION_PROPERTIES_INFORMATION { 165 ULONG IsolationLevel; 166 ULONG IsolationFlags; 167 LARGE_INTEGER Timeout; 168 ULONG Outcome; 169 ULONG DescriptionLength; 170 WCHAR Description[1]; 171 } TRANSACTION_PROPERTIES_INFORMATION, *PTRANSACTION_PROPERTIES_INFORMATION; 172 173 typedef struct _TRANSACTION_BIND_INFORMATION { 174 HANDLE TmHandle; 175 } TRANSACTION_BIND_INFORMATION, *PTRANSACTION_BIND_INFORMATION; 176 177 typedef struct _TRANSACTION_ENLISTMENT_PAIR { 178 GUID EnlistmentId; 179 GUID ResourceManagerId; 180 } TRANSACTION_ENLISTMENT_PAIR, *PTRANSACTION_ENLISTMENT_PAIR; 181 182 typedef struct _TRANSACTION_ENLISTMENTS_INFORMATION { 183 ULONG NumberOfEnlistments; 184 TRANSACTION_ENLISTMENT_PAIR EnlistmentPair[1]; 185 } TRANSACTION_ENLISTMENTS_INFORMATION, *PTRANSACTION_ENLISTMENTS_INFORMATION; 186 187 typedef struct _TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION { 188 TRANSACTION_ENLISTMENT_PAIR SuperiorEnlistmentPair; 189 } TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION, *PTRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION; 190 191 typedef struct _RESOURCEMANAGER_BASIC_INFORMATION { 192 GUID ResourceManagerId; 193 ULONG DescriptionLength; 194 WCHAR Description[1]; 195 } RESOURCEMANAGER_BASIC_INFORMATION, *PRESOURCEMANAGER_BASIC_INFORMATION; 196 197 typedef struct _RESOURCEMANAGER_COMPLETION_INFORMATION { 198 HANDLE IoCompletionPortHandle; 199 ULONG_PTR CompletionKey; 200 } RESOURCEMANAGER_COMPLETION_INFORMATION, *PRESOURCEMANAGER_COMPLETION_INFORMATION; 201 202 typedef enum _KTMOBJECT_TYPE { 203 KTMOBJECT_TRANSACTION, 204 KTMOBJECT_TRANSACTION_MANAGER, 205 KTMOBJECT_RESOURCE_MANAGER, 206 KTMOBJECT_ENLISTMENT, 207 KTMOBJECT_INVALID 208 } KTMOBJECT_TYPE, *PKTMOBJECT_TYPE; 209 210 typedef struct _KTMOBJECT_CURSOR { 211 GUID LastQuery; 212 ULONG ObjectIdCount; 213 GUID ObjectIds[1]; 214 } KTMOBJECT_CURSOR, *PKTMOBJECT_CURSOR; 215 216 typedef enum _TRANSACTION_INFORMATION_CLASS { 217 TransactionBasicInformation, 218 TransactionPropertiesInformation, 219 TransactionEnlistmentInformation, 220 TransactionSuperiorEnlistmentInformation 221 } TRANSACTION_INFORMATION_CLASS; 222 223 typedef enum _TRANSACTIONMANAGER_INFORMATION_CLASS { 224 TransactionManagerBasicInformation, 225 TransactionManagerLogInformation, 226 TransactionManagerLogPathInformation, 227 TransactionManagerRecoveryInformation = 4 228 } TRANSACTIONMANAGER_INFORMATION_CLASS; 229 230 typedef enum _RESOURCEMANAGER_INFORMATION_CLASS { 231 ResourceManagerBasicInformation, 232 ResourceManagerCompletionInformation, 233 } RESOURCEMANAGER_INFORMATION_CLASS; 234 235 typedef struct _ENLISTMENT_BASIC_INFORMATION { 236 GUID EnlistmentId; 237 GUID TransactionId; 238 GUID ResourceManagerId; 239 } ENLISTMENT_BASIC_INFORMATION, *PENLISTMENT_BASIC_INFORMATION; 240 241 typedef struct _ENLISTMENT_CRM_INFORMATION { 242 GUID CrmTransactionManagerId; 243 GUID CrmResourceManagerId; 244 GUID CrmEnlistmentId; 245 } ENLISTMENT_CRM_INFORMATION, *PENLISTMENT_CRM_INFORMATION; 246 247 typedef enum _ENLISTMENT_INFORMATION_CLASS { 248 EnlistmentBasicInformation, 249 EnlistmentRecoveryInformation, 250 EnlistmentCrmInformation 251 } ENLISTMENT_INFORMATION_CLASS; 252 253 typedef struct _TRANSACTION_LIST_ENTRY { 254 #if defined(__cplusplus) 255 ::UOW UOW; 256 #else 257 UOW UOW; 258 #endif 259 } TRANSACTION_LIST_ENTRY, *PTRANSACTION_LIST_ENTRY; 260 261 typedef struct _TRANSACTION_LIST_INFORMATION { 262 ULONG NumberOfTransactions; 263 TRANSACTION_LIST_ENTRY TransactionInformation[1]; 264 } TRANSACTION_LIST_INFORMATION, *PTRANSACTION_LIST_INFORMATION; 265 266 typedef NTSTATUS 267 (NTAPI *PFN_NT_CREATE_TRANSACTION)( 268 _Out_ PHANDLE TransactionHandle, 269 _In_ ACCESS_MASK DesiredAccess, 270 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 271 _In_opt_ LPGUID Uow, 272 _In_opt_ HANDLE TmHandle, 273 _In_opt_ ULONG CreateOptions, 274 _In_opt_ ULONG IsolationLevel, 275 _In_opt_ ULONG IsolationFlags, 276 _In_opt_ PLARGE_INTEGER Timeout, 277 _In_opt_ PUNICODE_STRING Description); 278 279 typedef NTSTATUS 280 (NTAPI *PFN_NT_OPEN_TRANSACTION)( 281 _Out_ PHANDLE TransactionHandle, 282 _In_ ACCESS_MASK DesiredAccess, 283 _In_ POBJECT_ATTRIBUTES ObjectAttributes, 284 _In_opt_ LPGUID Uow, 285 _In_opt_ HANDLE TmHandle); 286 287 typedef NTSTATUS 288 (NTAPI *PFN_NT_QUERY_INFORMATION_TRANSACTION)( 289 _In_ HANDLE TransactionHandle, 290 _In_ TRANSACTION_INFORMATION_CLASS TransactionInformationClass, 291 _Out_writes_bytes_(TransactionInformationLength) PVOID TransactionInformation, 292 _In_ ULONG TransactionInformationLength, 293 _Out_opt_ PULONG ReturnLength); 294 295 typedef NTSTATUS 296 (NTAPI *PFN_NT_SET_INFORMATION_TRANSACTION)( 297 _In_ HANDLE TransactionHandle, 298 _In_ TRANSACTION_INFORMATION_CLASS TransactionInformationClass, 299 _In_ PVOID TransactionInformation, 300 _In_ ULONG TransactionInformationLength); 301 302 typedef NTSTATUS 303 (NTAPI *PFN_NT_COMMIT_TRANSACTION)( 304 _In_ HANDLE TransactionHandle, 305 _In_ BOOLEAN Wait); 306 307 typedef NTSTATUS 308 (NTAPI *PFN_NT_ROLLBACK_TRANSACTION)( 309 _In_ HANDLE TransactionHandle, 310 _In_ BOOLEAN Wait); 311 312 #if (NTDDI_VERSION >= NTDDI_VISTA) 313 314 _Must_inspect_result_ 315 _IRQL_requires_max_ (APC_LEVEL) 316 __kernel_entry 317 NTSYSCALLAPI 318 NTSTATUS 319 NTAPI 320 NtCreateTransactionManager( 321 _Out_ PHANDLE TmHandle, 322 _In_ ACCESS_MASK DesiredAccess, 323 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 324 _In_opt_ PUNICODE_STRING LogFileName, 325 _In_opt_ ULONG CreateOptions, 326 _In_opt_ ULONG CommitStrength); 327 328 _Must_inspect_result_ 329 _IRQL_requires_max_ (APC_LEVEL) 330 __kernel_entry 331 NTSYSCALLAPI 332 NTSTATUS 333 NTAPI 334 NtOpenTransactionManager( 335 _Out_ PHANDLE TmHandle, 336 _In_ ACCESS_MASK DesiredAccess, 337 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 338 _In_opt_ PUNICODE_STRING LogFileName, 339 _In_opt_ LPGUID TmIdentity, 340 _In_opt_ ULONG OpenOptions); 341 342 _Must_inspect_result_ 343 _IRQL_requires_max_ (APC_LEVEL) 344 __kernel_entry 345 NTSYSCALLAPI 346 NTSTATUS 347 NTAPI 348 NtRenameTransactionManager( 349 _In_ PUNICODE_STRING LogFileName, 350 _In_ LPGUID ExistingTransactionManagerGuid); 351 352 _Must_inspect_result_ 353 _IRQL_requires_max_ (APC_LEVEL) 354 __kernel_entry 355 NTSYSCALLAPI 356 NTSTATUS 357 NTAPI 358 NtRollforwardTransactionManager( 359 _In_ HANDLE TransactionManagerHandle, 360 _In_opt_ PLARGE_INTEGER TmVirtualClock); 361 362 _Must_inspect_result_ 363 _IRQL_requires_max_ (APC_LEVEL) 364 __kernel_entry 365 NTSYSCALLAPI 366 NTSTATUS 367 NTAPI 368 NtRecoverTransactionManager( 369 _In_ HANDLE TransactionManagerHandle); 370 371 _Must_inspect_result_ 372 _IRQL_requires_max_ (APC_LEVEL) 373 __kernel_entry 374 NTSYSCALLAPI 375 NTSTATUS 376 NTAPI 377 NtQueryInformationTransactionManager( 378 _In_ HANDLE TransactionManagerHandle, 379 _In_ TRANSACTIONMANAGER_INFORMATION_CLASS TransactionManagerInformationClass, 380 _Out_writes_bytes_(TransactionManagerInformationLength) PVOID TransactionManagerInformation, 381 _In_ ULONG TransactionManagerInformationLength, 382 _Out_ PULONG ReturnLength); 383 384 _Must_inspect_result_ 385 _IRQL_requires_max_ (APC_LEVEL) 386 __kernel_entry 387 NTSYSCALLAPI 388 NTSTATUS 389 NTAPI 390 NtSetInformationTransactionManager( 391 _In_opt_ HANDLE TmHandle, 392 _In_ TRANSACTIONMANAGER_INFORMATION_CLASS TransactionManagerInformationClass, 393 _In_reads_bytes_(TransactionManagerInformationLength) PVOID TransactionManagerInformation, 394 _In_ ULONG TransactionManagerInformationLength); 395 396 _Must_inspect_result_ 397 _IRQL_requires_max_ (APC_LEVEL) 398 __kernel_entry 399 NTSYSCALLAPI 400 NTSTATUS 401 NTAPI 402 NtEnumerateTransactionObject( 403 _In_opt_ HANDLE RootObjectHandle, 404 _In_ KTMOBJECT_TYPE QueryType, 405 _Inout_updates_bytes_(ObjectCursorLength) PKTMOBJECT_CURSOR ObjectCursor, 406 _In_ ULONG ObjectCursorLength, 407 _Out_ PULONG ReturnLength); 408 409 _Must_inspect_result_ 410 _IRQL_requires_max_ (APC_LEVEL) 411 __kernel_entry 412 NTSYSCALLAPI 413 NTSTATUS 414 NTAPI 415 NtCreateTransaction( 416 _Out_ PHANDLE TransactionHandle, 417 _In_ ACCESS_MASK DesiredAccess, 418 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 419 _In_opt_ LPGUID Uow, 420 _In_opt_ HANDLE TmHandle, 421 _In_opt_ ULONG CreateOptions, 422 _In_opt_ ULONG IsolationLevel, 423 _In_opt_ ULONG IsolationFlags, 424 _In_opt_ PLARGE_INTEGER Timeout, 425 _In_opt_ PUNICODE_STRING Description); 426 427 _Must_inspect_result_ 428 _IRQL_requires_max_ (APC_LEVEL) 429 __kernel_entry 430 NTSYSCALLAPI 431 NTSTATUS 432 NTAPI 433 NtOpenTransaction( 434 _Out_ PHANDLE TransactionHandle, 435 _In_ ACCESS_MASK DesiredAccess, 436 _In_ POBJECT_ATTRIBUTES ObjectAttributes, 437 _In_ LPGUID Uow, 438 _In_opt_ HANDLE TmHandle); 439 440 _Must_inspect_result_ 441 _IRQL_requires_max_ (APC_LEVEL) 442 __kernel_entry 443 NTSYSCALLAPI 444 NTSTATUS 445 NTAPI 446 NtQueryInformationTransaction( 447 _In_ HANDLE TransactionHandle, 448 _In_ TRANSACTION_INFORMATION_CLASS TransactionInformationClass, 449 _Out_writes_bytes_(TransactionInformationLength) PVOID TransactionInformation, 450 _In_ ULONG TransactionInformationLength, 451 _Out_opt_ PULONG ReturnLength); 452 453 _Must_inspect_result_ 454 _IRQL_requires_max_ (APC_LEVEL) 455 __kernel_entry 456 NTSYSCALLAPI 457 NTSTATUS 458 NTAPI 459 NtSetInformationTransaction( 460 _In_ HANDLE TransactionHandle, 461 _In_ TRANSACTION_INFORMATION_CLASS TransactionInformationClass, 462 _In_reads_bytes_(TransactionInformationLength) PVOID TransactionInformation, 463 _In_ ULONG TransactionInformationLength); 464 465 _IRQL_requires_max_ (APC_LEVEL) 466 __kernel_entry 467 NTSYSCALLAPI 468 NTSTATUS 469 NTAPI 470 NtCommitTransaction( 471 _In_ HANDLE TransactionHandle, 472 _In_ BOOLEAN Wait); 473 474 _IRQL_requires_max_ (APC_LEVEL) 475 __kernel_entry 476 NTSYSCALLAPI 477 NTSTATUS 478 NTAPI 479 NtRollbackTransaction( 480 _In_ HANDLE TransactionHandle, 481 _In_ BOOLEAN Wait); 482 483 _Must_inspect_result_ 484 _IRQL_requires_max_ (APC_LEVEL) 485 __kernel_entry 486 NTSYSCALLAPI 487 NTSTATUS 488 NTAPI 489 NtCreateEnlistment( 490 _Out_ PHANDLE EnlistmentHandle, 491 _In_ ACCESS_MASK DesiredAccess, 492 _In_ HANDLE ResourceManagerHandle, 493 _In_ HANDLE TransactionHandle, 494 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 495 _In_opt_ ULONG CreateOptions, 496 _In_ NOTIFICATION_MASK NotificationMask, 497 _In_opt_ PVOID EnlistmentKey); 498 499 _Must_inspect_result_ 500 _IRQL_requires_max_ (APC_LEVEL) 501 __kernel_entry 502 NTSYSCALLAPI 503 NTSTATUS 504 NTAPI 505 NtOpenEnlistment( 506 _Out_ PHANDLE EnlistmentHandle, 507 _In_ ACCESS_MASK DesiredAccess, 508 _In_ HANDLE ResourceManagerHandle, 509 _In_ LPGUID EnlistmentGuid, 510 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes); 511 512 _Must_inspect_result_ 513 _IRQL_requires_max_ (APC_LEVEL) 514 __kernel_entry 515 NTSYSCALLAPI 516 NTSTATUS 517 NTAPI 518 NtQueryInformationEnlistment( 519 _In_ HANDLE EnlistmentHandle, 520 _In_ ENLISTMENT_INFORMATION_CLASS EnlistmentInformationClass, 521 _Out_writes_bytes_(EnlistmentInformationLength) PVOID EnlistmentInformation, 522 _In_ ULONG EnlistmentInformationLength, 523 _Out_ PULONG ReturnLength); 524 525 _Must_inspect_result_ 526 _IRQL_requires_max_ (APC_LEVEL) 527 __kernel_entry 528 NTSYSCALLAPI 529 NTSTATUS 530 NTAPI 531 NtSetInformationEnlistment( 532 _In_opt_ HANDLE EnlistmentHandle, 533 _In_ ENLISTMENT_INFORMATION_CLASS EnlistmentInformationClass, 534 _In_reads_bytes_(EnlistmentInformationLength) PVOID EnlistmentInformation, 535 _In_ ULONG EnlistmentInformationLength); 536 537 _Must_inspect_result_ 538 _IRQL_requires_max_ (APC_LEVEL) 539 __kernel_entry 540 NTSYSCALLAPI 541 NTSTATUS 542 NTAPI 543 NtRecoverEnlistment( 544 _In_ HANDLE EnlistmentHandle, 545 _In_opt_ PVOID EnlistmentKey); 546 547 _Must_inspect_result_ 548 _IRQL_requires_max_ (APC_LEVEL) 549 __kernel_entry 550 NTSYSCALLAPI 551 NTSTATUS 552 NTAPI 553 NtPrePrepareEnlistment( 554 _In_ HANDLE EnlistmentHandle, 555 _In_opt_ PLARGE_INTEGER TmVirtualClock); 556 557 _Must_inspect_result_ 558 _IRQL_requires_max_ (APC_LEVEL) 559 __kernel_entry 560 NTSYSCALLAPI 561 NTSTATUS 562 NTAPI 563 NtPrepareEnlistment( 564 _In_ HANDLE EnlistmentHandle, 565 _In_opt_ PLARGE_INTEGER TmVirtualClock); 566 567 _Must_inspect_result_ 568 _IRQL_requires_max_ (APC_LEVEL) 569 __kernel_entry 570 NTSYSCALLAPI 571 NTSTATUS 572 NTAPI 573 NtCommitEnlistment( 574 _In_ HANDLE EnlistmentHandle, 575 _In_opt_ PLARGE_INTEGER TmVirtualClock); 576 577 _IRQL_requires_max_ (APC_LEVEL) 578 __kernel_entry 579 NTSYSCALLAPI 580 NTSTATUS 581 NTAPI 582 NtRollbackEnlistment( 583 _In_ HANDLE EnlistmentHandle, 584 _In_opt_ PLARGE_INTEGER TmVirtualClock); 585 586 _IRQL_requires_max_ (APC_LEVEL) 587 __kernel_entry 588 NTSYSCALLAPI 589 NTSTATUS 590 NTAPI 591 NtPrePrepareComplete( 592 _In_ HANDLE EnlistmentHandle, 593 _In_opt_ PLARGE_INTEGER TmVirtualClock); 594 595 _IRQL_requires_max_ (APC_LEVEL) 596 __kernel_entry 597 NTSYSCALLAPI 598 NTSTATUS 599 NTAPI 600 NtPrepareComplete( 601 _In_ HANDLE EnlistmentHandle, 602 _In_opt_ PLARGE_INTEGER TmVirtualClock); 603 604 _IRQL_requires_max_ (APC_LEVEL) 605 __kernel_entry 606 NTSYSCALLAPI 607 NTSTATUS 608 NTAPI 609 NtCommitComplete( 610 _In_ HANDLE EnlistmentHandle, 611 _In_opt_ PLARGE_INTEGER TmVirtualClock); 612 613 _IRQL_requires_max_ (APC_LEVEL) 614 __kernel_entry 615 NTSYSCALLAPI 616 NTSTATUS 617 NTAPI 618 NtReadOnlyEnlistment( 619 _In_ HANDLE EnlistmentHandle, 620 _In_opt_ PLARGE_INTEGER TmVirtualClock); 621 622 _IRQL_requires_max_ (APC_LEVEL) 623 __kernel_entry 624 NTSYSCALLAPI 625 NTSTATUS 626 NTAPI 627 NtRollbackComplete( 628 _In_ HANDLE EnlistmentHandle, 629 _In_opt_ PLARGE_INTEGER TmVirtualClock); 630 631 _IRQL_requires_max_ (APC_LEVEL) 632 __kernel_entry 633 NTSYSCALLAPI 634 NTSTATUS 635 NTAPI 636 NtSinglePhaseReject( 637 _In_ HANDLE EnlistmentHandle, 638 _In_opt_ PLARGE_INTEGER TmVirtualClock); 639 640 _Must_inspect_result_ 641 _IRQL_requires_max_ (APC_LEVEL) 642 __kernel_entry 643 NTSYSCALLAPI 644 NTSTATUS 645 NTAPI 646 NtCreateResourceManager( 647 _Out_ PHANDLE ResourceManagerHandle, 648 _In_ ACCESS_MASK DesiredAccess, 649 _In_ HANDLE TmHandle, 650 _In_ LPGUID RmGuid, 651 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 652 _In_opt_ ULONG CreateOptions, 653 _In_opt_ PUNICODE_STRING Description); 654 655 _Must_inspect_result_ 656 _IRQL_requires_max_ (APC_LEVEL) 657 __kernel_entry 658 NTSYSCALLAPI 659 NTSTATUS 660 NTAPI 661 NtOpenResourceManager( 662 _Out_ PHANDLE ResourceManagerHandle, 663 _In_ ACCESS_MASK DesiredAccess, 664 _In_ HANDLE TmHandle, 665 _In_opt_ LPGUID ResourceManagerGuid, 666 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes); 667 668 _Must_inspect_result_ 669 _IRQL_requires_max_ (APC_LEVEL) 670 __kernel_entry 671 NTSYSCALLAPI 672 NTSTATUS 673 NTAPI 674 NtRecoverResourceManager( 675 _In_ HANDLE ResourceManagerHandle); 676 677 _Must_inspect_result_ 678 _IRQL_requires_max_ (APC_LEVEL) 679 __kernel_entry 680 NTSYSCALLAPI 681 NTSTATUS 682 NTAPI 683 NtGetNotificationResourceManager( 684 _In_ HANDLE ResourceManagerHandle, 685 _Out_ PTRANSACTION_NOTIFICATION TransactionNotification, 686 _In_ ULONG NotificationLength, 687 _In_opt_ PLARGE_INTEGER Timeout, 688 _Out_opt_ PULONG ReturnLength, 689 _In_ ULONG Asynchronous, 690 _In_opt_ ULONG_PTR AsynchronousContext); 691 692 _Must_inspect_result_ 693 _IRQL_requires_max_ (APC_LEVEL) 694 __kernel_entry 695 NTSYSCALLAPI 696 NTSTATUS 697 NTAPI 698 NtQueryInformationResourceManager( 699 _In_ HANDLE ResourceManagerHandle, 700 _In_ RESOURCEMANAGER_INFORMATION_CLASS ResourceManagerInformationClass, 701 _Out_writes_bytes_(ResourceManagerInformationLength) PVOID ResourceManagerInformation, 702 _In_ ULONG ResourceManagerInformationLength, 703 _Out_opt_ PULONG ReturnLength); 704 705 _Must_inspect_result_ 706 _IRQL_requires_max_ (APC_LEVEL) 707 __kernel_entry 708 NTSYSCALLAPI 709 NTSTATUS 710 NTAPI 711 NtSetInformationResourceManager( 712 _In_ HANDLE ResourceManagerHandle, 713 _In_ RESOURCEMANAGER_INFORMATION_CLASS ResourceManagerInformationClass, 714 _In_reads_bytes_(ResourceManagerInformationLength) PVOID ResourceManagerInformation, 715 _In_ ULONG ResourceManagerInformationLength); 716 717 _Must_inspect_result_ 718 _IRQL_requires_max_ (APC_LEVEL) 719 __kernel_entry 720 NTSYSCALLAPI 721 NTSTATUS 722 NTAPI 723 NtRegisterProtocolAddressInformation( 724 _In_ HANDLE ResourceManager, 725 _In_ PCRM_PROTOCOL_ID ProtocolId, 726 _In_ ULONG ProtocolInformationSize, 727 _In_ PVOID ProtocolInformation, 728 _In_opt_ ULONG CreateOptions); 729 730 _IRQL_requires_max_ (APC_LEVEL) 731 __kernel_entry 732 NTSYSCALLAPI 733 NTSTATUS 734 NTAPI 735 NtPropagationComplete( 736 _In_ HANDLE ResourceManagerHandle, 737 _In_ ULONG RequestCookie, 738 _In_ ULONG BufferLength, 739 _In_ PVOID Buffer); 740 741 _IRQL_requires_max_ (APC_LEVEL) 742 __kernel_entry 743 NTSYSCALLAPI 744 NTSTATUS 745 NTAPI 746 NtPropagationFailed( 747 _In_ HANDLE ResourceManagerHandle, 748 _In_ ULONG RequestCookie, 749 _In_ NTSTATUS PropStatus); 750 751 #endif /* NTDDI_VERSION >= NTDDI_VISTA */ 752 753 #endif /* !_NTTMAPI_ */ 754