Create A Plugin System Where Plugins Can Be Dynamically Loaded?

Dec 21, 2008

I am trying to create a plugin system where plugins can be dynamicly loaded (we don't know how many there are, what their classes are called, ...)This is sample code for a plugin:

Code:
Public Interface IPlugin
Sub bla()
Function bla3() As String
End Interface

[code]....

This code SHOULD msgbox("yay") when it finds a type that implements my IPlugin interface. Yet it never finds one. I can't find what I did wrong. It gets to the debug.print("2"), but never gets past the "If GetType(IPlugin).IsAssignableFrom(t) Then".

View 4 Replies


ADVERTISEMENT

Stable Plugins Architecture Using An Appdomain Per Plugin?

Jun 22, 2010

how to create a stable plugin architecture. Stable because I plan on opening up plugin creation to the public but I dont want a sloppy coded plugin to take down my whole application.

So I thought of using an AppDomain per plugin and I did a little seaching. But it seems that even using a temp AppDomain to load plugins and then unloading it once all assemblies have been inspected raises complexity allot and I was planing on using an AppDomain per plugin.

I feel the gained stability (if there is any at all) may be raising the complexity so much the app will never be done..

Is there another way to both create a stable application and at the same time making it extensible?

I cases where the host calls a defined function via say IPluginInterface I guess I can pack a whole lot of try catch blocks around that call but what if a plugin insisted of a timed routine that would run continously without being invoked from the host other that a starting call to StartPluginService or something like that?

If I include a plugin like that in the default AppDomain and it blows up I sure will blow my own foot off right?

View 3 Replies

Create A Plugin System For An Application?

May 14, 2009

i want to implement in a program. I'm not asking for code just some advice and maybe a link or 3 to useful pages on the internet.I want to create a plugin system for an application that i want to make. The idea for the plugin system is based on the following...

1-Some graphics editing programs have what i think is called a filter/effects chain. its where you make a list of filters and settings that the program runs to edit the image.

2-In yahoo pipes you take small parts and use them to complete tasks for you mashup (like pulling all the images returned in a search and displaying them).

The system i want advice on is basically a plugin chain system modeled after these 2 idea's where the user selects plugin's and forms a chain out of them.for instance if i wanted to display a picture then i would form a chain of plugins like this

legend:[(inputs)what it does(outputs)]

[show open dialog plugin(output filepath)] -> [(filepath input)open picture plugin(output bitmap object)]->[(input bitmap object)Display a picture plugin(make a form for display)]

The code for the task's will of course be in the plugin's.The problem is i have never done any plugin system before. the hardest part i need help with is getting the plugin's loaded and sending the output's to each other. Also another problem i think is that the plugin's could be for anything (parsing text, displaying a picture, opening a url, downloading a file, etc, etc)Again I'm not asking for code just advice and some useful links to information.

View 1 Replies

.net - Createinstance() - Put Together A Plugins System With .NET

Apr 12, 2009

I'm trying to put together a plugins system with .NET, and I'm not sure if I'm doing it correctly. The basis of the system is that a specific directory ({apppath}/Plugins/) will have a bunch of precompiled DLLs, and I want to look through each one with reflection, and for every class available, if it inherits a specific base class (this is defined in yet another DLL, but I'll go into that later), then create an instance of it and call a specific function in said instance.

Public Sub ScanPluginsInDirectory(ByVal Directory As String)

Dim Plugins As New IO.DirectoryInfo(Directory)
Dim Files As IO.FileInfo() = Plugins.GetFiles("*.dll")

[CODE]................

The specific problem I have is, I'm not sure this is the right way to do this. Would the method I'm trying to do work, if it can be assumed that A.Plugin() actually exists and any structures and classes referenced here are bug-free?

View 2 Replies

Plugin System In .net?

Jun 1, 2011

Is there a significant enough difference with .NET from regular native code to maketraditional plugin systems not very useful? Either way, there must be some system for making a program extensible after it is compiled. To allow third party development withoureleasing the source code. Anyone have info on this? I said .NET, but of course specifically I mean Visual Basic

View 2 Replies

Collection Of Interfaces (plugin System)

Mar 8, 2012

I am trying to make a plugin system in vb.net and i am using interfaces to do that. I have managed to implement the plugins but now i am having problems with setting the plugins in a dictionary or some sort of array.

The system is simple. I have the main application and i have plugins. The application needs 2 mandatory plugins and that is data and authentication. Other plugins are free to use so i have 3 interfaces. Data, Authentication and CustomPlugins.

I load the plugins with this

CODE:

It works fine like this but i want to make a collection of plugins because i don't know how many plugins the customer make. So initially i thought to make a collection

CODE:

But that doesn't work. The main focus is to load as many plugins as i like but have then in some sort of array. A dictionary would be perfect but is not a must.

View 2 Replies

Make A Plugin Type System For Themes?

Aug 16, 2011

I am looking for the best way to make a plugin type system for themes. have allow users to create custom GDI based controls in a dll plugin that is to be able to be switched on runtime by users. My issue is there is no way to have a dynamic inheritance so how can I make it so the controls show in the toolbox and can be changed on runtime?

View 5 Replies

VS 2008 Extremely Basic MDI Plugin System

Jul 8, 2010

I've got an MDI form with a menustrip that already detects all .dll files in a folder and adds them to the menu to show the user which plugins are available. The thing is that I don't know what to do from here on out...

I'd like to be able to update my program without having to stifle through all my code (it's a very big program) and be able to create basic new features through external DLLs. It's extremely useful for users to make their own features too

Anyway, what a plugin would look like is most likely just a form with controls on it that the user makes themselves in VB. I'd like the plugin to activate through an init() sub within the plugin by clicking on the menu item shown in my MDI form.

I kind of started with my own code but it didn't really get anywhere:

ListFilesInMenuStrip(PluginsToolStripMenuItem, App_Path() & "Plugins")
For Each c As Control In Me.Controls
If TypeOf c Is MenuStrip Then

[Code]....

...Where ListFilesInMenuStrip() is my function to add all the DLLs to the menu and App_Path is just a shortcut function which serves the same purpose as VB6's App.Path() class.

I've also done research but only came across all their weird complex CodeDom and other weird things...This seems so simple but I just can't wrap my mind around it :I

View 4 Replies

VS 2008 - Implementing System To Check Whether Plugin Installed

Jul 8, 2009

I am trying to create a plugin system. I have the actual plugins working fine but now I want to implement a system that knows whether the plugin is installed or not. I can get the plugin name when the form is loaded (ex. "Plugin1"). I then want to check this against something to see if that specific plugin is already there (if not add it) and if it is there is it enabled. I was thinking of doing this with an xml file but thought that might be a lot of work reading and writing each value. I then thought of the My.Settings and was wondering if this is possible. I would want to create an "element" for the name and give it a value of either true or false.

View 10 Replies

.net - Debug Dynamically Loaded Assembly?

Oct 20, 2011

I am debugging an assembly which I loaded dynamically with Assembly.Load(Byte[]), but I am facing some problems.First of all, I can't move the yellow arrow in Visual Studio 2010 to step into other lines of code, and also I am getiing exceptions ("Cannot find the method on the object instance.") when trying to do a quick watch on objects from a third party library (controls from Infragistics for example.)

Dim data = My.Computer.FileSystem.ReadAllBytes(file.FullName)
Assembly.Load(data)

When using Assembly.Load(String), everything works fine, and there are no problems.

Assembly.Load(IO.Path.GetFileNameWithoutExtension(file.Name))

EDIT: I tried loading the debugging symbols for my assembly with Assembly.Load(byte[]. byte[]), but it I sitll get Exceptions when trying to debug objects from third party libraries.

View 2 Replies

IDE :: Create A Plugin For VB 6?

Jan 19, 2010

I am working on a migration project to convert a Visual Basic 6 system to a new platform. To make life easier for the programmers I would like to develop some plug-ins for the Microsoft Visual Basic 6 IDE. But until now I've found only information about using vb6 to write plug-ins for other programs. how to create a plug-in for the Microsoft Visual Basic 6 IDE (SP6)?

View 3 Replies

Getting Stack Trace Information From A Dynamically Loaded?

Oct 26, 2009

My goal here is to get stack trace information from a dynamically loaded assembly. If the dynamically loaded assembly just throws the error back to the caller, the stack trace information doesn't tell you the location in the dynamic assembly where the error occurred. If I throw my own exception, passing in the original exception, it will get added as an inner exception and will have the information need. I'm trying to avoid changing all my dynamic assemblies to throw new exceptions.

Public Class ErrorPlugin
' Example Function from plug in DLL
Public Function SimpleExample() As Double
Dim RentedUnits As Double = 42

[code]....

View 2 Replies

Uniquely Identify Dynamically Loaded Controls?

Jun 15, 2012

I have a form which creates controls dynamically and adds event handlers by itself (already coded that part). As for now, I have a hidden table with the object list which loops through the controls and finds it by name (using the Me.Controls collection). How ever, does anyone knows if a dynamically created control may have a special unique code ?

View 2 Replies

C# - Subscribing Event Of Dynamically Loaded User Control?

Oct 27, 2011

I have two usercontrols. One is loaded statically another dynamically.In the aspx page I can write as follows for static user control.

ProgramAddSchedule.onNewProgram += new AddProgram.OnNewProgramClick(onNewProgram_btnHandler);

But dynamically loaded control's event I am not able to get

Control myUserControl = (Control)Page.LoadControl("~/View/EditScheduleProgram.ascx");

How do I get the event of the dynamically loaded control?

View 2 Replies

Handle Events On The Dynamically Loaded User Control?

Jun 20, 2011

I have the user control that is loaded dynamically. When the user save the data by clicking on the Save button, a raise event is passed.

Public Sub RaiseCloseEvent(ByVal sender As Object, ByVal e As System.EventArgs)
RaiseEvent Close(sender, e)
Debug.Print(String.Format("The control {{0}} was closed by {{1}}.", Me.Name, sender.ToString))
End Sub

In the save button I have called the RaiseCloseEvent as follows:

RaiseCloseEvent(sender, e)

Now, how can I close the user control form? Any Idea? I have used VB.Net language.

View 2 Replies

Read Interface Details From Dynamically Loaded Assembly?

Nov 16, 2009

We loading and executing an assembly dynamically from code. While reading a dynamically loaded assembly how can we find an interface within the assembly which is marked (decorated) by another class like below

<ExternalDataExchange()> _
Public Interface IwfService
Event firstEvent As EventHandler(Of ExternalDataEventArgs)
End Interface

Here how can we find that we have interface "IwfService" which is marked with "ExternalDataExchange()" class.

View 1 Replies

Calculations For Data In Datagridview Dynamically Loaded From Access Database

Feb 2, 2010

I have a database that dynamically loads from Access into a datagridview. I have to enter data manually into one column in this datagridview. I need to be able to perform calculations to this data, for example I need to sum the data in this column, sqaure it and substract it from individual sqaures of the data in the cells. I should be able to sum it sum(22,33,44,53,67,23)^2-sum(22^2,33^2,...23^2). The number of columns keep changing depending on the database I choose to load, so I need to code this dynamically too. I am not really a VB person. I did the same in excel using Visual Basic and I am trying to do it in this Visual Basic environment.I built a tool in excel(VBA) that do some statistical calculations and data analysis and I am trying to build the same in Visual Basic.

View 10 Replies

VS 2008 : Work Properly With The Reflection To Create A Module/plugin-based Application?

Sep 24, 2009

I have found a lot of articles about Reflection and know how to create a class. I'm practicing how to work properly with the reflection to create a module/plugin-based application.So I found a simple example which is working great, but it isn't dynamic enough, 'cause it is hard-coded. I need to read all the .dll's from the application.startuppath & "modules" & *.dll and get there names (without the .dll).Code is was testing for practice returns the form (I know that this is not the correct way to call the dll dynamically):

vb.net
Imports System.Reflection Public Class Form1 Private Sub cmdOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOK.Click Dim assemblylink As [Assembly] assemblylink = [Assembly].LoadFrom(Application.StartupPath & "/" & "LoginAssembly.dll") Dim LoginFrm As Form LoginFrm = assemblylink.CreateInstance("LoginAssembly.Login") LoginFrm.Show() End Sub

View 8 Replies

Module As In System Loaded DLL?

Apr 29, 2010

I have a few module questions i'd like to ask as i cant find much info on the internet.

How do you know if a file is locked by a module? I know how to display modules of a file but surely all 10+ DLL are actually locking the file from being deleted?

Basically im wanting to make a file unlocked.Secondly is this the correct way to unload a DLL

[Code]...

View 4 Replies

VS 2005 System.EnterpriseServices.dll Error When Application Is Loaded?

Oct 19, 2009

why this error System.EnterpriseServices.dll appear when i run the Installed program as testing in another computer..

i did it in 5 computers for testing i got 3 has the same error (the error above) but the other 2 units it work fine...

View 8 Replies

When Use System.io.ReadLines The Content Of The File Should Not Be Loaded To Memory Right

Feb 13, 2011

When we use system.io.ReadLines the content of the file should not be loaded to memory right? say I want to create a function. The function accept a string, say "post.txt" where post.txt is a large file (3G) I want to put the first 100k line of post.txt on post.txt and the rest on reserve_post.txt

View 11 Replies

Developing An Inventory Management System / Loaded And Displayed On Listview

