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.DL L
2) In another project I make a reference to MyCalculator.DL L
3) I then do something like
Dim objMaths as MyCalculator.Ma thsFunctions
:
4) When I want to release the object I simply do
Set objMaths = Nothing
This code will work regardless of MyCalculator.DL L being hosted in Component
Services or not.
Now, using VB.Net I do
1) I create MyCalculator.DL L (with the class Inheriting ServicedCompone nt)
2) In another project I make a reference to MyCalculator.DL L
3) I then do something like
Dim objMaths as MyCalculator.Ma thsFunctions
:
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.Dispos e (for a std DLL)
or ServicedCompone nt.DisposeObjec t (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?
developments.
For example in VB6 land,
1) I create MyCalculator.DL L
2) In another project I make a reference to MyCalculator.DL L
3) I then do something like
Dim objMaths as MyCalculator.Ma thsFunctions
:
4) When I want to release the object I simply do
Set objMaths = Nothing
This code will work regardless of MyCalculator.DL L being hosted in Component
Services or not.
Now, using VB.Net I do
1) I create MyCalculator.DL L (with the class Inheriting ServicedCompone nt)
2) In another project I make a reference to MyCalculator.DL L
3) I then do something like
Dim objMaths as MyCalculator.Ma thsFunctions
:
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.Dispos e (for a std DLL)
or ServicedCompone nt.DisposeObjec t (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?
Comment