summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Sutcliffe <ir0nh34d@users.sourceforge.net>2008-08-20 02:30:05 +0000
committerChris Sutcliffe <ir0nh34d@users.sourceforge.net>2008-08-20 02:30:05 +0000
commit236c21ee9e040bbdef9243bb6ac72f91a2e09c55 (patch)
tree7f4c90117f9ef1bac1c1c3d1ea3f8eff815581f7
parentfbf39a58cbbd92f3f185bad685c67099cc1ec805 (diff)
downloadcygnal-236c21ee9e040bbdef9243bb6ac72f91a2e09c55.tar.gz
cygnal-236c21ee9e040bbdef9243bb6ac72f91a2e09c55.tar.bz2
cygnal-236c21ee9e040bbdef9243bb6ac72f91a2e09c55.zip
2008-08-19 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/wtsapi32.h (_WTS_INFO_CLASS, _WTS_CONNECTSTATE_CLASS, WTSQuerySessionInformation, WTSFreeMemory): Define.
-rw-r--r--winsup/w32api/ChangeLog5
-rw-r--r--winsup/w32api/include/wtsapi32.h65
2 files changed, 64 insertions, 6 deletions
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog
index 78de8846a..7c461ab0f 100644
--- a/winsup/w32api/ChangeLog
+++ b/winsup/w32api/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-19 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
+
+ * include/wtsapi32.h (_WTS_INFO_CLASS, _WTS_CONNECTSTATE_CLASS,
+ WTSQuerySessionInformation, WTSFreeMemory): Define.
+
2008-07-25 Bo Yang <techrazy@users.sourceforge.net>
* lib/gdi32.def (SetLayout): Export.
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