Sounds as a re-entrance problem. Can you decouple the callchain by
introducing another thread or a well placed call to a messagepump?

Sorry if this to cryptic, i cannot give you more details now, i'm
mailing through my N95 :)

// Ryan

2007/10/18, Graeme Taylor <[EMAIL PROTECTED]>:
> Thanks Peter,
>
> I'm not referencing the type directly, I'm referencing it as the base
> class rather than an interface - surely that should work?
>
> Code snippet:
>
> public partial class MessagingSvc: ServiceBase
> {
>   private PluginManager _pluginMgr;
>   private RemoteListener _remoteListener;
>
>   protected override void OnStart(string[] args)
>   {
>     _pluginMgr = new PluginManager();
>     //  Types are now loaded in
>
>     //  This works (MessageSender is the base class):
>     MessageSender obj = (MessageSender)_pluginMgr.CreateInstance
> ("dbGrid.Plugins.TestPlugins.Test1");
>     obj.IsRunning = false;
>
>     //  RemoteListener regsiters the channel for remote commands and
> raises events
>     _remoteListener = new RemoteListener();
>     RemoteListener.StartCommandReceived += new
> SenderCommandReceivedEventHandler(CmdListener_StartCommandReceived);
>     _remoteListener.StartListen();
>
>   }
>
>   private void CmdListener_StartCommandReceived()
>   {
>     //  This is executed when the remote 'Start' command is received
>     //  Fails with issues described previously
>     MessageSender obj = (MessageSender)_pluginMgr.CreateInstance
> ("dbGrid.Plugins.TestPlugins.Test1");
>     obj.IsRunning = false;
>   }
>
> }
>
> ===================================
> This list is hosted by DevelopMentor(r)  http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to