using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Interop.Lmx; [ComImport] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [Guid("4F8CED36-2A43-11D3-87E0-00A0C982C01C")] public interface IWatchdog { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void RequestWatchdogMonitor([In] int lmsStartupTimeout = 30000, [In] int lmsShutdownTimeout = 30000, [In] int lmsWatchdogTime = 60000, [In] int lWatchdogFault = 3, [In] tagWatchdogTimeoutAction lWatchdogAction = tagWatchdogTimeoutAction.TIMEOUT_NO_ACTION); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void StartupCompleted(); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetStartupTimeout([In] int lmsPeriod); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetShutdownTimeout([In] int lmsPeriod); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void GetShutdownEvent([In] int lmsShutdownTimeout, [MarshalAs(UnmanagedType.BStr)] out string pbstrEventName); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetWatchdogTime([In] int lmsWaitTime); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetWatchdogFaults([In] uint dwFaults); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetWatchdogAction([In] tagWatchdogTimeoutAction action); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void ResetWatchdog(); }