#![allow(non_snake_case, clippy::missing_safety_doc)]
use crate::ttd::raw::bindings::*;
use core::{ffi::c_void, mem::MaybeUninit};
use windows_core::GUID;
pub(crate) unsafe trait TtdTargetInterface: Sized {
const IID: GUID;
unsafe fn from_target_raw(raw: *mut c_void) -> Self;
}
unsafe impl TtdTargetInterface for ICursorView {
const IID: GUID = IID_ICURSOR_VIEW;
#[inline]
unsafe fn from_target_raw(raw: *mut c_void) -> Self { Self(raw) }
}
unsafe impl TtdTargetInterface for IReplayEngineView {
const IID: GUID = IID_IREPLAY_ENGINE_VIEW;
#[inline]
unsafe fn from_target_raw(raw: *mut c_void) -> Self { Self(raw) }
}
macro_rules! impl_view_traits {
($ty:ty) => {
impl core::fmt::Debug for $ty {
fn fmt(
&self,
f: &mut core::fmt::Formatter<'_>,
) -> core::fmt::Result {
f.debug_tuple(stringify!($ty)).field(&self.0).finish()
}
}
impl PartialEq for $ty {
#[inline]
fn eq(&self, other: &Self) -> bool { self.0 == other.0 }
}
impl Eq for $ty {}
};
}
impl_view_traits!(ICursorView);
impl_view_traits!(IReplayEngineView);
impl IThreadView {
pub unsafe fn from_raw(raw: *const c_void) -> Option<Self> {
if raw.is_null() {
None
} else {
Some(Self(raw as *mut c_void))
}
}
#[inline]
unsafe fn vtable(&self) -> &IThreadView_Vtbl {
unsafe { &**(self.0 as *const *const IThreadView_Vtbl) }
}
#[inline]
fn as_raw(&self) -> *mut c_void { self.0 }
pub unsafe fn GetThreadInfo(&self) -> &ThreadInfo {
unsafe { &*(self.vtable().GetThreadInfo)(self.as_raw()) }
}
pub unsafe fn GetTebAddress(&self) -> GuestAddress {
unsafe { (self.vtable().GetTebAddress)(self.as_raw()) }
}
pub unsafe fn GetPosition(&self) -> &Position {
unsafe { &*(self.vtable().GetPosition)(self.as_raw()) }
}
pub unsafe fn GetPreviousPosition(&self) -> Position {
unsafe {
let mut out = MaybeUninit::uninit();
(self.vtable().GetPreviousPosition)(
self.as_raw(),
out.as_mut_ptr(),
);
out.assume_init()
}
}
pub unsafe fn GetProgramCounter(&self) -> GuestAddress {
unsafe { (self.vtable().GetProgramCounter)(self.as_raw()) }
}
pub unsafe fn GetStackPointer(&self) -> GuestAddress {
unsafe { (self.vtable().GetStackPointer)(self.as_raw()) }
}
pub unsafe fn GetFramePointer(&self) -> GuestAddress {
unsafe { (self.vtable().GetFramePointer)(self.as_raw()) }
}
pub unsafe fn GetBasicReturnValue(&self) -> u64 {
unsafe { (self.vtable().GetBasicReturnValue)(self.as_raw()) }
}
pub unsafe fn GetCrossPlatformContext(&self) -> RegisterContext {
unsafe {
let mut out = MaybeUninit::uninit();
(self.vtable().GetCrossPlatformContext)(
self.as_raw(),
out.as_mut_ptr(),
);
out.assume_init()
}
}
pub unsafe fn GetAvxExtendedContext(&self) -> ExtendedRegisterContext {
unsafe {
let mut out = MaybeUninit::uninit();
(self.vtable().GetAvxExtendedContext)(
self.as_raw(),
out.as_mut_ptr(),
);
out.assume_init()
}
}
pub unsafe fn QueryMemoryRange(
&self,
address: GuestAddress,
) -> MemoryRange {
unsafe {
let mut out = MaybeUninit::uninit();
(self.vtable().QueryMemoryRange)(
self.as_raw(),
out.as_mut_ptr(),
address,
);
out.assume_init()
}
}
pub unsafe fn QueryMemoryBuffer(
&self,
address: GuestAddress,
buffer: BufferView,
) -> MemoryBuffer {
unsafe {
let mut out = MaybeUninit::uninit();
#[cfg(target_arch = "x86")]
(self.vtable().QueryMemoryBuffer)(
self.as_raw(),
out.as_mut_ptr(),
address,
buffer,
);
#[cfg(target_arch = "x86_64")]
(self.vtable().QueryMemoryBuffer)(
self.as_raw(),
out.as_mut_ptr(),
address,
&buffer,
);
out.assume_init()
}
}
pub unsafe fn QueryMemoryBufferWithRanges(
&self,
address: GuestAddress,
buffer: BufferView,
ranges: &mut [MemoryRange],
) -> MemoryBufferWithRanges {
unsafe {
let mut out = MaybeUninit::uninit();
#[cfg(target_arch = "x86")]
(self.vtable().QueryMemoryBufferWithRanges)(
self.as_raw(),
out.as_mut_ptr(),
address,
buffer,
ranges.len(),
ranges.as_mut_ptr(),
);
#[cfg(target_arch = "x86_64")]
(self.vtable().QueryMemoryBufferWithRanges)(
self.as_raw(),
out.as_mut_ptr(),
address,
&buffer,
ranges.len(),
ranges.as_mut_ptr(),
);
out.assume_init()
}
}
}
impl ICursorView {
#[inline]
unsafe fn vtable(&self) -> &ICursorView_Vtbl {
unsafe { &**(self.0 as *const *const ICursorView_Vtbl) }
}
#[inline]
fn as_raw(&self) -> *mut c_void { self.0 }
pub unsafe fn QueryMemoryRange(
&self,
address: GuestAddress,
policy: QueryMemoryPolicy,
) -> MemoryRange {
unsafe {
let mut result__ = MaybeUninit::uninit();
(self.vtable().QueryMemoryRange)(
self.as_raw(),
result__.as_mut_ptr(),
address,
policy,
);
result__.assume_init()
}
}
pub unsafe fn QueryMemoryBuffer(
&self,
address: GuestAddress,
buffer: BufferView,
policy: QueryMemoryPolicy,
) -> MemoryBuffer {
unsafe {
let mut result__ = MaybeUninit::uninit();
#[cfg(target_arch = "x86")]
(self.vtable().QueryMemoryBuffer)(
self.as_raw(),
result__.as_mut_ptr(),
address,
buffer,
policy,
);
#[cfg(target_arch = "x86_64")]
(self.vtable().QueryMemoryBuffer)(
self.as_raw(),
result__.as_mut_ptr(),
address,
&buffer,
policy,
);
result__.assume_init()
}
}
pub unsafe fn QueryMemoryBufferWithRanges(
&self,
address: GuestAddress,
buffer: BufferView,
ranges: &mut [MemoryRange],
policy: QueryMemoryPolicy,
) -> MemoryBufferWithRanges {
unsafe {
let mut result__ = MaybeUninit::uninit();
#[cfg(target_arch = "x86")]
(self.vtable().QueryMemoryBufferWithRanges)(
self.as_raw(),
result__.as_mut_ptr(),
address,
buffer,
ranges.len(),
ranges.as_mut_ptr(),
policy,
);
#[cfg(target_arch = "x86_64")]
(self.vtable().QueryMemoryBufferWithRanges)(
self.as_raw(),
result__.as_mut_ptr(),
address,
&buffer,
ranges.len(),
ranges.as_mut_ptr(),
policy,
);
result__.assume_init()
}
}
pub unsafe fn SetDefaultMemoryPolicy(&self, policy: QueryMemoryPolicy) {
unsafe { (self.vtable().SetDefaultMemoryPolicy)(self.as_raw(), policy) }
}
pub unsafe fn GetDefaultMemoryPolicy(&self) -> QueryMemoryPolicy {
unsafe { (self.vtable().GetDefaultMemoryPolicy)(self.as_raw()) }
}
pub unsafe fn UnsafeGetReplayEngine(
&self,
iid: &windows::core::GUID,
) -> *mut c_void {
unsafe { (self.vtable().UnsafeGetReplayEngine)(self.as_raw(), iid) }
}
pub unsafe fn UnsafeAsInterface(
&self,
iid: &windows::core::GUID,
) -> *mut c_void {
unsafe { (self.vtable().UnsafeAsInterface)(self.as_raw(), iid) }
}
pub unsafe fn UnsafeAsInterfaceConst(
&self,
iid: &windows::core::GUID,
) -> *const c_void {
unsafe { (self.vtable().UnsafeAsInterfaceConst)(self.as_raw(), iid) }
}
pub unsafe fn GetThreadInfo(&self, thread_id: ThreadId) -> &ThreadInfo {
unsafe { &*(self.vtable().GetThreadInfo)(self.as_raw(), thread_id) }
}
pub unsafe fn GetTebAddress(&self, thread_id: ThreadId) -> GuestAddress {
unsafe { (self.vtable().GetTebAddress)(self.as_raw(), thread_id) }
}
pub unsafe fn GetPosition(&self, thread_id: ThreadId) -> &Position {
unsafe { &*(self.vtable().GetPosition)(self.as_raw(), thread_id) }
}
pub unsafe fn GetPreviousPosition(&self, thread_id: ThreadId) -> &Position {
unsafe {
&*(self.vtable().GetPreviousPosition)(self.as_raw(), thread_id)
}
}
pub unsafe fn GetProgramCounter(
&self,
thread_id: ThreadId,
) -> GuestAddress {
unsafe { (self.vtable().GetProgramCounter)(self.as_raw(), thread_id) }
}
pub unsafe fn GetStackPointer(&self, thread_id: ThreadId) -> GuestAddress {
unsafe { (self.vtable().GetStackPointer)(self.as_raw(), thread_id) }
}
pub unsafe fn GetFramePointer(&self, thread_id: ThreadId) -> GuestAddress {
unsafe { (self.vtable().GetFramePointer)(self.as_raw(), thread_id) }
}
pub unsafe fn GetBasicReturnValue(&self, thread_id: ThreadId) -> u64 {
unsafe { (self.vtable().GetBasicReturnValue)(self.as_raw(), thread_id) }
}
pub unsafe fn GetCrossPlatformContext(
&self,
thread_id: ThreadId,
) -> RegisterContext {
unsafe {
let mut result__ = MaybeUninit::uninit();
(self.vtable().GetCrossPlatformContext)(
self.as_raw(),
result__.as_mut_ptr(),
thread_id,
);
result__.assume_init()
}
}
pub unsafe fn GetAvxExtendedContext(
&self,
thread_id: ThreadId,
) -> ExtendedRegisterContext {
unsafe {
let mut result__ = MaybeUninit::uninit();
(self.vtable().GetAvxExtendedContext)(
self.as_raw(),
result__.as_mut_ptr(),
thread_id,
);
result__.assume_init()
}
}
pub unsafe fn GetModuleCount(&self) -> usize {
unsafe { (self.vtable().GetModuleCount)(self.as_raw()) }
}
pub unsafe fn GetModuleList(&self) -> *const ModuleInstance {
unsafe { (self.vtable().GetModuleList)(self.as_raw()) }
}
pub unsafe fn GetThreadCount(&self) -> usize {
unsafe { (self.vtable().GetThreadCount)(self.as_raw()) }
}
pub unsafe fn GetThreadList(&self) -> *const ActiveThreadInfo {
unsafe { (self.vtable().GetThreadList)(self.as_raw()) }
}
pub unsafe fn SetEventMask(&self, mask: EventMask) {
unsafe { (self.vtable().SetEventMask)(self.as_raw(), mask) }
}
pub unsafe fn GetEventMask(&self) -> EventMask {
unsafe { (self.vtable().GetEventMask)(self.as_raw()) }
}
pub unsafe fn SetGapKindMask(&self, mask: GapKindMask) {
unsafe { (self.vtable().SetGapKindMask)(self.as_raw(), mask) }
}
pub unsafe fn GetGapKindMask(&self) -> GapKindMask {
unsafe { (self.vtable().GetGapKindMask)(self.as_raw()) }
}
pub unsafe fn SetGapEventMask(&self, mask: GapEventMask) {
unsafe { (self.vtable().SetGapEventMask)(self.as_raw(), mask) }
}
pub unsafe fn GetGapEventMask(&self) -> GapEventMask {
unsafe { (self.vtable().GetGapEventMask)(self.as_raw()) }
}
pub unsafe fn SetExceptionMask(&self, mask: ExceptionMask) {
unsafe { (self.vtable().SetExceptionMask)(self.as_raw(), mask) }
}
pub unsafe fn GetExceptionMask(&self) -> ExceptionMask {
unsafe { (self.vtable().GetExceptionMask)(self.as_raw()) }
}
pub unsafe fn SetReplayFlags(&self, flags: ReplayFlags) {
unsafe { (self.vtable().SetReplayFlags)(self.as_raw(), flags) }
}
pub unsafe fn GetReplayFlags(&self) -> ReplayFlags {
unsafe { (self.vtable().GetReplayFlags)(self.as_raw()) }
}
pub unsafe fn AddMemoryWatchpoint(
&self,
data: &MemoryWatchpointData,
) -> bool {
unsafe { (self.vtable().AddMemoryWatchpoint)(self.as_raw(), data) != 0 }
}
pub unsafe fn RemoveMemoryWatchpoint(
&self,
data: &MemoryWatchpointData,
) -> bool {
unsafe {
(self.vtable().RemoveMemoryWatchpoint)(self.as_raw(), data) != 0
}
}
pub unsafe fn AddPositionWatchpoint(
&self,
data: &PositionWatchpointData,
) -> bool {
unsafe {
(self.vtable().AddPositionWatchpoint)(self.as_raw(), data) != 0
}
}
pub unsafe fn RemovePositionWatchpoint(
&self,
data: &PositionWatchpointData,
) -> bool {
unsafe {
(self.vtable().RemovePositionWatchpoint)(self.as_raw(), data) != 0
}
}
pub unsafe fn Clear(&self) {
unsafe { (self.vtable().Clear)(self.as_raw()) }
}
pub unsafe fn SetPosition(&self, position: Position) {
unsafe { (self.vtable().SetPosition)(self.as_raw(), &position) }
}
pub unsafe fn SetPositionOnThread(
&self,
thread_id: UniqueThreadId,
position: Position,
) {
unsafe {
(self.vtable().SetPositionOnThread)(
self.as_raw(),
thread_id,
&position,
)
}
}
pub unsafe fn SetMemoryWatchpointCallback(
&self,
callback: MemoryWatchpointCallback,
context: usize,
) {
unsafe {
(self.vtable().SetMemoryWatchpointCallback)(
self.as_raw(),
callback,
context,
)
}
}
pub unsafe fn SetPositionWatchpointCallback(
&self,
callback: PositionWatchpointCallback,
context: usize,
) {
unsafe {
(self.vtable().SetPositionWatchpointCallback)(
self.as_raw(),
callback,
context,
)
}
}
pub unsafe fn SetGapEventCallback(
&self,
callback: GapEventCallback,
context: usize,
) {
unsafe {
(self.vtable().SetGapEventCallback)(
self.as_raw(),
callback,
context,
)
}
}
pub unsafe fn SetThreadContinuityBreakCallback(
&self,
callback: ThreadContinuityBreakCallback,
context: usize,
) {
unsafe {
(self.vtable().SetThreadContinuityBreakCallback)(
self.as_raw(),
callback,
context,
)
}
}
pub unsafe fn SetReplayProgressCallback(
&self,
callback: ReplayProgressCallback,
context: usize,
) {
unsafe {
(self.vtable().SetReplayProgressCallback)(
self.as_raw(),
callback,
context,
)
}
}
pub unsafe fn SetFallbackCallback(
&self,
callback: FallbackCallback,
context: usize,
) {
unsafe {
(self.vtable().SetFallbackCallback)(
self.as_raw(),
callback,
context,
)
}
}
pub unsafe fn SetCallReturnCallback(
&self,
callback: CallReturnCallback,
context: usize,
) {
unsafe {
(self.vtable().SetCallReturnCallback)(
self.as_raw(),
callback,
context,
)
}
}
pub unsafe fn SetIndirectJumpCallback(
&self,
callback: IndirectJumpCallback,
context: usize,
) {
unsafe {
(self.vtable().SetIndirectJumpCallback)(
self.as_raw(),
callback,
context,
)
}
}
pub unsafe fn SetRegisterChangedCallback(
&self,
callback: RegisterChangedCallback,
context: usize,
) {
unsafe {
(self.vtable().SetRegisterChangedCallback)(
self.as_raw(),
callback,
context,
)
}
}
pub unsafe fn ReplayForward(
&self,
limit: Position,
step_count: StepCount,
) -> ReplayResult {
unsafe {
let mut result__ = MaybeUninit::uninit();
#[cfg(target_arch = "x86")]
(self.vtable().ReplayForward)(
self.as_raw(),
result__.as_mut_ptr(),
limit,
step_count,
);
#[cfg(target_arch = "x86_64")]
(self.vtable().ReplayForward)(
self.as_raw(),
result__.as_mut_ptr(),
&limit,
step_count,
);
result__.assume_init()
}
}
pub unsafe fn ReplayBackward(
&self,
limit: Position,
step_count: StepCount,
) -> ReplayResult {
unsafe {
let mut result__ = MaybeUninit::uninit();
#[cfg(target_arch = "x86")]
(self.vtable().ReplayBackward)(
self.as_raw(),
result__.as_mut_ptr(),
limit,
step_count,
);
#[cfg(target_arch = "x86_64")]
(self.vtable().ReplayBackward)(
self.as_raw(),
result__.as_mut_ptr(),
&limit,
step_count,
);
result__.assume_init()
}
}
pub unsafe fn InterruptReplay(&self) {
unsafe { (self.vtable().InterruptReplay)(self.as_raw()) }
}
pub unsafe fn GetInternals(&self) -> *mut ICursorInternals {
unsafe { (self.vtable().GetInternals)(self.as_raw()) }
}
pub unsafe fn GetInternalsConst(&self) -> *const ICursorInternals {
unsafe { (self.vtable().GetInternalsConst)(self.as_raw()) }
}
pub unsafe fn GetInternalData(
&self,
id: InternalDataId,
buffer: *mut c_void,
buffer_size_in_bytes: usize,
) -> usize {
unsafe {
(self.vtable().GetInternalData)(
self.as_raw(),
id,
buffer,
buffer_size_in_bytes,
)
}
}
}
impl ICursor {
#[inline]
unsafe fn vtable(&self) -> &ICursor_Vtbl {
unsafe { &**(self.0 as *const *const ICursor_Vtbl) }
}
#[inline]
pub fn as_raw(&self) -> *mut c_void { self.0 }
#[inline]
pub unsafe fn as_view(&self) -> &ICursorView {
unsafe { &*(self as *const ICursor as *const ICursorView) }
}
#[inline]
pub unsafe fn as_view_mut(&mut self) -> &mut ICursorView {
unsafe { &mut *(self as *mut ICursor as *mut ICursorView) }
}
pub unsafe fn Destroy(&self) { unsafe { (self.vtable().Destroy)(self.0) } }
}
impl IReplayEngineView {
#[inline]
unsafe fn vtable(&self) -> &IReplayEngineView_Vtbl {
unsafe { &**(self.0 as *const *const IReplayEngineView_Vtbl) }
}
#[inline]
fn as_raw(&self) -> *mut c_void { self.0 }
pub unsafe fn UnsafeAsInterface(
&self,
iid: &windows::core::GUID,
) -> *mut c_void {
unsafe { (self.vtable().UnsafeAsInterface)(self.as_raw(), iid) }
}
pub unsafe fn UnsafeAsInterfaceConst(
&self,
iid: &windows::core::GUID,
) -> *const c_void {
unsafe { (self.vtable().UnsafeAsInterfaceConst)(self.as_raw(), iid) }
}
pub unsafe fn GetPebAddress(&self) -> GuestAddress {
unsafe { (self.vtable().GetPebAddress)(self.as_raw()) }
}
pub unsafe fn GetSystemInfo(&self) -> &SystemInfo {
unsafe { &*(self.vtable().GetSystemInfo)(self.as_raw()) }
}
pub unsafe fn GetFirstPosition(&self) -> &Position {
unsafe { &*(self.vtable().GetFirstPosition)(self.as_raw()) }
}
pub unsafe fn GetLastPosition(&self) -> &Position {
unsafe { &*(self.vtable().GetLastPosition)(self.as_raw()) }
}
pub unsafe fn GetLifetime(&self) -> &PositionRange {
unsafe { &*(self.vtable().GetLifetime)(self.as_raw()) }
}
pub unsafe fn GetRecordingType(&self) -> RecordingType {
unsafe { (self.vtable().GetRecordingType)(self.as_raw()) }
}
pub unsafe fn GetThreadInfo(
&self,
unique_thread_id: UniqueThreadId,
) -> &ThreadInfo {
unsafe {
&*(self.vtable().GetThreadInfo)(self.as_raw(), unique_thread_id)
}
}
pub unsafe fn GetThreadCount(&self) -> usize {
unsafe { (self.vtable().GetThreadCount)(self.as_raw()) }
}
pub unsafe fn GetThreadList(&self) -> *const ThreadInfo {
unsafe { (self.vtable().GetThreadList)(self.as_raw()) }
}
pub unsafe fn GetThreadFirstPositionIndex(&self) -> *const usize {
unsafe { (self.vtable().GetThreadFirstPositionIndex)(self.as_raw()) }
}
pub unsafe fn GetThreadLastPositionIndex(&self) -> *const usize {
unsafe { (self.vtable().GetThreadLastPositionIndex)(self.as_raw()) }
}
pub unsafe fn GetThreadLifetimeFirstPositionIndex(&self) -> *const usize {
unsafe {
(self.vtable().GetThreadLifetimeFirstPositionIndex)(self.as_raw())
}
}
pub unsafe fn GetThreadLifetimeLastPositionIndex(&self) -> *const usize {
unsafe {
(self.vtable().GetThreadLifetimeLastPositionIndex)(self.as_raw())
}
}
pub unsafe fn GetThreadCreatedEventCount(&self) -> usize {
unsafe { (self.vtable().GetThreadCreatedEventCount)(self.as_raw()) }
}
pub unsafe fn GetThreadCreatedEventList(
&self,
) -> *const ThreadCreatedEvent {
unsafe { (self.vtable().GetThreadCreatedEventList)(self.as_raw()) }
}
pub unsafe fn GetThreadTerminatedEventCount(&self) -> usize {
unsafe { (self.vtable().GetThreadTerminatedEventCount)(self.as_raw()) }
}
pub unsafe fn GetThreadTerminatedEventList(
&self,
) -> *const ThreadTerminatedEvent {
unsafe { (self.vtable().GetThreadTerminatedEventList)(self.as_raw()) }
}
pub unsafe fn GetModuleCount(&self) -> usize {
unsafe { (self.vtable().GetModuleCount)(self.as_raw()) }
}
pub unsafe fn GetModuleList(&self) -> *const Module {
unsafe { (self.vtable().GetModuleList)(self.as_raw()) }
}
pub unsafe fn GetModuleInstanceCount(&self) -> usize {
unsafe { (self.vtable().GetModuleInstanceCount)(self.as_raw()) }
}
pub unsafe fn GetModuleInstanceList(&self) -> *const ModuleInstance {
unsafe { (self.vtable().GetModuleInstanceList)(self.as_raw()) }
}
pub unsafe fn GetModuleInstanceUnloadIndex(&self) -> *const usize {
unsafe { (self.vtable().GetModuleInstanceUnloadIndex)(self.as_raw()) }
}
pub unsafe fn GetModuleLoadedEventCount(&self) -> usize {
unsafe { (self.vtable().GetModuleLoadedEventCount)(self.as_raw()) }
}
pub unsafe fn GetModuleLoadedEventList(&self) -> *const ModuleLoadedEvent {
unsafe { (self.vtable().GetModuleLoadedEventList)(self.as_raw()) }
}
pub unsafe fn GetModuleUnloadedEventCount(&self) -> usize {
unsafe { (self.vtable().GetModuleUnloadedEventCount)(self.as_raw()) }
}
pub unsafe fn GetModuleUnloadedEventList(
&self,
) -> *const ModuleUnloadedEvent {
unsafe { (self.vtable().GetModuleUnloadedEventList)(self.as_raw()) }
}
pub unsafe fn GetExceptionEventCount(&self) -> usize {
unsafe { (self.vtable().GetExceptionEventCount)(self.as_raw()) }
}
pub unsafe fn GetExceptionEventList(&self) -> *const ExceptionEvent {
unsafe { (self.vtable().GetExceptionEventList)(self.as_raw()) }
}
pub unsafe fn GetExceptionAtOrAfterPosition(
&self,
position: Position,
) -> *const ExceptionEvent {
unsafe {
(self.vtable().GetExceptionAtOrAfterPosition)(
self.as_raw(),
&position,
)
}
}
pub unsafe fn GetKeyframeCount(&self) -> usize {
unsafe { (self.vtable().GetKeyframeCount)(self.as_raw()) }
}
pub unsafe fn GetKeyframeList(&self) -> *const Position {
unsafe { (self.vtable().GetKeyframeList)(self.as_raw()) }
}
pub unsafe fn GetRecordClientCount(&self) -> usize {
unsafe { (self.vtable().GetRecordClientCount)(self.as_raw()) }
}
pub unsafe fn GetRecordClientList(&self) -> *const RecordClient {
unsafe { (self.vtable().GetRecordClientList)(self.as_raw()) }
}
pub unsafe fn GetRecordClient(
&self,
id: RecordClientId,
) -> *const RecordClient {
unsafe { (self.vtable().GetRecordClient)(self.as_raw(), id) }
}
pub unsafe fn GetCustomEventCount(&self) -> usize {
unsafe { (self.vtable().GetCustomEventCount)(self.as_raw()) }
}
pub unsafe fn GetCustomEventList(&self) -> *const CustomEvent {
unsafe { (self.vtable().GetCustomEventList)(self.as_raw()) }
}
pub unsafe fn GetActivityCount(&self) -> usize {
unsafe { (self.vtable().GetActivityCount)(self.as_raw()) }
}
pub unsafe fn GetActivityList(&self) -> *const Activity {
unsafe { (self.vtable().GetActivityList)(self.as_raw()) }
}
pub unsafe fn GetIslandCount(&self) -> usize {
unsafe { (self.vtable().GetIslandCount)(self.as_raw()) }
}
pub unsafe fn GetIslandList(&self) -> *const Island {
unsafe { (self.vtable().GetIslandList)(self.as_raw()) }
}
pub unsafe fn NewCursor(&self) -> *mut ICursor {
unsafe { (self.vtable().NewCursor)(self.as_raw(), &IID_ICURSOR_VIEW) }
}
pub unsafe fn BuildIndex(
&self,
report_progress: IndexBuildProgressCallback,
caller_context: *const c_void,
flags: IndexBuildFlags,
) -> IndexStatus {
unsafe {
(self.vtable().BuildIndex)(
self.as_raw(),
report_progress,
caller_context,
flags,
)
}
}
pub unsafe fn GetIndexStatus(&self) -> IndexStatus {
unsafe { (self.vtable().GetIndexStatus)(self.as_raw()) }
}
pub unsafe fn GetIndexFileStats(&self) -> IndexFileStats {
unsafe {
let mut result__ = MaybeUninit::uninit();
(self.vtable().GetIndexFileStats)(
self.as_raw(),
result__.as_mut_ptr(),
);
result__.assume_init()
}
}
pub unsafe fn RegisterDebugModeAndLogging(
&self,
debug_mode: DebugModeType,
error_reporting: *mut ErrorReporting,
) {
unsafe {
(self.vtable().RegisterDebugModeAndLogging)(
self.as_raw(),
debug_mode,
error_reporting,
)
}
}
pub unsafe fn GetInternals(&self) -> *mut IEngineInternals {
unsafe { (self.vtable().GetInternals)(self.as_raw()) }
}
pub unsafe fn GetInternalsConst(&self) -> *const IEngineInternals {
unsafe { (self.vtable().GetInternalsConst)(self.as_raw()) }
}
}