pub struct LdrProxy<'a> {
pub module: &'a str,
}Expand description
A helper struct to interact with dynamic module loading with Windows APIs via Proxy.
The LdrProxy struct provides methods to queue work items and manage operations
involving dynamic libraries using Windows APIs.
Fields§
§module: &'a strThe name of the module to be loaded or operated on.
Implementations§
Source§impl<'a> LdrProxy<'a>
impl<'a> LdrProxy<'a>
Sourcepub fn work(&self) -> Option<NTSTATUS>
pub fn work(&self) -> Option<NTSTATUS>
Queues a work item to load the specified module asynchronously.
This method wraps the RtlQueueWorkItem Windows API, dynamically resolving
the function and scheduling the specified module to be loaded.
§Returns
Some(NTSTATUS)- Status code returned by theRtlQueueWorkItemAPI if successful.None- If the function or module cannot be resolved.
Sourcepub fn timer(&self) -> Option<NTSTATUS>
pub fn timer(&self) -> Option<NTSTATUS>
Schedules a timer to execute the loading of the specified module.
This method uses the RtlCreateTimer API to create a timer queue
and schedule the execution of the LoadLibraryA function.
§Returns
Some(NTSTATUS)- Status code returned by theRtlCreateTimerAPI if successful.None- If the function or module cannot be resolved.
Sourcepub fn register_wait(&self) -> Option<NTSTATUS>
pub fn register_wait(&self) -> Option<NTSTATUS>
Registers a wait event to execute the loading of the specified module.
This method uses the RtlRegisterWait API to register an event-based
callback that triggers the execution of the LoadLibraryA function.
Some(NTSTATUS)- Status code returned by theRtlRegisterWaitAPI if successful.None- If the function or module cannot be resolved.