Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to make an application that supports plugin as Adobe Photoshop.Now I'm writing the simple application:
the main program have functions such as sum,subtraction,division.
the plugin use a formula: (a+b)/c.
It call functions from the main program.I don't how to do that
Posted
Comments
Richard MacCutchan 7-Mar-15 4:31am    
What do you mean by plugins? The obvious way to do this in C# would be to create a class library that you can link to other programs.
sharpvn 8-Mar-15 6:21am    
I know about dynamic library (dll file).My problem is:
1.How to the plugin call funtions from the main program ?
2.How to the main program get the result from the plugin ?
Richard MacCutchan 8-Mar-15 8:20am    
I think you probably need to investigate the use of COM objects, which are more suited to what you are asking. See http://www.codeproject.com/Articles/633/Introduction-to-COM-What-It-Is-and-How-to-Use-It.

Start learning Managed Extensibility Framework[^]...
 
Share this answer
 
Comments
sharpvn 10-Mar-15 1:44am    
thanks,that is start point
Kornfeld Eliyahu Peter 10-Mar-15 1:56am    
You may want to read these:
http://www.codeproject.com/Articles/668153/Extensible-Web-Application
http://www.codeproject.com/Tips/622400/Windows-Service-to-Host-Multiple-WCF-Services
In both these articles I showcase MEF - not exactly what you asking for, but these are working samples and can show you how easy MEF can be...
There is an example of how to do this here:
How to create an easy plugin-system in C#[^]
 
Share this answer
 
Comments
sharpvn 10-Mar-15 1:48am    
thanks.easy to get plugin

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900