¡@

Home 

c# Programming Glossary: wtsfreememory

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

ref Int32 pCount DllImport wtsapi32.dll static extern void WTSFreeMemory IntPtr pMemory DllImport Wtsapi32.dll static extern bool WTSQuerySessionInformation.. domainPtr Marshal.PtrToStringAnsi userPtr WTSFreeMemory userPtr WTSFreeMemory domainPtr WTSFreeMemory SessionInfoPtr.. Marshal.PtrToStringAnsi userPtr WTSFreeMemory userPtr WTSFreeMemory domainPtr WTSFreeMemory SessionInfoPtr finally CloseServer..

Start a windows service and launch cmd

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

DllImport wtsapi32.dll public static extern void WTSFreeMemory IntPtr memory DllImport kernel32.dll private static extern UInt32.. typeof WTS_SESSION_INFO current dataSize ret.Add si WTSFreeMemory ppSessionInfo catch Exception exception Debug.WriteLine exception.ToString..

Logoff interactive users in Windows from a service

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

ref Int32 pCount DllImport wtsapi32.dll static extern void WTSFreeMemory IntPtr pMemory Here is a sample implementation to lookup all.. ref Int32 pCount DllImport wtsapi32.dll static extern void WTSFreeMemory IntPtr pMemory internal static List int GetSessionIDs IntPtr.. current dataSize sessionIds.Add si.SessionID WTSFreeMemory buffer return sessionIds internal static bool LogOffUser string..