Click here to Skip to main content
15,925,895 members
Home / Discussions / C#
   

C#

 
AnswerRe: Detect Edges Pin
Christian Graus19-Feb-06 8:26
protectorChristian Graus19-Feb-06 8:26 
AnswerRe: Detect Edges Pin
A.A.19-Feb-06 21:10
A.A.19-Feb-06 21:10 
GeneralRe: Detect Edges Pin
haytham_mohammad20-Feb-06 5:50
haytham_mohammad20-Feb-06 5:50 
Questioncontrol container design time problem Pin
bahaa_sa519-Feb-06 0:24
bahaa_sa519-Feb-06 0:24 
Questionchange a user's group or account type Pin
am2h18-Feb-06 23:36
am2h18-Feb-06 23:36 
QuestionwseAbout "WebBrowser" control Pin
zhouyinhui18-Feb-06 23:28
zhouyinhui18-Feb-06 23:28 
QuestionGetting progress of a Method Pin
emran83418-Feb-06 21:00
emran83418-Feb-06 21:00 
AnswerRe: Getting progress of a Method Pin
Stanciu Vlad18-Feb-06 22:07
Stanciu Vlad18-Feb-06 22:07 
QuestionPropery Grid Pin
deepscyberpulse18-Feb-06 18:56
deepscyberpulse18-Feb-06 18:56 
QuestionForm Count Pin
deepscyberpulse18-Feb-06 18:54
deepscyberpulse18-Feb-06 18:54 
QuestionMemory Reading Pin
Expert Coming18-Feb-06 17:55
Expert Coming18-Feb-06 17:55 
AnswerRe: Memory Reading Pin
Sean8918-Feb-06 18:19
Sean8918-Feb-06 18:19 
QuestionLink label transparency... Pin
Kasic Slobodan18-Feb-06 16:27
Kasic Slobodan18-Feb-06 16:27 
AnswerRe: Link label transparency... Pin
Joshua Quick18-Feb-06 17:16
Joshua Quick18-Feb-06 17:16 
GeneralRe: Link label transparency... Pin
Kasic Slobodan19-Feb-06 3:43
Kasic Slobodan19-Feb-06 3:43 
GeneralRe: Link label transparency... Pin
Joshua Quick19-Feb-06 10:43
Joshua Quick19-Feb-06 10:43 
GeneralRe: Link label transparency... Pin
Kasic Slobodan19-Feb-06 14:01
Kasic Slobodan19-Feb-06 14:01 
GeneralRe: Link label transparency... Pin
mav.northwind19-Feb-06 20:08
mav.northwind19-Feb-06 20:08 
GeneralRe: Link label transparency... Pin
Kasic Slobodan20-Feb-06 4:53
Kasic Slobodan20-Feb-06 4:53 
QuestionGetType() fails, but why Pin
User 665818-Feb-06 14:01
User 665818-Feb-06 14:01 
AnswerRe: GetType() fails, but why Pin
darkelv18-Feb-06 14:39
darkelv18-Feb-06 14:39 
Did you try Assembly.Load() instead? It works for me when the plugin is not in the same folder.

I assume you have interface setup for the class, right?

-- modified at 20:57 Saturday 18th February, 2006

[edit] Sorry, I was looking at wrong part of the code, Assembly.Load() was used to check whether the plugin can be loaded. this is where the assembly is really loaded on my app:

Type ObjType=null;
Assembly assembly = null;
assembly = Assembly.LoadFrom(path); <---- full path
if(assembly != null)
{
ObjType = assembly.GetType("you.class.here");
}

if(ObjType != null)
{
object[] args = new object[2];
args[0] = cm;
args[1] = catalog;

this.database = (IDatabaseInterface)Activator.CreateInstance(ObjType, args);
}

-- modified at 21:02 Saturday 18th February, 2006
[edit again]

Some other stuff that I found after 2 painful days of trial and error
1. Have an interface for the class
2. You must put the interface class in a seperate assembly. Putting it in your main assembly won't work.
3. You have to keep the assemblyversion (main, interface, the plugins) a constant and may need to sign the assembly too.
GeneralRe: GetType() fails, but why Pin
User 665819-Feb-06 2:10
User 665819-Feb-06 2:10 
AnswerRe: GetType() fails, but why Pin
Guffa19-Feb-06 2:17
Guffa19-Feb-06 2:17 
GeneralRe: GetType() fails, but why Pin
darkelv19-Feb-06 2:58
darkelv19-Feb-06 2:58 
GeneralRe: GetType() fails, but why Pin
User 665819-Feb-06 4:08
User 665819-Feb-06 4:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.