//part of the idle stuff [StructLayout(LayoutKind.Sequential)] struct LASTINPUTINFO { public static readonly int SizeOf = Marshal.SizeOf(typeof(LASTINPUTINFO)); [MarshalAs(UnmanagedType.U4)] public UInt32 cbSize; [MarshalAs(UnmanagedType.U4)] public UInt32 dwTime; } uint idleTime = 0; LASTINPUTINFO lastInputInfo = new LASTINPUTINFO(); //int y = Convert.ToInt32(lastInputInfo); uint y = Convert.ToUInt32(lastInputInfo); lastInputInfo.cbSize = Marshal.SizeOf(y); lastInputInfo.dwTime = 0;</pre>
lastInputInfo.cbSize = (UInt32) Marshal.SizeOf(y);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)