Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / April 2004

Tip: Looking for answers? Try searching our database.

Marshalling Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill - 21 Apr 2004 03:53 GMT
I have a question about how classes and structs are marshalled thru COM+
to an appliction.

I have two DLL's. One is a COM+ dll, the other isn't.

Let's assume that I have a class that is COM+ class called TestFactory
that inherits from ServicedComponent and is contained in a dll that has
been registered in COM+. The TestFactory has a method called
LoadEmployee() that creates and returns an Employee object (described
next).

Assume that I have another class called Employee in a different DLL that
is NOT registered in COM+ (the class just inherits from Object).

If a Windows Forms app (or web app for that matter) that calls the
TestFactory.LoadEmployee() method, where is the Employee object that is
returned located? Is it still in the COM+ side of the system or does it
get completely marshalled back to the application?

Also, if the class is still in COM+; would a structure work any
differently?

Thanks for any help,
Bill Davis.
Bill W. Davis - 29 Apr 2004 21:04 GMT
To answer my own question... (as far as I have figured it anyway)

If I'm using a DLL that has COM+ (Enterprise Services) objects in it,
then there isn't any boundary that is crossed. In process calls
(library/dll) don't ever cross a boundary. There is some C++ code that
magically takes care of the COM+ stuff for you.

It's only when you are dealing w/ server applications where this comes
into play. And I believe at that point Enterprise Services relies on
.net remoting. So to get an object that actually "crosses" the
boundary between a server and application (or dll), the object would
need to derive from MarshalByVal.

> I have a question about how classes and structs are marshalled thru COM+
> to an appliction.
[quoted text clipped - 20 lines]
> Thanks for any help,
> Bill Davis.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.