Struct dynlib::LoadWinDynLib
[−]
[src]
pub struct LoadWinDynLib { /* fields omitted */ }
Options for loading a Dynlib/Exe into windows.
This structure acts like the OpenOptions
structure in StdLib.
For full documentation see The
Docs
A cursory explaination is provided before each function. Each function
corresponds to one flag in the LoadLibraryExA
interface.
Methods
impl LoadWinDynLib
[src]
fn new() -> Self
Create a new options value
fn ignore_code_authz_level<'a>(&'a mut self) -> &'a mut Self
Ignore Code Auth Levels
This value tells the loader not to check App Locker or Software Software Restriction Polices for the DLL/EXE you are loading.
If that DLL/EXE's dependencies DO have Code Auth Level restrictions you may will encounter an error.
fn as_datafile<'a>(&'a mut self) -> &'a mut Self
Library As Data File
The library will be loaded into virtual memory. The memory will not be flagged as executable, so calling functions from the library will result in errors.
This is used in conjuction with other flags/functions not for dynamic linking.
fn as_exclusive_datafile<'a>(&'a mut self) -> &'a mut Self
Library as Data File Exclusive
Same as the above but this ensures you have WRITE permission to the virtual memory space the DLL/EXE is loaded into
fn as_image_resource<'a>(&'a mut self) -> &'a mut Self
Library as image resource
Loads a DLL as a mapped file with read only access into memory. This will by-pass any and all startup routines the DLL may invoke.
fn search_application_dir<'a>(&'a mut self) -> &'a mut Self
Search Application Dir
Allows the developer to not provide a path, but only a DLL name. The windows loader will search the local application directory for the specified DLL name.
No other directories will be searched.
fn search_default_dirs<'a>(&'a mut self) -> &'a mut Self
Search Default Dirs
Search ANYWHERE the DLL could be. Application Dir, System32, User Dir, AND environment path descripted loations.
fn search_dll_load_dir<'a>(&'a mut self) -> &'a mut Self
Search DLL Load Dir
This modifies the state of future searches. If you find a DLL with this flag then only the directory specified is searched. No others.
fn search_system32<'a>(&'a mut self) -> &'a mut Self
Search System32
Search the %windows%\system32 directory for the DLL
fn search_user_dirs<'a>(&'a mut self) -> &'a mut Self
Search user dirs
Search directors that are added with AddDllDirectory
or the
SetDllDirectory
functions.
fn altered_search_path<'a>(&'a mut self) -> &'a mut Self
Altered Search Path
If you give me a full path I'm going to ignore it. You cannot combine this with any other search flag.
fn load(&self, path: &str) -> Result<DynLibWin, Error>
Attempt the Load
Give the system a path. This function will re-allocate the given
string, to append a null terminator to the end. If you provide the
full ensure you use the proper path seperator I.E.: '\' not the unix
'/'. If you are not using rust's raw strings (str declartinon that
starts with r"
). You will need to use the \\
so the backslash
doesn't escape.
NOTE
Only ASCII paths are supported. This is a limitation of the Rust
StdLib OsString
type. Windows has both UTF-16 and ASCII-8 string
types.
Trait Implementations
impl Copy for LoadWinDynLib
[src]
impl Clone for LoadWinDynLib
[src]
fn clone(&self) -> LoadWinDynLib
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more