Skip to content

zeon256/dllmain-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dllmain-rs

A proc macro to generate dllmain

Cargo.toml

dllmain-rs = { git = "https://github.com/zeon256/dllmain-rs" }
winapi = { version = "0.3.9", features = ["minwindef"]}

Example usage

use std::thread;
use winapi::shared::minwindef::{self, HINSTANCE, DWORD, LPVOID, BOOL};

#[dllmain_rs::entry]
fn real_entry() {
    // unsafe { consoleapi::AllocConsole(); }
    let base_addr = get_base_addr();
    println!("Found base address: {:#X?}", base_addr);
    thread::spawn(move || {
        // hack thread
    });
}

About

A proc macro attribute to generate dllmain

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages