Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Service (Constants)
 
.
Summary
TODO - a short description of this collection of constants

C# Constants:

private const int STANDARD_RIGHTS_REQUIRED = 0xF0000;
//
// Start Type
//
const uint SERVICE_BOOT_START = 0x00000000;
const uint SERVICE_SYSTEM_START = 0x00000001;
const uint SERVICE_AUTO_START  = 0x00000002;
const uint SERVICE_DEMAND_START = 0x00000003;
const uint SERVICE_DISABLED = 0x00000004;

private const int SERVICE_AUTO_START = 0x2;
private const int SERVICE_DEMAND_START = 0x3;
private const int SERVICE_DISABLED = 0x4;
private const int SERVICE_ERROR_NORMAL = 0x1;
private const int SERVICE_WIN32_OWN_PROCESS = 0x10;
private const int SERVICE_QUERY_CONFIG = 0x1;
private const int SERVICE_CHANGE_CONFIG = 0x2;
private const int SERVICE_QUERY_STATUS = 0x4;
private const int SERVICE_ENUMERATE_DEPENDENTS = 0x8;
private const int SERVICE_START = 0x10;
private const int SERVICE_STOP = 0x20;
private const int SERVICE_PAUSE_CONTINUE = 0x40;
private const int SERVICE_INTERROGATE = 0x80;
private const int SERVICE_USER_DEFINED_CONTROL = 0x100;
private const int SERVICE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED |
    SERVICE_QUERY_CONFIG |
    SERVICE_CHANGE_CONFIG |
    SERVICE_QUERY_STATUS |
    SERVICE_ENUMERATE_DEPENDENTS |
    SERVICE_START |
    SERVICE_STOP |
    SERVICE_PAUSE_CONTINUE |
    SERVICE_INTERROGATE |
    SERVICE_USER_DEFINED_CONTROL;
//
// ControlService constant definitions
//
const uint SERVICE_CONTROL_STOP = 0x00000001;
const uint SERVICE_CONTROL_PAUSE  = 0x00000002;
const uint SERVICE_CONTROL_CONTINUE = 0x00000003;
const uint SERVICE_CONTROL_INTERROGATE = 0x00000004;
const uint SERVICE_CONTROL_SHUTDOWN = 0x00000005;
const uint SERVICE_CONTROL_DEVICEEVENT = 0x0000000B;
const uint SERVICE_CONTROL_HARDWAREPROFILECHANGE = 0x0000000C;
const uint SERVICE_CONTROL_POWEREVENT = 0x0000000D;
const uint SERVICE_CONTROL_SESSIONCHANGE = 0x0000000E;

//
// Error control type
//
const uint SERVICE_ERROR_IGNORE = 0x00000000;
const uint SERVICE_ERROR_NORMAL = 0x00000001;
const uint SERVICE_ERROR_SEVERE = 0x00000002;
const uint SERVICE_ERROR_CRITICAL = 0x00000003;

//
// Misc
//  
const uint SERVICE_NO_CHANGE = 0xffffffff;

VB Constants:

Const STANDARD_RIGHTS_REQUIRED As Int32 = &HF0000

Const SERVICE_AUTO_START As Int32 = &H2
Const SERVICE_DEMAND_START As Int32 = &H3
Const SERVICE_DISABLED As Int32 = &H4

Const SERVICE_ERROR_NORMAL As Int32 = &H1

Const SERVICE_WIN32_OWN_PROCESS As Int32 = &H10

Const SERVICE_QUERY_CONFIG As Int32 = &H1
Const SERVICE_CHANGE_CONFIG As Int32 = &H2
Const SERVICE_QUERY_STATUS As Int32 = &H4
Const SERVICE_ENUMERATE_DEPENDENTS As Int32 = &H8
Const SERVICE_START As Int32 = &H10
Const SERVICE_STOP As Int32 = &H20
Const SERVICE_PAUSE_CONTINUE As Int32 = &H40
Const SERVICE_INTERROGATE As Int32 = &H80
Const SERVICE_USER_DEFINED_CONTROL As Int32 = &H100

Const SERVICE_ALL_ACCESS As Integer = STANDARD_RIGHTS_REQUIRED Or _
                    SERVICE_QUERY_CONFIG Or _
                    SERVICE_CHANGE_CONFIG Or _
                    SERVICE_QUERY_STATUS Or _
                    SERVICE_ENUMERATE_DEPENDENTS Or _
                    SERVICE_START Or _
                    SERVICE_STOP Or _
                    SERVICE_PAUSE_CONTINUE Or _
                    SERVICE_INTERROGATE Or _
                    SERVICE_USER_DEFINED_CONTROL

Notes:

For use with the CreateService API call in ADVAPI32.DLL

 

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it!

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions