첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
본 블로그는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 블로그 콘텐츠 향상을 위해 쓰여집니다.

728x90
반응형
728x170
using System;
using System.Runtime.InteropServices;

#region WTS 세션 정보 질의하기 - WTSQuerySessionInformation(serverHandle, sessionID, infoClass, bufferHandle, byteCountReturned)

/// <summary>
/// WTS 세션 정보 질의하기
/// </summary>
/// <param name="serverHandle">서버 핸들</param>
/// <param name="sessionID">세션 ID</param>
/// <param name="infoClass">WTS 정보 클래스</param>
/// <param name="bufferHandle">버퍼 핸들</param>
/// <param name="byteCountReturned">반환 바이트 카운트</param>
/// <returns>처리 결과</returns>
[DllImport("wtsapi32", CharSet = CharSet.Auto, SetLastError = true)]
private static extern bool WTSQuerySessionInformation(IntPtr serverHandle, int sessionID, WTS_INFO_CLASS infoClass, out IntPtr bufferHandle, out int byteCountReturned);

#endregion

/// <summary>
/// WTS 정보 클래스
/// </summary>
public enum WTS_INFO_CLASS
{
    /// <summary>
    /// WTSInitialProgram
    /// </summary>
    WTSInitialProgram,

    /// <summary>
    /// WTSApplicationName
    /// </summary>
    WTSApplicationName,

    /// <summary>
    /// WTSWorkingDirectory
    /// </summary>
    WTSWorkingDirectory,

    /// <summary>
    /// WTSOEMID
    /// </summary>
    WTSOEMID,

    /// <summary>
    /// WTSSessionID
    /// </summary>
    WTSSessionID,

    /// <summary>
    /// WTSUserName
    /// </summary>
    WTSUserName,

    /// <summary>
    /// WTSWinStationName
    /// </summary>
    WTSWinStationName,

    /// <summary>
    /// WTSDomainName
    /// </summary>
    WTSDomainName,

    /// <summary>
    /// WTSConnectState
    /// </summary>
    WTSConnectState,

    /// <summary>
    /// WTSClientBuildNumber
    /// </summary>
    WTSClientBuildNumber,

    /// <summary>
    /// WTSClientName
    /// </summary>
    WTSClientName,

    /// <summary>
    /// WTSClientDirectory
    /// </summary>
    WTSClientDirectory,

    /// <summary>
    /// WTSClientProductID
    /// </summary>
    WTSClientProductID,

    /// <summary>
    /// WTSClientHardwareID
    /// </summary>
    WTSClientHardwareID,

    /// <summary>
    /// WTSClientAddress
    /// </summary>
    WTSClientAddress,

    /// <summary>
    /// WTSClientDisplay
    /// </summary>
    WTSClientDisplay,

    /// <summary>
    /// WTSClientProtocolType
    /// </summary>
    WTSClientProtocolType,

    /// <summary>
    /// WTSIdleTime
    /// </summary>
    WTSIdleTime,

    /// <summary>
    /// WTSLogonTime
    /// </summary>
    WTSLogonTime,

    /// <summary>
    /// WTSIncomingByteCount
    /// </summary>
    WTSIncomingByteCount,

    /// <summary>
    /// WTSOutgoingByteCount
    /// </summary>
    WTSOutgoingByteCount,

    /// <summary>
    /// WTSIncomingFrameCount
    /// </summary>
    WTSIncomingFrameCount,

    /// <summary>
    /// WTSOutgoingFrameCount
    /// </summary>
    WTSOutgoingFrameCount,

    /// <summary>
    /// WTSSessionInfo
    /// </summary>
    WTSSessionInfo = 24
}
728x90
반응형
그리드형
Posted by 사용자 icodebroker
TAG , ,

댓글을 달아 주세요