DllLibrary
Ecng.Interop
Represents a base class that manages a DLL library and provides access to its exported functions.
Hereda de: Disposable
Constructores
DllLibrary
protected DllLibrary(string dllPath)
dllLibrary = DllLibrary(dllPath)
Represents a base class that manages a DLL library and provides access to its exported functions.
- dllPath
- The file path to the DLL.
Propiedades
DllPath
public string DllPath { get; private set; }
value = dllLibrary.DllPath
dllLibrary.DllPath = value
Gets the file path to the DLL.
DllVersion
public Version DllVersion { get; }
value = dllLibrary.DllVersion
Gets the version of the DLL by retrieving product information.
Handler
protected IntPtr Handler { get; }
value = dllLibrary.Handler
Gets the pointer to the loaded DLL.
Métodos
DisposeNative
protected override void DisposeNative()
dllLibrary.DisposeNative()
Disposes native resources associated with the DLL.
GetHandler``1
protected T GetHandler<T>(string procName)
result = dllLibrary.GetHandler(procName)
Retrieves a function pointer from the DLL and casts it to the specified delegate type.
- procName
- The name of the procedure to retrieve.
Devuelve: A delegate of type .
TryGetHandler``1
protected T TryGetHandler<T>(string procName)
result = dllLibrary.TryGetHandler(procName)
Attempts to retrieve a function pointer from the DLL as the specified delegate type. Returns null if not found.
- procName
- The name of the procedure to retrieve.
Devuelve: A delegate of type , or null if the procedure is not found.