you can load DLL file dynamically when you need it,
in c# you can use .Net Reflection (if dll is developed in .Net framework), for example :
var DLL = Assembly.LoadFile(@"path\to\your.dll");
Type t = DLL.GetType("myAssembly.ClassName");
CustomType result = t.InvokeMember("methodName", BindingFlags.InvokeMethod, null, t, new object[] { @"method argument" });
if mentioned dll is not developed under .Net framework but you are forced to use .Net framework (for more information see this) :
int hModule = LoadLibrary(@"path\to\your.dll");
if (hModule == 0) return false;
IntPtr intPtr = GetProcAddress(hModule, "yourmethod_PTR");
if you want to use in c/c++ you can use following code :
HINSTANCE hGetProcIDDLL = LoadLibrary("path\\to\\your.dll");
if (hGetProcIDDLL == NULL) {
std::cout << "dll not found" << std::endl;
}
int a = function_to_call("arguments");
NOTE: if you want to load dll from unknown source I recommend to use c/c++, because in c/c++ you can manage your memory easier and free all your resources after dll loading,