In C#, I am using an external dll, using loadLibrary, like this:
public class Utilities
[DllImport("kernel32", CharSet= CharSet.Auto, SetLastError=true)]
private static extern IntPtr LoadLibrary(string librayName);
[DllImport("kernel32", CharSet= CharSet.Auto, SetLastError=true)]
private static extern IntPtr GetProcAddress(intPtr hwnd, string procedureName);
public static LoadAssembliesAndMethods() {
string mainPath = AppDomain.CurrentDomain.BaseDirectory;
string path = Path.Combine(mainPath, "MyAssembly.dll");
IntPtr ptr = LoadLibrary(path);
// What to do next in order to get all the list of functions/methods/class in the library and use them?
}
The dll has no signature of Assembly (it's a 3rd party), so I cannot do
Assebly.LoadFile(path);
I need to get all of the functions/methods/class of the dll, and use some of them, using C#.
How can I do that.