mfc >> R: Services

by Gaetano Sferra » Wed, 26 Nov 2003 18:58:36 GMT

No, I think not!
The application is compiled to work at "Ring 3" otherwise the services are
compiled to work at "Ring 0"...
You need the DDK to develop a service (that may eventually have a UI).

Philipp Huber < XXXX@XXXXX.COM > wrote in message
bq1oiv$n44$00$ XXXX@XXXXX.COM ...
> hi!
>
> is it possible to make a dialog based app a service?
>
> thanks, philipp
>
>




mfc >> R: Services

by Gaetano Sferra » Wed, 26 Nov 2003 19:50:00 GMT


> please could you explain what "ring 3" and "ring 0" means?
When the OS boot there are some "phases" that it perform before show you the
desktop.
These "phases" are called "Rings" so, in "Ring 0" the OS load all services
(and service drivers)
then enter in protect mode and load others stuffs.
The UI (desktop) and all application in it are loaded in "Ring 3" and cannot
become services
(or perform all action that a service can do)...








Similar Threads

1. Window Services - Difference between Network Service, Local Service ANd Local System Account

Hi All,

Can any one tell me that what is the difference between Network
Service, Local Service and Local System ACcount  for window services

ABCL

2. Windows Service Installer (service not showing up when installed) - CSharp / C#

3. .NET C# service error 1053, service could not start in timely fash

I am developing a service which I install and run on a number of servers. It 
works on most machines I have installed it on, but I always get a 1053, 
service will not start in a timely fashion message on one server.

I have reduced the code to almost nothing so as to remove almost all the 
proper code.

My main function looks like this

static void Main()
{
System.ServiceProcess.ServiceBase[] ServicesToRun;
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new 
TigerPrintService() };
System.ServiceProcess.ServiceBase.Run(ServicesToRun);	
}

My OnStart() is blank at the moment.

My TigerPrintService() constructor is currently empty also.

I can install the service but when I go to the service manager to start it I 
get the 1053 error.

And since my OnStart() method is now empty I am at a loss as to what might 
be causing this problem. As it seems to me it cannot be to do with 
permisions. 

By the way when I install the service I am currently doing so using the 
local system login.

Many thanks for any thoughts or suggestions as to what might be causing this 
problem.

-- 
Many thanks 
Derek

 XXXX@XXXXX.COM 

4. Windows Service asking for Service Login - CSharp/C#

5. Why wont my Service stop..Failed to stop service.Appreciate advices

Failed to stop service.
System.ServiceModel.CommunicationObjectFaultedException: The
communication object, System.ServiceModel.ServiceHost, cannot be used
for communication because it is in the Faulted state.
   at HRBFA.Agent.WindowsService.AgentWindowsService.OnStop() in C:\tfs
\FA Nexus\Dev\Framework\HRBFA.Agent\HRBFA.Agent.WindowsService
\AgentWindowsService.cs:line 51
   at System.ServiceProcess.ServiceBase.DeferredStop()

The OnStop() which i hav is
  protected override void OnStop()
        {
            // TODO: Add code here to perform any tear-down necessary
to stop your service.
            try
            {
                if (serviceHost != null)
                {
                    serviceHost.Close();
                    serviceHost = null;
                }
            }
            catch (Exception e)
            {
                throw e;
            }
        }

6. C# Service vs C++ Service - CSharp/C#

7. C# Windows Service - allow multiple defined services?

We have a service written in C#.  The generated code "hardcodes" the service 
name into the exe.

We have a situation where we would like to allow multiple Windows Services 
to be defined.  These would differ by the command-line parameters passed to 
the .exe to give it a different configuration.

Is there a way to do this?

-- 
Adam Clauss
 


8. Windows Service as Web Service host without WCF? - CSharp/C#