Manages unmanaged DLLs.
More...
|
| void | LoadDll (string dllName) |
| | Loads the given DLL from the appropriate subdirectory, depending on the current bitness. More...
|
| |
| void | LoadDll (string dllName, string expectedSha256Hash) |
| | Loads the given DLL from the appropriate subdirectory if its Sha1 hash matches the provided hash. More...
|
| |
| void | UnloadDll (string dllName) |
| | Unloads a previously loaded DLL. More...
|
| |
|
| DllManager (params string[] loadDlls) |
| |
|
void | Dispose () |
| |
|
| static bool | DllExists (string dllFileName) |
| | Checks whether a DLL exists in the application directory or in the custom AlternativeDir. More...
|
| |
| static string | LocateDll (string dllName) |
| | Attempts to locate a DLL file in the canonical location (subdirectory of the application directory) or, if set, in an alternative location. More...
|
| |
|
|
virtual void | Dispose (bool calledFromDispose) |
| |
|
|
static string | AlternativeDir [get, set] |
| |
Manages unmanaged DLLs.
Unloads any loaded DLLs upon disposal.
Definition at line 31 of file DllManager.cs.
| static bool Bovender.Unmanaged.DllManager.DllExists |
( |
string |
dllFileName | ) |
|
|
inlinestatic |
Checks whether a DLL exists in the application directory or in the custom AlternativeDir.
- Parameters
-
| dllFileName | DLL file name to check |
- Returns
- True if the file exists at either of the two locations; false if not.
Definition at line 48 of file DllManager.cs.
| void Bovender.Unmanaged.DllManager.LoadDll |
( |
string |
dllName | ) |
|
|
inline |
Loads the given DLL from the appropriate subdirectory, depending on the current bitness.
The DLL is expected to reside in a subdirectory of the entry point assembly's directory, in "bin/lib/$(Platform)", where can be "Win32" or "x64", for example. If DllManager.AlternativeDir is set, the subdirectories there will be queried as well.
- Exceptions
-
- Parameters
-
| dllName | Name of the DLL to load (without path). |
Definition at line 134 of file DllManager.cs.
| void Bovender.Unmanaged.DllManager.LoadDll |
( |
string |
dllName, |
|
|
string |
expectedSha256Hash |
|
) |
| |
|
inline |
Loads the given DLL from the appropriate subdirectory if its Sha1 hash matches the provided hash.
The DLL is expected to reside in a subdirectory of the entry point assembly's directory, in "bin/lib/$(Platform)", where can be "Win32" or "x64", for example. If DllManager.AlternativeDir is set, the subdirectories there will be queried as well.
- Parameters
-
| dllName | Name of the DLL to load (without path). |
| expectedSha256Hash | Expected Sha1 hash of the DLL. |
- Exceptions
-
Definition at line 155 of file DllManager.cs.
| static string Bovender.Unmanaged.DllManager.LocateDll |
( |
string |
dllName | ) |
|
|
inlinestatic |
Attempts to locate a DLL file in the canonical location (subdirectory of the application directory) or, if set, in an alternative location.
- Parameters
-
- Returns
- Complete path to the DLL file, or String.Empty if the DLL was not found.
Definition at line 61 of file DllManager.cs.
| void Bovender.Unmanaged.DllManager.UnloadDll |
( |
string |
dllName | ) |
|
|
inline |
Unloads a previously loaded DLL.
Does nothing if the DLL was not loaded.
- Parameters
-
| dllName | Name of the DLL to unload. |
Definition at line 192 of file DllManager.cs.
The documentation for this class was generated from the following file: