+\r
+ [DllImport("user32.dll")]\r
+ public static extern void LockWorkStation();\r
+\r
+ [DllImport("user32.dll")]\r
+ public static extern int ExitWindowsEx(int uFlags, int dwReason);\r
+\r
+ public struct MEMORYSTATUS // Unused var's are requred here.\r
+ {\r
+ public UInt32 dwLength;\r
+ public UInt32 dwMemoryLoad;\r
+ public UInt32 dwTotalPhys; // Used\r
+ public UInt32 dwAvailPhys;\r
+ public UInt32 dwTotalPageFile;\r
+ public UInt32 dwAvailPageFile;\r
+ public UInt32 dwTotalVirtual;\r
+ public UInt32 dwAvailVirtual;\r
+ }\r
+\r
+ [DllImport("kernel32.dll")]\r
+ public static extern void GlobalMemoryStatus\r
+ (\r
+ ref MEMORYSTATUS lpBuffer\r
+ );\r