b9dbb181540a80004048d6eedd14eab1b5c682fb
[reactos.git] / sdk / include / psdk / wtsapi32.h
1 /*
2 * Copyright 2005 Ulrich Czekalla (For CodeWeavers)
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19 #ifndef __WINE_WTSAPI32_H
20 #define __WINE_WTSAPI32_H
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /*
27 * pResponse values from WTSSendMessage(), in addition
28 * to those from the standard MessageBox() API.
29 */
30 #ifndef IDTIMEOUT
31 #define IDTIMEOUT 32000
32 #endif
33 #ifndef IDASYNC
34 #define IDASYNC 32001
35 #endif
36
37 typedef enum _WTS_VIRTUAL_CLASS
38 {
39 WTSVirtualClientData,
40 WTSVirtualFileHandle
41 } WTS_VIRTUAL_CLASS;
42
43 typedef enum tagWTS_INFO_CLASS
44 {
45 WTSInitialProgram,
46 WTSApplicationName,
47 WTSWorkingDirectory,
48 WTSOEMId,
49 WTSSessionId,
50 WTSUserName,
51 WTSWinStationName,
52 WTSDomainName,
53 WTSConnectState,
54 WTSClientBuildNumber,
55 WTSClientName,
56 WTSClientDirectory,
57 WTSClientProductId,
58 WTSClientHardwareId,
59 WTSClientAddress,
60 WTSClientDisplay,
61 WTSClientProtocolType,
62 WTSIdleTime,
63 WTSLogonTime,
64 WTSIncomingBytes,
65 WTSOutgoingBytes,
66 WTSIncomingFrames,
67 WTSOutgoingFrames,
68 WTSClientInfo,
69 WTSSessionInfo,
70 WTSSessionInfoEx,
71 WTSConfigInfo,
72 WTSValidationInfo,
73 WTSSessionAddressV4,
74 WTSIsRemoteSession
75 } WTS_INFO_CLASS;
76
77 typedef enum _WTS_CONNECTSTATE_CLASS
78 {
79 WTSActive,
80 WTSConnected,
81 WTSConnectQuery,
82 WTSShadow,
83 WTSDisconnected,
84 WTSIdle,
85 WTSListen,
86 WTSReset,
87 WTSDown,
88 WTSInit
89 } WTS_CONNECTSTATE_CLASS;
90
91 typedef enum _WTS_CONFIG_CLASS
92 {
93 WTSUserConfigInitialProgram,
94 WTSUserConfigWorkingDirectory,
95 WTSUserConfigInheritInitialProgram,
96 WTSUserConfigAllowLogonTerminalServer,
97 WTSUserConfigTimeoutSettingsConnections,
98 WTSUserConfigTimeoutSettingsDisconnections,
99 WTSUserConfigTimeoutSettingsIdle,
100 WTSUserConfigDeviceClientDrives,
101 WTSUserConfigDeviceClientPrinters,
102 WTSUserConfigDeviceClientDefaultPrinter,
103 WTSUserConfigBrokenTimeoutSettings,
104 WTSUserConfigModemCallbackSettings,
105 WTSUserConfigModemCallbackPhoneNumber,
106 WTSUserConfigShadowSettings,
107 WTSUserConfigTerminalServerProfilePath,
108 WTSUserConfigTerminalServerHomeDirectory,
109 WTSUserConfigfTerminalServerRemoteHomeDir
110 } WTS_CONFIG_CLASS;
111
112 typedef struct _WTS_PROCESS_INFOA
113 {
114 DWORD SessionId;
115 DWORD ProcessId;
116 LPSTR pProcessName;
117 PSID pUserSid;
118 } WTS_PROCESS_INFOA, *PWTS_PROCESS_INFOA;
119
120 typedef struct _WTS_PROCESS_INFOW
121 {
122 DWORD SessionId;
123 DWORD ProcessId;
124 LPWSTR pProcessName;
125 PSID pUserSid;
126 } WTS_PROCESS_INFOW, *PWTS_PROCESS_INFOW;
127
128 DECL_WINELIB_TYPE_AW(WTS_PROCESS_INFO)
129 DECL_WINELIB_TYPE_AW(PWTS_PROCESS_INFO)
130
131 typedef struct _WTS_SESSION_INFOA
132 {
133 DWORD SessionId;
134 LPSTR pWinStationName;
135 WTS_CONNECTSTATE_CLASS State;
136 } WTS_SESSION_INFOA, *PWTS_SESSION_INFOA;
137
138 typedef struct _WTS_SESSION_INFOW
139 {
140 DWORD SessionId;
141 LPWSTR pWinStationName;
142 WTS_CONNECTSTATE_CLASS State;
143 } WTS_SESSION_INFOW, *PWTS_SESSION_INFOW;
144
145 DECL_WINELIB_TYPE_AW(WTS_SESSION_INFO)
146 DECL_WINELIB_TYPE_AW(PWTS_SESSION_INFO)
147
148 typedef struct _WTS_SERVER_INFOA
149 {
150 LPSTR pServerName;
151 } WTS_SERVER_INFOA, *PWTS_SERVER_INFOA;
152
153 typedef struct _WTS_SERVER_INFOW
154 {
155 LPWSTR pServerName;
156 } WTS_SERVER_INFOW, *PWTS_SERVER_INFOW;
157
158 DECL_WINELIB_TYPE_AW(WTS_SERVER_INFO)
159 DECL_WINELIB_TYPE_AW(PWTS_SERVER_INFO)
160
161 #define WTS_CURRENT_SERVER_HANDLE ((HANDLE)NULL)
162
163 void WINAPI WTSCloseServer(HANDLE);
164 BOOL WINAPI WTSConnectSessionA(ULONG, ULONG, PSTR, BOOL);
165 BOOL WINAPI WTSConnectSessionW(ULONG, ULONG, PWSTR, BOOL);
166 #define WTSConnectSession WINELIB_NAME_AW(WTSConnectSession)
167 BOOL WINAPI WTSDisconnectSession(HANDLE, DWORD, BOOL);
168 BOOL WINAPI WTSEnumerateProcessesA(HANDLE, DWORD, DWORD, PWTS_PROCESS_INFOA *, DWORD *);
169 BOOL WINAPI WTSEnumerateProcessesW(HANDLE, DWORD, DWORD, PWTS_PROCESS_INFOW *, DWORD *);
170 #define WTSEnumerateProcesses WINELIB_NAME_AW(WTSEnumerateProcesses)
171 BOOL WINAPI WTSEnumerateServersA( LPSTR, DWORD, DWORD, PWTS_SERVER_INFOA*, DWORD*);
172 BOOL WINAPI WTSEnumerateServersW( LPWSTR, DWORD, DWORD, PWTS_SERVER_INFOW*, DWORD*);
173 #define WTSEnumerateServers WINELIB_NAME_AW(WTSEnumerateServers)
174 BOOL WINAPI WTSEnumerateSessionsA(HANDLE, DWORD, DWORD, PWTS_SESSION_INFOA *, DWORD *);
175 BOOL WINAPI WTSEnumerateSessionsW(HANDLE, DWORD, DWORD, PWTS_SESSION_INFOW *, DWORD *);
176 #define WTSEnumerateSessions WINELIB_NAME_AW(WTSEnumerateSessions)
177 void WINAPI WTSFreeMemory(PVOID);
178 HANDLE WINAPI WTSOpenServerA(LPSTR);
179 HANDLE WINAPI WTSOpenServerW(LPWSTR);
180 #define WTSOpenServer WINELIB_NAME_AW(WTSOpenServer)
181 BOOL WINAPI WTSQuerySessionInformationA(HANDLE, DWORD, WTS_INFO_CLASS, LPSTR *, DWORD *);
182 BOOL WINAPI WTSQuerySessionInformationW(HANDLE, DWORD, WTS_INFO_CLASS, LPWSTR *, DWORD *);
183 #define WTSQuerySessionInformation WINELIB_NAME_AW(WTSQuerySessionInformation)
184 BOOL WINAPI WTSQueryUserConfigA(LPSTR,LPSTR,WTS_CONFIG_CLASS,LPSTR*,DWORD*);
185 BOOL WINAPI WTSQueryUserConfigW(LPWSTR,LPWSTR,WTS_CONFIG_CLASS,LPWSTR*,DWORD*);
186 #define WTSQueryUserConfig WINELIB_NAME_AW(WTSQueryUserConfig)
187 BOOL WINAPI WTSQueryUserToken(ULONG, PHANDLE);
188 BOOL WINAPI WTSRegisterSessionNotification(HWND, DWORD);
189 BOOL WINAPI WTSRegisterSessionNotificationEx(HANDLE, HWND, DWORD);
190 BOOL WINAPI WTSStartRemoteControlSessionA(LPSTR, ULONG, BYTE, USHORT);
191 BOOL WINAPI WTSStartRemoteControlSessionW(LPWSTR, ULONG, BYTE, USHORT);
192 #define WTSStartRemoteControlSession WINELIB_NAME_AW(WTSStartRemoteControlSession)
193 BOOL WINAPI WTSStopRemoteControlSession(ULONG);
194 BOOL WINAPI WTSTerminateProcess(HANDLE, DWORD, DWORD);
195 BOOL WINAPI WTSUnRegisterSessionNotification(HWND);
196 BOOL WINAPI WTSUnRegisterSessionNotificationEx(HANDLE, HWND);
197 BOOL WINAPI WTSWaitSystemEvent(HANDLE, DWORD, DWORD*);
198
199 #ifdef __cplusplus
200 }
201 #endif
202
203 #endif