Crates.io | vmsavedstatedump_rs |
lib.rs | vmsavedstatedump_rs |
version | 0.2.0 |
source | src |
created_at | 2018-12-14 11:06:49.563795 |
updated_at | 2019-07-25 20:53:33.743971 |
description | Rust abstractions of VmSavedStateDumpProvider Windows 10 SDK API. |
homepage | |
repository | https://github.com/rafawo/vmsavedstatetodump-rs |
max_upload_size | |
id | 101882 |
size | 32,168,149 |
Rust wrapper of VmSavedStateDump
This project provides a Rust abstraction of VmSavedStateDumpProvider APIs.
VmSavedStateDumpProvider APIs are part of the Windows 10 SDK.
For this wrapper to build properly, the following requirements need to be met by the building machine:
Note: The file paths are based on the default installation path c:\Program Files (x86)\Windows Kits\10
.
The relevant Windows 10 SDK files that this project is wrapping are:
To be able to run code that consumes these APIs, vmsavedstatedumpprovider.dll must be discoverable from within the executables/binary runtime.
When using these APIs, the main entry point is to create a VmSavedStateDumpProvider by supplying path(s) to bin/vsv - vmrs VM saved state file(s).
let vmrs_provider = VmSavedStateDumpProvider::load_vmrs("file_path.vmrs");
let bin_vsv_provider = VmSavedStateDumpProvider::load_bin_vsv("file_path.bin", "file_path.vsv");
Once a provider has been instantiated, all of its related APIs can be used in the context of a loaded VM saved state file.
The best source of code examples on how to use the APIs are the integration tests, found here.
Clone the repo to a folder:
git clone https://github.com/rafawo/vmsavedstatetodump-rs.git
Make sure the machine where you are building has Windows 10 SDK version Windows 10 SDK version 10.0.18362.0 installed. Then run:
cd vmsavedstatetodump-rs
cargo build
Open documentation by running:
cargo doc --open
Finally, the build process should have copied vmsavedstatedumpprovider.dll
to the root directory. Run tests by running:
cargo test
NOTE:There is a bug in vmsavedstatedumpprovider.dll that prevents multiple saved state files from being loaded in sequence, reusing the same handle. The fix is available starting at Windows 10 SDK version 10.0.18362.0
This section briefly describes notes regarding each published crates.io version of this project.
Ordered from latest to oldest.