K
K
Kirito Asumo2016-12-10 06:08:01
DLL
Kirito Asumo, 2016-12-10 06:08:01

How to dynamically load a DLL?

Let's say there are several dll files (no matter how many), they are created separately from the main program. The main program is a console application that accepts commands from the user. How do I load all these DLLs into the program, while they may have different names, but their input method is always named the same for everyone. That is, how to load these dlls into the program and call them when they enter the specified word to the console? (This word is also declared in the dll itself).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rou1997, 2016-12-10
@Rou1997

If both the application and the DLL are MSIL (.NET) assemblies, then Assembly.Load
If the DLLs are native, then use WinAPI - LoadLibrary, GetProcAddress.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question