IIRC IObjectConstruct (the COM+ construction interface) has the signature
IObjectConstruct
{
HRESULT Construct(IDispatch* pCtorObj);
}
This is obviously not the same signature as the overridable Construct method from ServiceComponent. So ServicedComponent implements the interface and then it's implementation of IObjectConstruct::Construct calls a protected virtual Construct method which you can override. Thats why the Construct method you override is protected rather than public
Regards]
Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog http://www.dotnetconsult.co.uk
The 'Construct' method is defined as 'protected' in the ServicedComponent
class you can't change the access modifier in your derived class - this is
what the compiler error says...
You can't call this method externally from the class....
HTH
Ollie Riches
"msuk" <ms**@discussions.microsoft.com> wrote in message
news:3E**********************************@microsof t.com...
All,
I am trying to use the COM+ constructor string as follows:
[ConstructionEnabled (true)]
public sealed class xxxx: ServicedComponent
{
public override void Construct(string constructString)
{
}
{
But when I build the project I get the following error:
C:\xxx.cs(33): xxxxxx.Construct(string)': cannot change access modifiers
when overriding 'protected' inherited member
'System.EnterpriseServices.ServicedComponent.Const ruct(string)'
What am I doing wrong?
Thanks
Msuk