all groups > dotnet distributed apps > december 2005 >
You're in the

dotnet distributed apps

group:

COM+ and IProcessInitializer


COM+ and IProcessInitializer Morten Overgaard
12/13/2005 10:10:20 PM
dotnet distributed apps:
Hi Sirs

I have a COM+ Server application where one of the components implements the
IProcessInitializer interface because we need some initialization upon
startup. According to MS the StartUp and Shutdown
methods gets called upon startup and shutdown of the server application.
However they are not called in my Server app. Whats funny is that
IProcessInitializer does even not show up in the implemented interfaces
section for the component.

And I have done the things according to
http://support.microsoft.com/default.aspx?scid=kb;en-us;303890


What do I do- I really need these methods to get called???

I have spent days now trying to get it to work without luck.Please help..

Environment:
VS 2005
Win XP SP2

Regards morten


Re: COM+ and IProcessInitializer Radek Kozma
1/3/2006 1:42:17 PM
Hi,

maybe this helps :

[

Guid("1113f52d-dc7f-4943-aed6-88d04027e32a"),

InterfaceType(ComInterfaceType.InterfaceIsIUnknown)

]

public interface IProcessInitializer

{

void Startup([In,MarshalAs(UnmanagedType.IUnknown)] System.Object
punkProcessControl);

void Shutdown();

}


public class
Starter:System.EnterpriseServices.ServicedComponent,IProcessInitializer

{

public void Shutdown()

{

}

public void Startup(object punkProcessControl)

{

}

}

currently it is working fine in our applications,



Radek



"Morten Overgaard" <overgaardmorten*NOSPAM*@gmail.com> pí¹e v diskusním
pøíspìvku news:%23em1imCAGHA.3804@TK2MSFTNGP14.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button