summaryrefslogtreecommitdiffstats
path: root/winsup/w32api/include/wtsapi32.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/w32api/include/wtsapi32.h')
-rw-r--r--winsup/w32api/include/wtsapi32.h65
1 files changed, 59 insertions, 6 deletions
diff --git a/winsup/w32api/include/wtsapi32.h b/winsup/w32api/include/wtsapi32.h
index 9b3dc4d9e..db2d24b38 100644
--- a/winsup/w32api/include/wtsapi32.h
+++ b/winsup/w32api/include/wtsapi32.h
@@ -7,12 +7,53 @@
#ifdef __cplusplus
extern "C" {
#endif
-
+
#if (_WIN32_WINNT >= 0x0501)
-// session notification message
+ // session notification message
#define WM_WTSSESSION_CHANGE 0x02B1
-// session notification message flags
+typedef enum _WTS_INFO_CLASS {
+ WTSInitialProgram = 0,
+ WTSApplicationName = 1,
+ WTSWorkingDirectory = 2,
+ WTSOEMId = 3,
+ WTSSessionId = 4,
+ WTSUserName = 5,
+ WTSWinStationName = 6,
+ WTSDomainName = 7,
+ WTSConnectState = 8,
+ WTSClientBuildNumber = 9,
+ WTSClientName = 10,
+ WTSClientDirectory = 11,
+ WTSClientProductId = 12,
+ WTSClientHardwareId = 13,
+ WTSClientAddress = 14,
+ WTSClientDisplay = 15,
+ WTSClientProtocolType = 16,
+ WTSIdleTime = 17,
+ WTSLogonTime = 18,
+ WTSIncomingBytes = 19,
+ WTSOutgoingBytes = 20,
+ WTSIncomingFrames = 21,
+ WTSOutgoingFrames = 22,
+ WTSClientInfo = 23,
+ WTSSessionInfo = 24
+} WTS_INFO_CLASS;
+
+typedef enum _WTS_CONNECTSTATE_CLASS {
+ WTSActive,
+ WTSConnected,
+ WTSConnectQuery,
+ WTSShadow,
+ WTSDisconnected,
+ WTSIdle,
+ WTSListen,
+ WTSReset,
+ WTSDown,
+ WTSInit
+} WTS_CONNECTSTATE_CLASS;
+
+ // session notification message flags
#define WTS_CONSOLE_CONNECT 0x1
#define WTS_CONSOLE_DISCONNECT 0x2
#define WTS_REMOTE_CONNECT 0x3
@@ -23,21 +64,33 @@ extern "C" {
#define WTS_SESSION_UNLOCK 0x8
#define WTS_SESSION_REMOTE_CONTROL 0x9
-// WTSRegisterSessionNotifiction flags
+ // WTSRegisterSessionNotifiction flags
#define NOTIFY_FOR_THIS_SESSION 0
#define NOTIFY_FOR_ALL_SESSIONS 1
BOOL WINAPI WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags);
BOOL WINAPI WTSUnRegisterSessionNotification(HWND hWnd);
+BOOL WINAPI WTSQuerySessionInformationA(HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass,
+ LPSTR *ppBuffer, DWORD *pBytesReturned);
+BOOL WINAPI WTSQuerySessionInformationW(HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass,
+ LPTSTR *ppBuffer, DWORD *pBytesReturned);
+void WINAPI WTSFreeMemory(PVOID pMemory);
+
+#ifdef UNICODE
+#define WTSQuerySessionInformation WTSQuerySessionInformationW
+#else
+#define WTSQuerySessionInformation WTSQuerySessionInformationA
+#endif
+
#endif /* _WIN32_WINNT >= 0x0501 */
#if (_WIN32_WINNT >= 0x0500)
-// WTSWaitSystemEvent local server handle
+ // WTSWaitSystemEvent local server handle
#define WTS_CURRENT_SERVER_HANDLE 0
#define WTS_CURRENT_SESSION 0
-// WTSWaitSystemEvent flags
+ // WTSWaitSystemEvent flags
#define WTS_EVENT_NONE 0x00000000
#define WTS_EVENT_CREATE 0x00000001
#define WTS_EVENT_DELETE 0x00000002