Derive Macro forward_dll::ForwardModule

source ·
#[derive(ForwardModule)]
{
    // Attributes available to this derive:
    #[forward]
}
Expand description

ForwardModule 派生宏。用于读取 DLL 的导出表,生成用于转发的导出函数。

使用方式:

use forward_dll::ForwardModule;

#[derive(ForwardModule)]
#[forward(target = "C:\\Windows\\System32\\version.dll")]
struct VersionModule;

可以使用 ordinal 来生成 ordinal 转发的编译参数(注意,这一步无法做到基于 ordinal 转发,需要在 build.rs 中读取编译参数文件并打印,请参考本仓库内的 examples/version):

#[derive(ForwardModule)]
#[forward(target = "C:\\Windows\\System32\\version.dll", ordinal)]
struct VersionModule;