[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Expose TypedDataSet via ComInterop

RedDevil

9/7/2007 1:20:00 AM

Hi,

I have generated TypedDataSet (TDS) from a xml schema and need it to be used
by a legacy application. I would like to know if TDS can be interoped with
using interface?

Your reply is much appreciated



4 Answers

Patrick Steele

9/7/2007 2:18:00 AM

0

In article <B4EBCED1-F1AD-4BAE-A058-277F182BDB53@microsoft.com>,
RedDevil@discussions.microsoft.com says...
> Hi,
>
> I have generated TypedDataSet (TDS) from a xml schema and need it to be used
> by a legacy application. I would like to know if TDS can be interoped with
> using interface?

It can if you want to write the interface to expose everything. COM is
all about interfaces so with the proper application of interfaces and
attributes, you can make just about any .NET object look like a regular
COM object to COM.

See:

http://www.15seconds.com/issue/...

--
Patrick Steele (patrick@mvps.org)
http://weblogs.asp.n...

RedDevil

9/7/2007 2:28:00 AM

0

Hi Patrick,

Thanks for the info.

Am I right to say without interface, it can't be interoped?

"Patrick Steele" wrote:

> In article <B4EBCED1-F1AD-4BAE-A058-277F182BDB53@microsoft.com>,
> RedDevil@discussions.microsoft.com says...
> > Hi,
> >
> > I have generated TypedDataSet (TDS) from a xml schema and need it to be used
> > by a legacy application. I would like to know if TDS can be interoped with
> > using interface?
>
> It can if you want to write the interface to expose everything. COM is
> all about interfaces so with the proper application of interfaces and
> attributes, you can make just about any .NET object look like a regular
> COM object to COM.
>
> See:
>
> http://www.15seconds.com/issue/...
>
> --
> Patrick Steele (patrick@mvps.org)
> http://weblogs.asp.n...
>

Patrick Steele

9/9/2007 2:48:00 PM

0

In article <F2BE7386-DA91-4785-912A-0C0BFA402A9F@microsoft.com>,
RedDevil@discussions.microsoft.com says...
> Hi Patrick,
>
> Thanks for the info.
>
> Am I right to say without interface, it can't be interoped?

No, because the interop wrapper will create a default interface for you,
but it could cause the interop library to be quite large as it has to
recursively build interfaces for all of the .NET types it finds in the
signatures. And if it runs into a type that it can't natively expose to
COM, it'll generate a paramter/type as simply "Object" and you'll loose
type information.

By creating your own interface, you'll have more control over the types
exposed to COM.

--
Patrick Steele (patrick@mvps.org)
http://weblogs.asp.n...

dcvdffzccr

11/23/2007 12:01:00 AM

0

Hello! Good Site! Thanks you! uqgibnctsfwls