| 1 |
// Licensed under the Apache License, Version 2.0 |
| 2 |
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
| 3 |
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. |
| 4 |
// All files in the project carrying such notice may not be copied, modified, or distributed |
| 5 |
// except according to those terms |
| 6 |
//! FFI bindings to ktmw32. |
| 7 |
use shared::guiddef::LPGUID; |
| 8 |
use shared::minwindef::{BOOL, DWORD}; |
| 9 |
use um::minwinbase::LPSECURITY_ATTRIBUTES; |
| 10 |
use um::winnt::{HANDLE, LPWSTR}; |
| 11 |
extern "system" { |
| 12 |
pub fn CreateTransaction( |
| 13 |
lpTransactionAttributes: LPSECURITY_ATTRIBUTES, |
| 14 |
UOW: LPGUID, |
| 15 |
CreateOptions: DWORD, |
| 16 |
IsolationLevel: DWORD, |
| 17 |
IsolationFlags: DWORD, |
| 18 |
Timeout: DWORD, |
| 19 |
Description: LPWSTR, |
| 20 |
) -> HANDLE; |
| 21 |
// pub fn OpenTransaction(); |
| 22 |
pub fn CommitTransaction( |
| 23 |
TransactionHandle: HANDLE, |
| 24 |
) -> BOOL; |
| 25 |
// pub fn CommitTransactionAsync(); |
| 26 |
pub fn RollbackTransaction( |
| 27 |
TransactionHandle: HANDLE, |
| 28 |
) -> BOOL; |
| 29 |
// pub fn RollbackTransactionAsync(); |
| 30 |
// pub fn GetTransactionId(); |
| 31 |
// pub fn GetTransactionInformation(); |
| 32 |
// pub fn SetTransactionInformation(); |
| 33 |
// pub fn CreateTransactionManager(); |
| 34 |
// pub fn OpenTransactionManager(); |
| 35 |
// pub fn OpenTransactionManagerById(); |
| 36 |
// pub fn RenameTransactionManager(); |
| 37 |
// pub fn RollforwardTransactionManager(); |
| 38 |
// pub fn RecoverTransactionManager(); |
| 39 |
// pub fn GetCurrentClockTransactionManager(); |
| 40 |
// pub fn GetTransactionManagerId(); |
| 41 |
// pub fn CreateResourceManager(); |
| 42 |
// pub fn OpenResourceManager(); |
| 43 |
// pub fn RecoverResourceManager(); |
| 44 |
// pub fn GetNotificationResourceManager(); |
| 45 |
// pub fn GetNotificationResourceManagerAsync(); |
| 46 |
// pub fn SetResourceManagerCompletionPort(); |
| 47 |
// pub fn CreateEnlistment(); |
| 48 |
// pub fn OpenEnlistment(); |
| 49 |
// pub fn RecoverEnlistment(); |
| 50 |
// pub fn GetEnlistmentRecoveryInformation(); |
| 51 |
// pub fn GetEnlistmentId(); |
| 52 |
// pub fn SetEnlistmentRecoveryInformation(); |
| 53 |
// pub fn PrepareEnlistment(); |
| 54 |
// pub fn PrePrepareEnlistment(); |
| 55 |
// pub fn CommitEnlistment(); |
| 56 |
// pub fn RollbackEnlistment(); |
| 57 |
// pub fn PrePrepareComplete(); |
| 58 |
// pub fn PrepareComplete(); |
| 59 |
// pub fn ReadOnlyEnlistment(); |
| 60 |
// pub fn CommitComplete(); |
| 61 |
// pub fn RollbackComplete(); |
| 62 |
// pub fn SinglePhaseReject(); |
| 63 |
} |