How to load a dll created via VB use Assembly.LoadFrom

W

wolf

There are some dll writed by VB. When I try to load them by
method Assembly.LoadFrom(string), the program throw an exception
to tell me the dll is not valid.

Are these dlls can not be loaded dynamic?

In fact, my goal is that I could invoke the method in these dlls
by pass a dynamic string.For a instance, when I input a string
"method1" in a textfield and click OK button, the method1() method
in a dll should be invoked.

How should I do?

Thanks!
 
M

Mattias Sjögren

There are some dll writed by VB.

Classic VB or VB.NET? In other words, is it a COM DLL or a .NET
assembly?

In fact, my goal is that I could invoke the method in these dlls
by pass a dynamic string.For a instance, when I input a string
"method1" in a textfield and click OK button, the method1() method
in a dll should be invoked.

How should I do?

The easiest way to do that in VB.NET is to use the CallByName
function.



Mattias
 
V

vinny

HI

I think so u have an option to to add the reference in a project with
visual studio.net,did u try that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top