COM+ constructor question

  • Thread starter Thread starter JollyK
  • Start date Start date
J

JollyK

Hello guys,
I am very new to COM+ and I am struggling with something that I think is not
possible. What I want to do is have a COM+ component that will have a
constructor that will take in TWO parameters. I know it is possible for a
COM+ component to have constructor that will accept ONE parameter (by using
the Create method) , but I really need a constructor that will accept TWO
parameters. Is there any way out ?? Please show me a sample code if
possible.

Thanks alot

Jollyk
 
Jollyk,

You can't do this. COM objects require a constructor with zero
parameters. It is possible to have parameters passed to the object though.
You can override the Construct method, which takes a string. You would have
to pack this string with the values your object would need, and then have
your object unpack the values when it the Construct method is called.

Hope this helps.
 
Back
Top