Search:
Namespaces
Discussions
.NET v1.1
Feedback
Can I return an Interface.?
Messages
Related Types
This message was discovered on
microsoft.public.dotnet.framework.remoting
.
Post a new message to this list...
Lord2702
Wed. Sep. 01, 2004 10:10 PM PT
I have a remoting server, on which I host a Business Object Component, I
want to return an Interface
IDbConnection
as follows...
IDbConnection
*GetConnection() {
// code
return dbConnection; //as an interface
}
Thanks.
Reply to this message...
Henrik de Jong
It is in fact a common way to talk to remote objects by interfaces. You
can also return interfaces wich are remote-objects. By example, if you
've got the Advanced .Net Remoting from Ingo Rammer, you can read a nice
example about an IRemoteFactory wich returns a IRemoteObject based on
some parameters.
kind regards,
Henrik
Lord2702 schreef:
[Original message clipped]
Reply to this message...
Lord2702
Thu. Sep. 02, 2004 11:35 AM PT
It seems you didn't get my query, I already host a COM+ object and returning
its interface, now, let say in this COM object I have two methods,
DataSet
*GetDataSet();
IDbConnection
*GetConnection();
In first I return
DataSet
object, but have a problem while returning the
second one, the interface connection. It says, something like the object
cannot be marshalled, may be, the Interfaces are not by MBRO, and also not
marked by
ISerializable
. Hence, my question is How do I return an Interface
? Although, I will not JUST return the interface, within GetConnection I
will assign the interface variable with full object.
Thanks for your reply.
"Henrik de Jong" <
Click here to reveal e-mail address
> wrote in message
news:
Click here to reveal e-mail address
...
[Original message clipped]
Reply to this message...
System.Data.DataSet
System.Data.IDbConnection
System.Runtime.Serialization.ISerializable
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com