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?