I wrote a dll in C # .net that calls another third-party .NET DLL in the application. This works great when I tested it using a console application written in C # .NET, also using the following code:
Assembly u = Assembly.LoadFrom(dllLocation); Type t = u.GetType("MyLIB.CLass"); MethodInfo m = t.GetMethod("Method"); object[] myparam = new object[1]; myparam[0] = fileLocation; result = (string)m.Invoke(null, myparam);
Please note that some files are downloaded in the place where the dll was originally downloaded, using:
string path = Assembly.GetExecutingAssembly().Location; path = Path.GetDirectoryName(path);
But the problem is that when I tried to call it using VB6, I get an error that it cannot load the third-party DLL. Please help, as I do not seem to know what is going on.
source share