Abstractions.WindowsApi.pInvokes.ShutdownPending C# (CSharp) 메소드

ShutdownPending() 공개 정적인 메소드

public static ShutdownPending ( IntPtr handle, structenums &myServiceStatus, TimeSpan wait ) : bool
handle IntPtr
myServiceStatus structenums
wait TimeSpan
리턴 bool
        public static bool ShutdownPending(IntPtr handle, ref structenums.SERVICE_STATUS myServiceStatus, TimeSpan wait)
        {
            myServiceStatus.checkPoint++;
            myServiceStatus.currentState = (int)SafeNativeMethods.State.SERVICE_STOP_PENDING;
            myServiceStatus.waitHint = wait.Milliseconds;
            if (!SafeNativeMethods.SetServiceStatus(handle, ref myServiceStatus))
            {
                LibraryLogging.Error("SetServiceStatus error:{0}", LastError());
                return false;
            }

            return true;
        }