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

SetServiceStopped() 공개 정적인 메소드

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

            return true;
        }