Module pelite::resources::version_info
source · [−]Expand description
Version Information.
See Microsoft’s documentation for more information.
Examples
See also the examples/version_info.rs
example which reads and prints the version info of the given file.
use pelite::PeFile;
fn example(bin: PeFile<'_>) -> Result<(), pelite::resources::FindError> {
let resources = bin.resources()?;
let version_info = resources.version_info()?;
// Get and print the fixed file info
println!("FixedFileInfo: {:?}", version_info.fixed());
// Get the first available language
let lang = version_info.translation()[0];
// Query some properties
let company_name = version_info.value(lang, "CompanyName");
// Print all the properties for this language
version_info.strings(lang, |key, value| {
println!("{}: {:?}", key, value);
});
// Dump the version info into hashmaps for later consumption or serialization
let file_info = version_info.file_info();
// Transform the version info back into source code
let source_code = version_info.source_code();
Ok(())
}
Modules
Fixed file info constants.
Structs
VersionInfo parsed into HashMaps.
Language and charset pair.
Version Information.
Traits
Visitor pattern to view the version information details.