HighTechTalks DotNet Forums  

HOw to start and Stop Component Services Using Dotnet ???

Dotnet Framework (Component Services) microsoft.public.dotnet.framework.component_services


Discuss HOw to start and Stop Component Services Using Dotnet ??? in the Dotnet Framework (Component Services) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
SenthilVel
 
Posts: n/a

Default HOw to start and Stop Component Services Using Dotnet ??? - 01-30-2006 , 03:07 AM






Hi

Thanks a Lot !!!

i have one more requirement:

i need to select the listed COM+ Applications and be bale to start and
Stop...

for windows service i used to do like this:
ServiceController SC = new ServiceController();

SC.ServiceName = "MyService";

SC.start();

so in the same way what must be done here for COM+ ?

Thanks

Senthil

"Milosz Skalecki" <mily242 (AT) REMOVEITwp (DOT) pl> wrote


Quote:
Hi,

Add COM reference to C:\Windows\System32\comsvcs.dll
Then enumerate COM+ applications as following:
-- BEGIN CODE --

COMSVCSLib.MtsGrpClass group = new COMSVCSLib.MtsGrpClass();

for (int i = 0; i < group.Count; i++)
{
object item = null;
group.Item(i, out item);
COMSVCSLib.COMEvents events = (COMSVCSLib.COMEvents) item;

listBox1.Items.Add(events.GetProcessID().ToString( ) + ":" +
events.PackageGuid + ":" + events.PackageName);
Marshal.ReleaseComObject(item);
item = null;
Marshal.ReleaseComObject(events);
events = null;
}

Marshal.ReleaseComObject(group);
group = null;
-- END CODE --

hope this helps
--
Milosz Skalecki
MCP, MCAD


"SenthilVel" wrote:

Hi

I want to list the available "Component Services " (COM+) in a machine .

i am trying to get the list of Componenet services in a machine using
windows forms in dotnet , how can i retrive the list of componenet
services,

i know we can get the list of windows services, but i dont know how to
get
the list of Component services ?

can any one let me know how to do this ?

Thanks
Senthil







Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: HOw to start and Stop Component Services Using Dotnet ??? - 02-01-2006 , 07:08 AM






Hi

You can also access the COMAdminCatalog from C# (via COM Interop).
Check out the methods StartApplication and ShutdownApplication @ MSDN.

Greetings
Amanjit Gill


Reply With Quote
  #3  
Old   
SenthilVel
 
Posts: n/a

Default Re: HOw to start and Stop Component Services Using Dotnet ??? - 02-07-2006 , 03:06 AM



Any other methods for starting and stopping the COM+ applications ???

<amanjit.singh.gill (AT) googlemail (DOT) com> wrote

Quote:
Hi

You can also access the COMAdminCatalog from C# (via COM Interop).
Check out the methods StartApplication and ShutdownApplication @ MSDN.

Greetings
Amanjit Gill




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.