Ignore mingw-get's downloaded files
[msysgit.git] / mingw / include / wtsapi32.h
blobdb2d24b38e01516a4b003eec5052a94407e34177
1 #ifndef _WTSAPI32_H
2 #define _WTSAPI32_H
3 #if __GNUC__ >= 3
4 #pragma GCC system_header
5 #endif
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
11 #if (_WIN32_WINNT >= 0x0501)
12 // session notification message
13 #define WM_WTSSESSION_CHANGE 0x02B1
15 typedef enum _WTS_INFO_CLASS {
16 WTSInitialProgram = 0,
17 WTSApplicationName = 1,
18 WTSWorkingDirectory = 2,
19 WTSOEMId = 3,
20 WTSSessionId = 4,
21 WTSUserName = 5,
22 WTSWinStationName = 6,
23 WTSDomainName = 7,
24 WTSConnectState = 8,
25 WTSClientBuildNumber = 9,
26 WTSClientName = 10,
27 WTSClientDirectory = 11,
28 WTSClientProductId = 12,
29 WTSClientHardwareId = 13,
30 WTSClientAddress = 14,
31 WTSClientDisplay = 15,
32 WTSClientProtocolType = 16,
33 WTSIdleTime = 17,
34 WTSLogonTime = 18,
35 WTSIncomingBytes = 19,
36 WTSOutgoingBytes = 20,
37 WTSIncomingFrames = 21,
38 WTSOutgoingFrames = 22,
39 WTSClientInfo = 23,
40 WTSSessionInfo = 24
41 } WTS_INFO_CLASS;
43 typedef enum _WTS_CONNECTSTATE_CLASS {
44 WTSActive,
45 WTSConnected,
46 WTSConnectQuery,
47 WTSShadow,
48 WTSDisconnected,
49 WTSIdle,
50 WTSListen,
51 WTSReset,
52 WTSDown,
53 WTSInit
54 } WTS_CONNECTSTATE_CLASS;
56 // session notification message flags
57 #define WTS_CONSOLE_CONNECT 0x1
58 #define WTS_CONSOLE_DISCONNECT 0x2
59 #define WTS_REMOTE_CONNECT 0x3
60 #define WTS_REMOTE_DISCONNECT 0x4
61 #define WTS_SESSION_LOGON 0x5
62 #define WTS_SESSION_LOGOFF 0x6
63 #define WTS_SESSION_LOCK 0x7
64 #define WTS_SESSION_UNLOCK 0x8
65 #define WTS_SESSION_REMOTE_CONTROL 0x9
67 // WTSRegisterSessionNotifiction flags
68 #define NOTIFY_FOR_THIS_SESSION 0
69 #define NOTIFY_FOR_ALL_SESSIONS 1
71 BOOL WINAPI WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags);
72 BOOL WINAPI WTSUnRegisterSessionNotification(HWND hWnd);
73 BOOL WINAPI WTSQuerySessionInformationA(HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass,
74 LPSTR *ppBuffer, DWORD *pBytesReturned);
75 BOOL WINAPI WTSQuerySessionInformationW(HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass,
76 LPTSTR *ppBuffer, DWORD *pBytesReturned);
77 void WINAPI WTSFreeMemory(PVOID pMemory);
79 #ifdef UNICODE
80 #define WTSQuerySessionInformation WTSQuerySessionInformationW
81 #else
82 #define WTSQuerySessionInformation WTSQuerySessionInformationA
83 #endif
85 #endif /* _WIN32_WINNT >= 0x0501 */
87 #if (_WIN32_WINNT >= 0x0500)
89 // WTSWaitSystemEvent local server handle
90 #define WTS_CURRENT_SERVER_HANDLE 0
91 #define WTS_CURRENT_SESSION 0
93 // WTSWaitSystemEvent flags
94 #define WTS_EVENT_NONE 0x00000000
95 #define WTS_EVENT_CREATE 0x00000001
96 #define WTS_EVENT_DELETE 0x00000002
97 #define WTS_EVENT_RENAME 0x00000004
98 #define WTS_EVENT_CONNECT 0x00000008
99 #define WTS_EVENT_DISCONNECT 0x00000010
100 #define WTS_EVENT_LOGON 0x00000020
101 #define WTS_EVENT_LOGOFF 0x00000040
102 #define WTS_EVENT_STATECHANGE 0x00000080
103 #define WTS_EVENT_LICENSE 0x00000100
104 #define WTS_EVENT_ALL 0x7FFFFFFF
105 #define WTS_EVENT_FLUSH 0x80000000
107 BOOL WINAPI WTSWaitSystemEvent(HANDLE hServer, DWORD EventMask, DWORD* pEventFlags);
108 BOOL WINAPI WTSDisconnectSession(HANDLE hServer, DWORD SessionId, BOOL bWait);
109 #endif /* _WIN32_WINNT >= 0x0500 */
111 #ifdef __cplusplus
113 #endif
115 #endif /* _WTSAPI32_H */