¡@

Home 

c# Programming Glossary: wts_session_info

How do you retrieve a list of logged-in/connected users in .NET?

http://stackoverflow.com/questions/132620/how-do-you-retrieve-a-list-of-logged-in-connected-users-in-net

StructLayout LayoutKind.Sequential private struct WTS_SESSION_INFO public Int32 SessionID MarshalAs UnmanagedType.LPStr public.. ref sessionCount Int32 dataSize Marshal.SizeOf typeof WTS_SESSION_INFO Int32 currentSession int SessionInfoPtr uint bytes 0 if retVal.. uint bytes 0 if retVal 0 for int i 0 i sessionCount i WTS_SESSION_INFO si WTS_SESSION_INFO Marshal.PtrToStructure System.IntPtr currentSession..

Start a windows service and launch cmd

http://stackoverflow.com/questions/4147821/start-a-windows-service-and-launch-cmd

StructLayout LayoutKind.Sequential public struct WTS_SESSION_INFO public int SessionID MarshalAs UnmanagedType.LPTStr public.. int sessionId public static bool IsUserLoggedOn List WTS_SESSION_INFO wtsSessionInfos ListSessions Debug.WriteLine string.Format Number.. .Count 0 private static IntPtr GetCurrentUserToken List WTS_SESSION_INFO wtsSessionInfos ListSessions int sessionId wtsSessionInfos.Where..

Logoff interactive users in Windows from a service

http://stackoverflow.com/questions/5207506/logoff-interactive-users-in-windows-from-a-service

StructLayout LayoutKind.Sequential internal struct WTS_SESSION_INFO public Int32 SessionID MarshalAs UnmanagedType.LPStr public.. 1 ref buffer ref count int dataSize Marshal.SizeOf typeof WTS_SESSION_INFO Int64 current int buffer if retval 0 for int i 0 i count i.. current int buffer if retval 0 for int i 0 i count i WTS_SESSION_INFO si WTS_SESSION_INFO Marshal.PtrToStructure IntPtr current typeof..