Calling Assembly

S

Steve Long

Hello,
I've got an app that supports plugins. It's an exe and both it and any
plugin must implement iPlugin to enable communication between the exe and
the .dll plugin. My problem is that I need to get a type from the exe from
within the plugin but if I call [Assembly].GetCallingAssembly in the
plugin's constructor, the returned assembly's name is mscorlib rather than
the exe that new'ed it. How can I get the assembly of the exe in this case?

Any help is much appreciated

Steve
 
M

Mattias Sjögren

Steve,
My problem is that I need to get a type from the exe from
within the plugin

Can't you pass it tp the plugin as a property or method parameter on
your IPlugin interface?



Mattias
 
S

Steve Long

Yea, I guess I can. It just means that I have to change a couple of dll is
all. I was trying to work around having to do that. Fortunately, I wrote all
of the assemblies so I can do what I want. It would be cool to get it
through reflection though.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top