d00a699aacfd95d8bf7f25ae27f1c8530b92bc28
[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 typedef enum _WTS_VIRTUAL_CLASS
28 {
29 WTSVirtualClientData,
30 WTSVirtualFileHandle
31 } WTS_VIRTUAL_CLASS;
32
33 typedef enum tagWTS_INFO_CLASS
34 {
35 WTSInitialProgram,
36 WTSApplicationName,
37 WTSWorkingDirectory,
38 WTSOEMId,
39 WTSSessionId,
40 WTSUserName,
41 WTSWinStationName,
42 WTSDomainName,
43 WTSConnectState,
44 WTSClientBuildNumber,
45 WTSClientName,
46 WTSClientDirectory,
47 WTSClientProductId,
48 WTSClientHardwareId,
49 WTSClientAddress,
50 WTSClientDisplay,
51 WTSClientProtocolType,
52 } WTS_INFO_CLASS;
53
54 typedef enum _WTS_CONNECTSTATE_CLASS
55 {
56 WTSActive,
57 WTSConnected,
58 WTSConnectQuery,
59 WTSShadow,
60 WTSDisconnected,
61 WTSIdle,
62 WTSListen,
63 WTSReset,
64 WTSDown,
65 WTSInit
66 } WTS_CONNECTSTATE_CLASS;
67
68 typedef enum _WTS_CONFIG_CLASS
69 {
70 WTSUserConfigInitialProgram,
71 WTSUserConfigWorkingDirectory,
72 WTSUserConfigInheritInitialProgram,
73 WTSUserConfigAllowLogonTerminalServer,
74 WTSUserConfigTimeoutSettingsConnections,
75 WTSUserConfigTimeoutSettingsDisconnections,
76 WTSUserConfigTimeoutSettingsIdle,
77 WTSUserConfigDeviceClientDrives,
78 WTSUserConfigDeviceClientPrinters,
79 WTSUserConfigDeviceClientDefaultPrinter,
80 WTSUserConfigBrokenTimeoutSettings,
81 WTSUserConfigModemCallbackSettings,
82 WTSUserConfigModemCallbackPhoneNumber,
83 WTSUserConfigShadowSettings,
84 WTSUserConfigTerminalServerProfilePath,
85 WTSUserConfigTerminalServerHomeDirectory,
86 WTSUserConfigfTerminalServerRemoteHomeDir
87 } WTS_CONFIG_CLASS;
88
89 typedef struct _WTS_PROCESS_INFOA
90 {
91 DWORD SessionId;
92 DWORD ProcessId;
93 LPSTR pProcessName;
94 PSID pUserSid;
95 } WTS_PROCESS_INFOA, *PWTS_PROCESS_INFOA;
96
97 typedef struct _WTS_PROCESS_INFOW
98 {
99 DWORD SessionId;
100 DWORD ProcessId;
101 LPWSTR pProcessName;
102 PSID pUserSid;
103 } WTS_PROCESS_INFOW, *PWTS_PROCESS_INFOW;
104
105 DECL_WINELIB_TYPE_AW(WTS_PROCESS_INFO)
106 DECL_WINELIB_TYPE_AW(PWTS_PROCESS_INFO)
107
108 typedef struct _WTS_SESSION_INFOA
109 {
110 DWORD SessionId;
111 LPSTR pWinStationName;
112 WTS_CONNECTSTATE_CLASS State;
113 } WTS_SESSION_INFOA, *PWTS_SESSION_INFOA;
114
115 typedef struct _WTS_SESSION_INFOW
116 {
117 DWORD SessionId;
118 LPWSTR pWinStationName;
119 WTS_CONNECTSTATE_CLASS State;
120 } WTS_SESSION_INFOW, *PWTS_SESSION_INFOW;
121
122 DECL_WINELIB_TYPE_AW(WTS_SESSION_INFO)
123 DECL_WINELIB_TYPE_AW(PWTS_SESSION_INFO)
124
125 typedef struct _WTS_SERVER_INFOA
126 {
127 LPSTR pServerName;
128 } WTS_SERVER_INFOA, *PWTS_SERVER_INFOA;
129
130 typedef struct _WTS_SERVER_INFOW
131 {
132 LPWSTR pServerName;
133 } WTS_SERVER_INFOW, *PWTS_SERVER_INFOW;
134
135 DECL_WINELIB_TYPE_AW(WTS_SERVER_INFO)
136 DECL_WINELIB_TYPE_AW(PWTS_SERVER_INFO)
137
138 #define WTS_CURRENT_SERVER_HANDLE ((HANDLE)NULL)
139
140 void WINAPI WTSCloseServer(HANDLE);
141 BOOL WINAPI WTSConnectSessionA(ULONG, ULONG, PSTR, BOOL);
142 BOOL WINAPI WTSConnectSessionW(ULONG, ULONG, PWSTR, BOOL);
143 #define WTSConnectSession WINELIB_NAME_AW(WTSConnectSession)
144 BOOL WINAPI WTSDisconnectSession(HANDLE, DWORD, BOOL);
145 BOOL WINAPI WTSEnumerateProcessesA(HANDLE, DWORD, DWORD, PWTS_PROCESS_INFOA *, DWORD *);
146 BOOL WINAPI WTSEnumerateProcessesW(HANDLE, DWORD, DWORD, PWTS_PROCESS_INFOW *, DWORD *);
147 #define WTSEnumerateProcesses WINELIB_NAME_AW(WTSEnumerateProcesses)
148 BOOL WINAPI WTSEnumerateServersA( LPSTR, DWORD, DWORD, PWTS_SERVER_INFOA*, DWORD*);
149 BOOL WINAPI WTSEnumerateServersW( LPWSTR, DWORD, DWORD, PWTS_SERVER_INFOW*, DWORD*);
150 #define WTSEnumerateServers WINELIB_NAME_AW(WTSEnumerateServers)
151 BOOL WINAPI WTSEnumerateSessionsA(HANDLE, DWORD, DWORD, PWTS_SESSION_INFOA *, DWORD *);
152 BOOL WINAPI WTSEnumerateSessionsW(HANDLE, DWORD, DWORD, PWTS_SESSION_INFOW *, DWORD *);
153 #define WTSEnumerateSessions WINELIB_NAME_AW(WTSEnumerateSessions)
154 void WINAPI WTSFreeMemory(PVOID);
155 HANDLE WINAPI WTSOpenServerA(LPSTR);
156 HANDLE WINAPI WTSOpenServerW(LPWSTR);
157 #define WTSOpenServer WINELIB_NAME_AW(WTSOpenServer)
158 BOOL WINAPI WTSQuerySessionInformationA(HANDLE, DWORD, WTS_INFO_CLASS, LPSTR *, DWORD *);
159 BOOL WINAPI WTSQuerySessionInformationW(HANDLE, DWORD, WTS_INFO_CLASS, LPWSTR *, DWORD *);
160 #define WTSQuerySessionInformation WINELIB_NAME_AW(WTSQuerySessionInformation)
161 BOOL WINAPI WTSQueryUserConfigA(LPSTR,LPSTR,WTS_CONFIG_CLASS,LPSTR*,DWORD*);
162 BOOL WINAPI WTSQueryUserConfigW(LPWSTR,LPWSTR,WTS_CONFIG_CLASS,LPWSTR*,DWORD*);
163 #define WTSQueryUserConfig WINELIB_NAME_AW(WTSQueryUserConfig)
164 BOOL WINAPI WTSQueryUserToken(ULONG, PHANDLE);
165 BOOL WINAPI WTSRegisterSessionNotification(HWND, DWORD);
166 BOOL WINAPI WTSRegisterSessionNotificationEx(HANDLE, HWND, DWORD);
167 BOOL WINAPI WTSStartRemoteControlSessionA(LPSTR, ULONG, BYTE, USHORT);
168 BOOL WINAPI WTSStartRemoteControlSessionW(LPWSTR, ULONG, BYTE, USHORT);
169 #define WTSStartRemoteControlSession WINELIB_NAME_AW(WTSStartRemoteControlSession)
170 BOOL WINAPI WTSStopRemoteControlSession(ULONG);
171 BOOL WINAPI WTSTerminateProcess(HANDLE, DWORD, DWORD);
172 BOOL WINAPI WTSUnRegisterSessionNotification(HWND);
173 BOOL WINAPI WTSUnRegisterSessionNotificationEx(HANDLE, HWND);
174 BOOL WINAPI WTSWaitSystemEvent(HANDLE, DWORD, DWORD*);
175
176 #ifdef __cplusplus
177 }
178 #endif
179
180 #endif