Jun 6, 2011

am developing an inventory management system. have two listview controls. one for ITEM and another for details pertaining date, quantity, cost, issued to and so on. i want a vb.net code that if a given item in listview A is clicked, listview B details are cleared and then the details of that item are loaded and displayed on listview B.there is no criteria of loading like between a range of dates; just all records in the database.

View 1 Replies

UNLOAD An Assembly That Was Loaded By Using System.Reflection.Assemblie.Load Method?

Jan 15, 2007

Our company has an app that load their components by System.Reflection.Load (By the way, an awesome technique )But, we start to monitorate the application and detect a extrange grow up of memory (actually when our application still all day on air, their allocate memory on task manager is 200 MB plus memory) And all of our components (60 plus DLLs) is load by this technique.My doubt is how to deallocate this assemblies or how the best way to deallocate any assemblies loaded by the System.Reflection.Assemblie.Load method?

View 10 Replies

Create A Template Of Data That Will Later Be Loaded Into Another Form?

Mar 10, 2009

I am designing a form that will create a template of data that will later be loaded into another form.From a menu command "Create New Template" I will need to ask how many Fields will be needed for the new template in an input box. If the user would input say 10, then I need to generate 10 labels, 10 text boxes, & 10 combo boxes. Each group (label, Text Box & Combo Box) on its own row on the form.I also want create the data mapping for each of them at this time.Once I have achieved this then I will add a form that will lookup the template name, and row count given from the above form via the database and load the required rows of items for further data entry.

Since I will have a MAX row limit I thought about designing a form using a Table Layout panel with 25 Rows and 5 columns then doing some sort of .visible true/false for the layout panel row after the user input of row/field quantities.Another question is resizing the form around only the visible rows.

View 4 Replies

Make Plugins For The Program?

May 20, 2011

expand my program by allowing people to make plugins for the program. I thought of a way to do this: They can make a form/plugin on a form in VB then they can save it and upload the Form1.VB file and when you put that in a folder made by my program in "My Documents" my program will run that form like its, its own.

View 3 Replies

Plugins And Extensions For A Vb Application?

Mar 9, 2010

Firstly, I understand that this might sound more or less abstract, but this is because I have no previous experience in such applications. I completed an application using Visual Basic and is running and tested. What I want to do is
to make this application expendable i.e I could write other pieces of code and I would just plug it in to the application "somehow" and it would be added as a functionality.

View 1 Replies

Making A Billing System / Dynamically Changing UI?

Aug 15, 2011

we're working on a billing systemCurrently I am working on the categories module. Here's the thing:I need a dynamically changing UI. So the user can add categories, delete them and teh UI would accordingly add or remove controls automatically.I used DataGridView, but since the fetching and storing of data will not be done in a database, I need to fetch it and update it using an HTTP API, the data bindings are causing problems as I need to update, Insert or delete data using functions instead of letting VB do the hard work. I tried creating a datatable and checking for changes everytime user added/deleted/changed a row, but again the problem is: in a datatable I am not able select what type of control represents the column. For Example I have a parent category column where the control needs to be a combo box. The datatable's columns don't seem to provide an option and are automatically set to text box.I am thinking there is a really cool way of doing this that I am unaware of. all the VB.NET books I have read only seem to use DataGridView in conjunction with some sort of a database and not independantly.

View 4 Replies

Eclipse IDE, C# And Plugins That Supports .Net Framework4.0?

Sep 4, 2011

I want to use C# and VB.Net in Eclipse 3.7 Indigo.VB.netI could not find the plugin about VB.net in Eclipse.So I want to know is there a plugin for Eclipse that allows you to write C# or VB.net code using the .Net Framework 4.0 or 3.5?

View 1 Replies

Editing Settings For Individual Plugins?

Jun 6, 2012

I have a vb.net project that loads "plugin" dlls at runtime to crunch some data in slightly different ways and return the results. To do that, all the plugins implement the same interface, so the GUI couldn't care less how the plugin arrives at its final dataset, just so long as all the plugins deliver it back to the GUI in the same way.

I'd like to set up per-plugin options in addition to the main program options. I have an options form that accepts an object of type System.Configuration.ApplicationSettingsBase and displays the contents in a PropertyGrid control, so it'll show any My.Settings object the same way. Question is, how do I pull the My.Settings object out from a plugin that's loaded at run-time?

View 1 Replies

Can't Make A Seekbar Control Using A Windowmediaplayer And Vlc Plugins?

Oct 10, 2011

I cant make a seekbar control using a windowmediaplayer and vlc plugins

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved