Skip to main content

spawn_wait_and_free_current_module_once

Macro spawn_wait_and_free_current_module_once 

Source
macro_rules! spawn_wait_and_free_current_module_once {
    ($pid:expr, $teardown:expr) => { ... };
}
Expand description

Auto self unload, i.e. wait for the injector process and unload self.

  • pid: Pid

  • teardown: impl FnOnce() -> u32 + Send + 'static

    teardown should clean up all the references to the DLL’s code, including hooks and threads.

Because using #[dtor] will cause some data and code always be compiled even not used, this is implemented as a macro instead of a function.