View Single Post
Old Mar 26th, 2008, 2:31 PM   #9
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
Re: Reflection Casting

You just happen to have two identically declared interfaces in two different assemblies. But they are still considered different. The 'Station' interface you are casting to is from a different assembly than the 'Station' interface that is implemented.

I wrote a plugin loader for a project back in the 1.1 days. The change you need to make is simple enough.

Example:
PluginBase.dll
-Contains just the interface definition

MyPlugin.dll
-References pluginbase.dll

MyFancyPluginLoader.exe
-Also references pluginbase.dl


People that need to write plugins just need a copy of PluginBase.dll. No headers or such needed. Assembly metadata covers all of that.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote