Hi,
I'd like to create application that can update and improve functions by dll files as plugins. i wrote my own dll and check a folder (eg: Plugins) for the files with .dll extension and for each dll files in that folder i want to add all of the file's functions into my main application. how can i do this
here's a short and simple example:
dll:
Public Class MSGDll
Public Sub SendMsg(byval Msg as string)
msgbox(msg)
end sub
End class
Main app:
Public Class Form1
Private Sub form_load(...)
for each path as string in my.computer.filesystem.getfiles("Plugins")
me.listbox1.items.add(path)
>>> and here i would write a code that imports the SendMsg(path as string) function of the found MSGDll.dll file<<<
end sub
end class
Could anybody tell me some solution
thnx for the help;

working with dll's as plugins
Roger Jennings
I think you will need to look a Reflection, in the System.Reflection Namespace. Look at the Assembly.Load() method for a basic sample. Exploring the help on Reflection will give a few samples.
HandledException
In addition, you may want to check out the Provider Pattern. There is a good article at http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnaspnet/html/asp02182004.asp. Injecting functionality in an existing library is significantly more difficult. There are a couple instances where an Agile methodology may be helpful, but discussion of that topic is beyond the scope of the current form.
Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx
Keith Seifert