473,404 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Serviced Componentsand COM+

I have a piece of code that I want to use as a library / dll for other s/w
developments.

For example in VB6 land,
1) I create MyCalculator.DLL
2) In another project I make a reference to MyCalculator.DLL
3) I then do something like
Dim objMaths as MyCalculator.MathsFunctions
:
4) When I want to release the object I simply do
Set objMaths = Nothing

This code will work regardless of MyCalculator.DLL being hosted in Component
Services or not.

Now, using VB.Net I do
1) I create MyCalculator.DLL (with the class Inheriting ServicedComponent)
2) In another project I make a reference to MyCalculator.DLL
3) I then do something like
Dim objMaths as MyCalculator.MathsFunctions
:
But now, to release the component I understand I need to use 1 of 2 methods
depedning on how the DLL is hosted. ie

objMaths.Dispose (for a std DLL)
or ServicedComponent.DisposeObject (objMaths) if it is hosted in
Component Services
Is this correct, and if so, why should my "client" s/w need to be coded
specifically for how the DLL is deployed?


Nov 21 '05 #1
1 1222
On Mon, 25 Apr 2005 09:13:09 GMT, "JohnFol" <Ou************@WibbleObbble.Com> wrote:

¤ I have a piece of code that I want to use as a library / dll for other s/w
¤ developments.
¤
¤ For example in VB6 land,
¤ 1) I create MyCalculator.DLL
¤ 2) In another project I make a reference to MyCalculator.DLL
¤ 3) I then do something like
¤ Dim objMaths as MyCalculator.MathsFunctions
¤ :
¤ 4) When I want to release the object I simply do
¤ Set objMaths = Nothing
¤
¤ This code will work regardless of MyCalculator.DLL being hosted in Component
¤ Services or not.
¤
¤ Now, using VB.Net I do
¤ 1) I create MyCalculator.DLL (with the class Inheriting ServicedComponent)
¤ 2) In another project I make a reference to MyCalculator.DLL
¤ 3) I then do something like
¤ Dim objMaths as MyCalculator.MathsFunctions
¤ :
¤ But now, to release the component I understand I need to use 1 of 2 methods
¤ depedning on how the DLL is hosted. ie
¤
¤ objMaths.Dispose (for a std DLL)
¤ or ServicedComponent.DisposeObject (objMaths) if it is hosted in
¤ Component Services
¤
¤
¤ Is this correct, and if so, why should my "client" s/w need to be coded
¤ specifically for how the DLL is deployed?

Because when using COM+ there is an associated object that is created when hosting the managed code
DLL. If this object is not released it will continue to exist under COM+.

Not sure if there is a way to determine whether a .NET DLL is running under COM+ in order to
determine which Dispose method to use. GetObjectContext will do this when using the COM+ objects.
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Stan | last post by:
I wasn't sure what would be the best ng to post it. We have ASP.NET app that uses serviced component to perform all database writes and updates (there are separate components sitting on the web...
9
by: Stan | last post by:
Here is my scenario: Web server ------------ Framework 1.1 Application proxy for the serviced component Component server ------------------- Framework 1.0
2
by: Ansari | last post by:
hi all, I want to use serviced component in ASP.NET any walkthrough or link to a resource. I have tried a lot but serviced component could be initialized in ASP.NET page. However I can...
0
by: Mark Mims | last post by:
I am having a problem with a .NET serviced component running in MTS trying to call a web service on a remote machine on our internal network. The serviced component is using a domain account for...
4
by: Pete Wittig | last post by:
Hello, I am creating an app using Serviced Components and I am exposing them using the Enterprise Services SOAP service. Here is my problem: I have one COM+ application with several serviced...
4
by: Praveen Chandra | last post by:
Hi, I just wanted to put down the issue with more detailed information so that you can help us get to the right Microsoft resource for a solution! Here is the problem description... Our...
0
by: =?Utf-8?B?QkY=?= | last post by:
I am trying to work on Serviced Component in .NET 2.0 environment. I don't see much information about serviced component in .NET 2.0 environment. I worked on serviced component 2 years ago with...
2
by: =?Utf-8?B?QkY=?= | last post by:
I am currently working on moving our business objects into COM+ serviced components. But in the process, there are too many changes such ComVisible and serviced component does not support...
0
by: bharathreddy | last post by:
In .Net COM+ components are referred to as serviced components, Namespace: System.EnterpriseServices; Advantage of Serviced Components: object pooling, database connection pooling,
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.