using System.Runtime.InteropServices;

namespace ZionVault.Service
{
    public enum ServiceState
    {
        SERVICE_STOPPED = 0x00000001,
        SERVICE_START_PENDING = 0x00000002,
        SERVICE_STOPT_PENDING = 0x00000003,
        SERVICE_RUNNING = 0x00000004
    }
    [ StructLayout(LayoutKind.Sequential) ]
    public struct ServiceStatus{
        public int dwServiceType;
        public ServiceState dwCurrentState;
        public int dwControlsAccepted;
        public int dwWin32ExitCode;
        public int dwServiceSpecificExitCode;
        public int dwCheckPoint;
        public int dwWaitHint;
    }

    public class ZionServiceStatus
    {
        [DllImport("advapi32.dll", SetLastError = true)]
        public static extern bool SetServiceStatus(System.IntPtr handle, ref ServiceStatus serviceStatus);
    }
}

