exe_write_path

Function exe_write_path 

Source
pub fn exe_write_path(pe: &PeProgram, path: &Path) -> Result<Url>
Expand description

将 PE 程序写入到指定路径的 EXE 文件

这是一个高级 API 函数,隐藏了 ExeWriter 的直接使用细节。

§参数

  • pe - 要写入的 PE 程序
  • path - 输出文件路径

§返回值

成功时返回文件的 URL,失败时返回 GaiaError

§示例

use pe_assembler::exe_write_path;
use std::path::Path;

// let pe_program = /* 创建 PE 程序 */;
// let output_path = Path::new("output.exe");
// let url = exe_write_path(&pe_program, output_path)?;