By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,135 Members | 1,184 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,135 IT Pros & Developers. It's quick & easy.

Sending data to dll plugin problem!! help.

P: n/a
I have 3rd party dll plugin COM interface, when loaded executes the following
functions.

public class Test: IPlugin
{
public void Innitialize(IPluginApp obj, int pluginHandle)
{
//gets the plugin obj dynamically to work with third party application.
//can be added events etc.
}
public shutdown()
{
//this is executed with plugin is terminated.
}
}

I have our application written in c# that should reference this plugin
assembly
and send some data to plugin from outside. But my problem is im unable to
send
data to plugin from outside that assembly. Plugin should accept the data and
do
further processing using IPluginApp object. IPluginApp object is null
outside that
Innitialize method. I am unable to create copy of that object using late
binding
concepts as that is an interface pointer. Can anyone suggest me some
techniques
to send data to plugin from outside.

Oct 18 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Aravind wrote:
I have 3rd party dll plugin COM interface, when loaded executes the following
functions.

public class Test: IPlugin
{
public void Innitialize(IPluginApp obj, int pluginHandle)
{
//gets the plugin obj dynamically to work with third party application.
//can be added events etc.
}
public shutdown()
{
//this is executed with plugin is terminated.
}
}

I have our application written in c# that should reference this plugin
assembly
and send some data to plugin from outside. But my problem is im unable to
send
data to plugin from outside that assembly. Plugin should accept the data and
do
further processing using IPluginApp object. IPluginApp object is null
outside that
Innitialize method. I am unable to create copy of that object using late
binding
concepts as that is an interface pointer. Can anyone suggest me some
techniques
to send data to plugin from outside.
Can't you add an IPluginApp variable to the class and assign that in
the constructor:

public class Test: IPlugin
{
private IPluginApp _pluginApp;

public void Innitialize(IPluginApp obj, int pluginHandle)
{
_pluginApp = obj;

//gets the plugin obj dynamically to work with third party
application.
//can be added events etc.
}

public shutdown()
{
//this is executed with plugin is terminated.
}
}

Oct 18 '06 #2

P: n/a
Thanx for your reply. Sorry im late in framing my question. I have done like
this..
public class Test: IPlugin
{
public static IPluginApp _pluginApp;

public void Innitialize(IPluginApp obj, int pluginHandle)
{
_pluginApp = obj;

//gets the plugin obj dynamically to work with third party
// application.
//can be added events etc.
}

public static bool CheckPluginIsNull()
{
if(Test._pluginApp == null) return true;
else return false;
}

}

from my executable application. I need to access that _pluginApp.

But if i do if(Test.CheckPluginIsNull) ..... Im geting null value...

Test class is in different assembly which I reference in to my executable
project.

I hope now you understood my problem. Is there any way to access that
_pluginApp referece from outside the Test class.


"Chris Dunaway" wrote:
>
Aravind wrote:
I have 3rd party dll plugin COM interface, when loaded executes the following
functions.

public class Test: IPlugin
{
public void Innitialize(IPluginApp obj, int pluginHandle)
{
//gets the plugin obj dynamically to work with third party application.
//can be added events etc.
}
public shutdown()
{
//this is executed with plugin is terminated.
}
}

I have our application written in c# that should reference this plugin
assembly
and send some data to plugin from outside. But my problem is im unable to
send
data to plugin from outside that assembly. Plugin should accept the data and
do
further processing using IPluginApp object. IPluginApp object is null
outside that
Innitialize method. I am unable to create copy of that object using late
binding
concepts as that is an interface pointer. Can anyone suggest me some
techniques
to send data to plugin from outside.

Can't you add an IPluginApp variable to the class and assign that in
the constructor:

public class Test: IPlugin
{
private IPluginApp _pluginApp;

public void Innitialize(IPluginApp obj, int pluginHandle)
{
_pluginApp = obj;

//gets the plugin obj dynamically to work with third party
application.
//can be added events etc.
}

public shutdown()
{
//this is executed with plugin is terminated.
}
}

Oct 19 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.