Link to home
Start Free TrialLog in
Avatar of kvnsdr
kvnsdr

asked on

ServiceController Modifiers?

I recently discoved that using the code below in a win app is useless (always returns 'Stopped') if the serviceController modifiers are set to private, da......

         MessageBox.Show(serviceController1.Status.ToString());

I'm currently using 'Protected'.....................


Q. What is the correct modifer to use for maximum protection yet allow correct return status?


Avatar of Bob Learned
Bob Learned
Flag of United States of America image

If you are calling outside of the service, you need public scope.  What kind of protection are you looking for?

Bob
Avatar of kvnsdr
kvnsdr

ASKER

The most without cutting off my nose.

I'm currently using 'Protected' and all works.

ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kvnsdr

ASKER

Thank you